Repository navigation
Conversation
Prepare device metadata and column page plans with a bounded shared-pool scheduler. Prune aligned pages by statistics, evaluate predicate columns first, and decode output columns directly into selected Arrow rows. Retain page decoder cursors across output batches, keep metadata allocations task-owned, and cover concurrent reads, deferred I/O, terminal errors, buffer ownership, and exact result batches.
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## develop #1144 +/- ##
===========================================
- Coverage 69.10% 68.18% -0.92%
===========================================
Files 790 795 +5
Lines 58327 59325 +998
Branches 9453 9755 +302
===========================================
+ Hits 40305 40451 +146
- Misses 16292 17074 +782
- Partials 1730 1800 +70 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Pair aligned value chunks with their shared clocks, keep the original column schema in TsBlock results, and stop planning chunks and devices the query cannot use. The CLI inherits the corrected reader behavior without changes to commands or options.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
C++ table scans now build Arrow buffers directly. Python imports those buffers as PyArrow record batches and reuses the schema across batches. Callers of
get_next_tsblock()still receive a TsBlock through an adapter.Parallel reads now start during device metadata lookup and column page planning. For aligned field predicates, the scanner prunes pages using statistics, decodes predicate columns to identify matching rows, then reads projected values for those rows. Each column releases its page buffers after its last selected row. This bounds the number of decoded pages kept alive when matches are sparse.
Batch semantics
batch_sizecounts output rows after filtering, offset and limit. A batch can span pages, chunks and devices. Only the final batch can be shorter. For example, 83 matching rows withbatch_size=32produce batches of 32, 32 and 19 rows.Performance
ALP prototype and PyArrow Parquet
An isolated prototype of the scan path had higher median throughput and lower median peak RSS in all 12 workloads below. The margin on a full scan was 1.20× for 128 columns and 1.25× for 5,000 columns. The largest gain was projecting 16 of 5,000 columns (7.80×). These measurements used a benchmark bridge into the C++ executor. A full timing run through the public SDK at PR head
f19a829ais still outstanding.Both readers streamed the same selected rows and columns into Arrow batches. The benchmark checked column values, nulls and output batch sizes. Speedup is Parquet median elapsed time divided by TsFile median elapsed time. RSS is the median of per-process peaks, including Python and PyArrow.
Test setup
pread. The fixture writer used a 1 GiB flush threshold. Parquet used BYTE_STREAM_SPLIT for DOUBLE values and LZ4 compression. PyArrow Dataset scanned with projection and predicates. The timer included assembling the requested output batches. For the 5,000-column dataset we tested default and bounded readahead and used the faster Parquet median for each query.Contributions of Arrow output and parallel scanning
A separate seven-round experiment used the earlier 64 MiB writer threshold, six threads and ALP data. Each row compares successive builds on the same input, starting at
develop@6c4ad792, then native Arrow output (ed16d6a0), then query-wide parallel scanning (10dc1db1). Each timing is a median in milliseconds.For scattered matches across 5,000 columns, median peak RSS went from 389 MiB on develop to 798 MiB with Arrow output alone, then down to 153 MiB with parallel scanning and early release of completed page buffers. Wide full scans made a different tradeoff. In the 1 GiB writer experiment, reusing compressed input reduced a 5,000-column full scan from 100,033 to 19
preadcalls and from 552.3 to 277.8 MiB of cumulative reads. Peak RSS rose from 223 to 488 MiB.Verification
The broader Linux UBSan run reported signed integer overflow in the SPRINTZ predictor's
IntFire::train. The same overflow was reproduced with the implementation from thedevelopbase commit,6c4ad792.