ClickBench 43/43 queries pass

JPointDB

Analytical database in Java 25
columnar storage · SQL engine · REST + CLI + web

jpointdb — sql session
-- connected to hits (100,000 rows, 105 columns)
Stack

Pure Java 25. Zero heavy deps.

No Spring. No Jackson. No Lombok. Just the JDK and a few focused libraries.

sealed

Modern Java

Sealed interfaces, pattern matching, records. Java 25 language features everywhere.

mmap

FFM & Off-Heap

MemorySegment + Arena.ofShared for mmap. Read path is entirely off-heap, zero GC pressure.

simd

Vector API Ready

jdk.incubator.vector enabled. SIMD filters, aggregates, and string ops on the roadmap.

null?

JSpecify + NullAway

Compile-time null-safety enforced on all main sources. ~60 @Nullable annotations. NPE = build failure.

grad

Gradle 9 Multi-Module

Clean build with Spotless, Checkstyle, ErrorProne, SpotBugs. Full check in ~11 seconds.

deps

Minimal Dependencies

Runtime: JLine (CLI) + CodeMirror via CDN (web UI). Test: JUnit 5 + DuckDB CLI. That's it.

Architecture

4 modules, clear boundaries

core

Storage engine, SQL parser, binder, executor. TSV converter, JSON serializer. The brain.

server

REST on com.sun.net.httpserver — /health, /schema, /query endpoints + static web UI.

cli

JLine REPL with syntax highlighting, history, \-meta commands. Full terminal experience.

bench

ClickBench golden correctness tests. Every query verified against DuckDB reference output.

Storage Format
hits.jpdb/
  meta.json ← schema, row count, column types
  EventTime.col ← raw i64 array + validity bitmap
  URL.col ← DICT encoding (magic JPCS) | RAW fallback on high cardinality
  UserID.col ← raw i64, mmap via Arena.ofShared
  ... ← one file per column, all off-heap reads
Quick Start

Three commands to query

# Build and fetch a 100k-row ClickBench sample
$ ./bench/scripts/setup-golden.sh
# Start the server on localhost:8080
$ ./start-server.sh
# Query from CLI
$ ./cli.sh -c 'SELECT COUNT(*) FROM hits WHERE AdvEngineID <> 0;'
# Or open web UI
$ open http://localhost:8080
Quality Gates

Every commit is verified

./gradlew check runs all of these in ~11 seconds:

Spotless
Checkstyle
ErrorProne
NullAway
SpotBugs
JUnit 5
JaCoCo
PIT 71%
OWASP
Roadmap — Stage 3

What's next: performance

Vectorized Execution

Vector batches (4096 rows), pull-based pipeline. BoundExpr → VectorizedExpr with typed arrays + null masks.

SIMD via Vector API

jdk.incubator.vector for i32/i64/f64 filters, SUM/COUNT/MIN/MAX aggregates, string search acceleration.

Parallel Scan & Aggregate

ForkJoinPool for column blocks (~64K rows), partial_agg per thread + reduce. Scalable across cores.

Hash Aggregation

Open-addressing with linear probing, specialized i32/i64 key variants, ring-buffer spilling.

Column Compression

RLE for constants, Delta for monotonic i64, LZ4 for strings. Bloom filters and min/max indexes per block.

Parquet Support

Reader/writer for interop with the ClickBench ecosystem and external tooling.

Contact

Get in touch

Questions, ideas, or want to contribute? Reach out.

GitHub
PakhomovAlexander/jpointdb
@
Email
apkhmv@gmail.com
Telegram
@apakhmv
Podcast

Тысяча фичей

Подкаст про программирование, базы данных и технологии. Слушайте на любой платформе.

Apple Podcasts Spotify YouTube Yandex Music Telegram Zvuk