Repository navigation
Fix filter column projection in REST scan planning - #4105
carlosjourdan wants to merge 1 commit into
Conversation
|
This pull request has been marked as stale due to 30 days of inactivity. It will be closed in 1 week if no further activity occurs. If you think that's incorrect or this pull request requires a review, please simply write any comment. If closed, you can revive the PR at any time and @mention a reviewer or discuss it on the dev@iceberg.apache.org list. Thank you for your contributions. |
Include predicate columns in server plan requests so projected files retain the values needed for client filtering when residuals are omitted. Keep the caller output projection unchanged.
ab44b12 to
8652b4c
Compare
|
I rebased this PR on the latest The rebase had a conflict with the new metadata column support in All CI checks pass on the new commit, including the unit tests (Python 3.11 to 3.14, Windows) and the integration tests (S3, ADLS, GCS). The PR is ready for review. |
Closes #4104.
Rationale for this change
Server-side planning can return files containing only the requested columns and omit
residual-filter. If the original filter references an unselected column, the client evaluates it against a missing value and silently returns no rows.Include the filter's columns in the plan request. The existing output projection keeps the result limited to the caller's selected columns.
Are these changes tested?
[]instead of[{"x": 1}, {"x": 3}].make test PYTEST_ARGS='-q --tb=short': 4,271 passed, 5 skipped.make lint: passed.CI on the fork: Python 3.10 is blocked by the existing Google warning-filter problem tracked in #4100 (failed job). A minimal import reproduces the collection error with both the base (
b32392dc) and branch pytest configurations on Python 3.10.21, using the locked dependency versions; applying #4100's filter to the reproducer makes it pass. Linux 3.11–3.14 jobs were cancelled by fail-fast; Windows 3.12 passed. Linux CI still needs a successful rerun after the upstream fix lands.Local performance measurements
Compared the upstream and patched request methods on the same Python 3.13 / PyArrow 25 environment, with request JSON serialization, a stub catalog, and nine interleaved timing blocks. On a 1,000-column schema:
Local million-row Parquet scans with identical correct results had medians around 14–15 ms on both versions. These measurements do not establish strict performance equivalence or measure live server processing and transfer costs. Unity Catalog has not been tested live.
Are there any user-facing changes?
Filtered server-planned scans now return the matching rows when filter columns were omitted from
selected_fields. Returned columns are unchanged.AI assistance: Codex was used for the implementation, regression tests, validation, and PR description. Validation limitations and uncertainties are documented above.