Skip to content

fix: icebug disk can now read zstd + dictionary RLE compressed parquet - #821

Merged
adsharma merged 2 commits into
mainfrom
parquet_fixes
Aug 18, 2026
Merged

fix: icebug disk can now read zstd + dictionary RLE compressed parquet#821
adsharma merged 2 commits into
mainfrom
parquet_fixes

Conversation

@adsharma

Copy link
Copy Markdown
Contributor

Fixes: #820

ScanRelTable::getNextTuplesInternal pulls bound nodes in batches of
DEFAULT_VECTOR_CAPACITY and IceDiskRelTable::initScanState re-initialized the
parquet scan for every batch, which reset the scan to row group 0 each time.
The indices file was therefore re-scanned once per bound-node batch
(O(batches x edges)) and a full-materialization query effectively never
terminated (e.g. wiki-Talk: ~1169 batches x 5M edges).

Add range-limited scan support to ParquetReader (initializeScan skipRows and
numRows; rowsToSkip/rowsRemaining state) and use it in the FWD CSR path to
scan only the rows [indptr[minNode], indptr[maxNode+1]). Queued skips are
applied via StructColumnReader::skip()/applyPendingSkips(), which also now
sizes the dummy definition/repetition buffers to avoid writing into
unallocated storage.
scanInternal() returned true after switching to the next row group without
updating the result's selection vector size. Callers that scan multiple row
groups in a single initializeScan() (ice-disk rel-table scans, indptr loading,
and the dump harness) therefore saw the previous chunk's stale selSize and
re-processed the previous chunk's data: values diverged at every row-group
boundary and the scan over-read (2,394,386 -> 2,398,482 rows, i.e. 2x2048
extra rows for the indptr file).

Set the selection size to 0 on the row-group switch path so callers correctly
treat the switch as producing no rows. Also drop the debug fprintf statements
added while investigating.
@adsharma
adsharma merged commit 4760396 into main Aug 18, 2026
4 checks passed
@adsharma
adsharma deleted the parquet_fixes branch August 18, 2026 14:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

icebug-disk: issues reading graphs encoded with ZSTD + RLE_DICTIONARY

1 participant