Repository navigation
feat(scan): Support split and parallel scans - Part-2a: read Parquet files by task range - #1002
Open
kamcheungting-db wants to merge 6 commits into
Open
kamcheungting-db wants to merge 6 commits into
kamcheungting-db wants to merge 6 commits into
Conversation
Preserve start and length in core and REST JSON, and reject partial reads until the reader can honor ranges.
Co-authored-by: Isaac <no-reply@databricks.com>
FileScanTaskReader previously rejected tasks that read part of a file. It now passes Parquet task ranges to the reader while keeping the full file size available for reading the footer. Use the first column's starting page to assign each row group to a range. This works when optional row-group offsets are missing and ensures that adjacent ranges read every row exactly once. Keep row positions and inherited row IDs relative to the whole file so deletes still remove the correct rows, even when page offsets are out of order. Recheck task bounds when opening a file, skip empty row groups, and reject invalid page offsets and partial tasks for unsupported formats. Add tests for split boundaries, deletes, row lineage, changed file sizes, and files with missing row-group offsets. Validation: all 306 tests in parquet_test and data_test pass. Formatting and whitespace checks pass. pre-commit could not run because it is not installed and PyPI DNS resolution failed during installation.
Co-authored-by: Isaac <no-reply@databricks.com>
kamcheungting-db
force-pushed
the
feat/file-scan-task-range-reading
branch
from
October 12, 2026 00:23
c06580b to
cc5f910
Compare
Co-authored-by: Isaac <no-reply@databricks.com>
This branch has not been deployed
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
Let
FileScanTaskReaderread a byte range of a Parquet file. #976 added task ranges but rejected them at read time.How it works
Each row group goes to the split that contains its starting byte (the first column's first page, as in parquet-mr). So splits that cover the file read every row exactly once.
Example: a file with 100-row groups starting at bytes 4, 1000, and 2000:
_posstart=0, length=1000start=1000, length=2000_posand_row_idstay relative to the whole file, so deletes and row lineage still work.Other changes:
file_offsetis missingNotSupportedTesting
Splits return the same rows,
_pos, and_row_idas a whole-file read, with and without deletes. Also covers missing offsets, out-of-order row groups, and invalid offsets.ctest --test-dir build-clang -R "^(data_test|parquet_test|scan_test)$" --output-on-failureclang-format --dry-run --Werror,git diff --checkThis pull request and its description were written by Isaac.