Repository navigation
Fix filter column projection in REST scan planning - #2
Closed
carlosjourdan wants to merge 1 commit into
Closed
carlosjourdan wants to merge 1 commit into
carlosjourdan wants to merge 1 commit into
Conversation
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.
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.
Superseded by apache#4105, which proposes this branch directly to
apache/iceberg-python:main. This fork-only PR is closed without merging.Addresses apache#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: Python 3.10 is blocked by the existing Google warning-filter problem tracked in apache#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 apache#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.