Skip to content

datafusion_iceberg: pure pushdown heuristic with unit tests - #76

Merged
Vedin merged 1 commit into
embucket-sync-df55.0.0from
perf/pushdown-heuristic-test
Sep 12, 2026
Merged

Vedin merged 1 commit into
embucket-sync-df55.0.0from
perf/pushdown-heuristic-test

Conversation

@Vedin

@Vedin Vedin commented Sep 12, 2026

Copy link
Copy Markdown

What

Extracts the parquet row-filter pushdown decision from table_scan (#75) into a pure, documented helper use_parquet_row_filter_pushdown(projected_columns, filter_columns) with named thresholds (WIDE_SCAN_MIN_PROJECTED_COLUMNS = 8, NARROW_PREDICATE_MAX_COLUMNS = 2); the wide-scan / narrow-predicate rationale moved into its doc comment. No behaviour change: the call site passes the same projection width and deduplicated filter-column count.

Tests

pushdown_heuristic_tests: no filter columns is never pushed down; 8+1, 8+2, 100+2 enable; 8+3, 7+1, 7+2, 0+1 disable; and a test building the filter-column set exactly as the call site does from Expr filters, asserting column_refs deduplicates repeated columns. cargo test -p datafusion_iceberg --lib: 66 passed; make fmt / make clippy clean.

Pinned by Embucket/rustice.

🤖 Generated with Claude Code

https://claude.ai/code/session_012m5Yx6yEpZsacqAhZotgkT

…ic and cover it

Move the wide-scan / narrow-predicate decision out of `table_scan` into a
pure module-level `use_parquet_row_filter_pushdown(projected_columns,
filter_columns)` with named thresholds (`WIDE_SCAN_MIN_PROJECTED_COLUMNS = 8`,
`NARROW_PREDICATE_MAX_COLUMNS = 2`) and the rationale in its doc comment.
The call site now passes `requested_projection.len()` and the deduplicated
filter-column count; behavior is unchanged.

Add `pushdown_heuristic_tests` covering the boundaries (no filter columns is
never pushed down; 8+1, 8+2, 100+2 on; 8+3, 7+1, 7+2 off) and a test that
builds the filter-column set the way the call site does from `Expr` filters
and asserts `column_refs` deduplicates repeated columns across predicates.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012m5Yx6yEpZsacqAhZotgkT
@Vedin
Vedin merged commit 0c4e939 into embucket-sync-df55.0.0 Sep 12, 2026
2 checks passed
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.

1 participant