Prune persisted row groups with zone maps #43

Merged
ober merged 6 commits from feat/lazy-zone-map-scan into main 2026-09-19 17:58:32 -04:00
Owner

Summary

  • preserve persisted 2,048-row group boundaries when reopening columnar tables
  • cache per-column zone maps for table chunks and prune impossible groups for simple direct-scan comparison and NULL predicates
  • keep full vector predicate evaluation for every candidate group, reverse literal-left comparisons safely, and bypass pruning for semantic casts
  • expose synchronized examined/pruned/candidate counters and add persistent reopen regressions
  • advance the package and CLI version to 0.20.0

This is the first production SCAN/zone-map slice. Metadata-first file opening, projected-column block reads, bloom filters, and memory-accounted lazy decompression remain explicitly out of scope and documented as outstanding.

The 0.20.0 version is ordered after the currently open transaction PR #40 (#40), CSV PR #41 (#41), and WAL/checkpoint PR #42 (#42).

Verification

  • all changed .ss files pass delimiter balance checks
  • changed modules compile under jerboa_verify; only established lexical pre-scan false positives remain
  • focused zone-map scan, zone-map, row-group, storage, catalog, and engine tests pass
  • make build
  • make unit
  • make verify (653 local SQLLogic checks and 62 upstream subset checks passed; concurrency stress, native analysis, and documentation hygiene passed)
  • make binary
  • make binary-smoke
  • changed-line jerboa_security_scan: no findings
  • git diff --check

Review notes

  • Production chunk bounds use tagged values so BOOLEAN #f cannot collide with the zone-map format's absent-bound sentinel.
  • No-op casts may be unwrapped for pruning; type-changing casts deliberately bypass pruning.
  • The source storage file is still fully decoded on open in this slice; query execution avoids materializing/filtering impossible restored chunks but does not yet avoid their initial I/O.
## Summary - preserve persisted 2,048-row group boundaries when reopening columnar tables - cache per-column zone maps for table chunks and prune impossible groups for simple direct-scan comparison and NULL predicates - keep full vector predicate evaluation for every candidate group, reverse literal-left comparisons safely, and bypass pruning for semantic casts - expose synchronized examined/pruned/candidate counters and add persistent reopen regressions - advance the package and CLI version to 0.20.0 This is the first production SCAN/zone-map slice. Metadata-first file opening, projected-column block reads, bloom filters, and memory-accounted lazy decompression remain explicitly out of scope and documented as outstanding. The 0.20.0 version is ordered after the currently open transaction PR #40 (https://git.jerboa.sh/ober/jerboa-duckdb/pulls/40), CSV PR #41 (https://git.jerboa.sh/ober/jerboa-duckdb/pulls/41), and WAL/checkpoint PR #42 (https://git.jerboa.sh/ober/jerboa-duckdb/pulls/42). ## Verification - all changed `.ss` files pass delimiter balance checks - changed modules compile under `jerboa_verify`; only established lexical pre-scan false positives remain - focused zone-map scan, zone-map, row-group, storage, catalog, and engine tests pass - `make build` - `make unit` - `make verify` (653 local SQLLogic checks and 62 upstream subset checks passed; concurrency stress, native analysis, and documentation hygiene passed) - `make binary` - `make binary-smoke` - changed-line `jerboa_security_scan`: no findings - `git diff --check` ## Review notes - Production chunk bounds use tagged values so BOOLEAN `#f` cannot collide with the zone-map format's absent-bound sentinel. - No-op casts may be unwrapped for pruning; type-changing casts deliberately bypass pruning. - The source storage file is still fully decoded on open in this slice; query execution avoids materializing/filtering impossible restored chunks but does not yet avoid their initial I/O.
feat: prune persisted row groups with zone maps
All checks were successful
version-policy / required (pull_request) Successful in 3m47s
required-ci / required (pull_request) Successful in 8m7s
b4b1defc21
feat: stream CSV copy with reader options
Some checks failed
version-policy / required (pull_request) Successful in 3m46s
required-ci / required (pull_request) Failing after 9m6s
4a1d1f8de1
test: update CLI smoke version
All checks were successful
version-policy / required (pull_request) Successful in 3m46s
required-ci / required (pull_request) Successful in 8m29s
91287762b3
test: cover WAL and checkpoint crash boundaries
All checks were successful
version-policy / required (pull_request) Successful in 3m47s
required-ci / required (pull_request) Successful in 8m1s
a0d0fb996d
Merge main and resolve CSV feature conflicts
Some checks failed
required-ci / required (pull_request) Failing after 3m43s
version-policy / required (pull_request) Successful in 3m43s
21b9c959e8
Retrigger CI after runner-side failure
Some checks failed
required-ci / required (pull_request) Failing after 3m44s
version-policy / required (pull_request) Successful in 3m43s
c1d1808916
Stack WAL recovery feature after CSV changes
Some checks failed
required-ci / required (pull_request) Failing after 3m44s
version-policy / required (pull_request) Successful in 3m44s
8a3cf26794
Stack zone-map pruning after WAL recovery changes
Some checks failed
required-ci / required (pull_request) Failing after 3m44s
version-policy / required (pull_request) Successful in 3m44s
b1c353b4a1
Bootstrap pinned Jerboa toolchain in CI
Some checks failed
version-policy / required (pull_request) Successful in 3m44s
required-ci / required (pull_request) Failing after 5m7s
6eb1db2e51
Merge remote-tracking branch 'origin/feat/csv-incremental-options' into feat/wal-checkpoint-faults
Some checks failed
version-policy / required (pull_request) Successful in 3m46s
required-ci / required (pull_request) Failing after 5m12s
7feef13435
Merge remote-tracking branch 'origin/feat/wal-checkpoint-faults' into feat/lazy-zone-map-scan
Some checks failed
version-policy / required (pull_request) Successful in 3m45s
required-ci / required (pull_request) Failing after 5m32s
19b4a5e54b
Make close-race assertion platform-neutral
Some checks failed
required-ci / required (pull_request) Failing after 5m26s
version-policy / required (pull_request) Successful in 3m45s
03b9b03fe1
Merge remote-tracking branch 'origin/feat/csv-incremental-options' into feat/wal-checkpoint-faults
Some checks failed
version-policy / required (pull_request) Successful in 3m45s
required-ci / required (pull_request) Failing after 5m13s
3d654e0b2f
Merge remote-tracking branch 'origin/feat/wal-checkpoint-faults' into feat/lazy-zone-map-scan
Some checks failed
version-policy / required (pull_request) Successful in 3m48s
required-ci / required (pull_request) Failing after 5m42s
4438b69640
Make native race smoke self-contained
Some checks failed
version-policy / required (pull_request) Successful in 3m44s
required-ci / required (pull_request) Failing after 7m28s
363975ce4e
Merge remote-tracking branch 'origin/feat/csv-incremental-options' into feat/wal-checkpoint-faults
Some checks failed
version-policy / required (pull_request) Successful in 3m45s
required-ci / required (pull_request) Failing after 7m31s
5f3a053eaa
Merge remote-tracking branch 'origin/feat/wal-checkpoint-faults' into feat/lazy-zone-map-scan
Some checks failed
version-policy / required (pull_request) Successful in 3m44s
required-ci / required (pull_request) Failing after 6m46s
44944ceb7f
Build complete FreeBSD standalone binaries
All checks were successful
version-policy / required (pull_request) Successful in 3m44s
required-ci / required (pull_request) Successful in 7m0s
37bdd45520
Merge remote-tracking branch 'origin/feat/csv-incremental-options' into feat/wal-checkpoint-faults
All checks were successful
version-policy / required (pull_request) Successful in 3m44s
required-ci / required (pull_request) Successful in 7m6s
6e752fa236
Merge remote-tracking branch 'origin/feat/wal-checkpoint-faults' into feat/lazy-zone-map-scan
All checks were successful
version-policy / required (pull_request) Successful in 3m45s
required-ci / required (pull_request) Successful in 7m1s
447da45cad
ober merged commit c7843b8469 into main 2026-09-19 17:58:32 -04:00
ober referenced this pull request from a commit 2026-09-19 17:58:33 -04:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
ober/jerboa-duckdb!43
No description provided.