Skip to content

[core] Implement withFilter for PartitionsTable and FilesTable#7791

Open
heye1005 wants to merge 1 commit intoapache:masterfrom
heye1005:system-tables-with-filter-postfilter
Open

[core] Implement withFilter for PartitionsTable and FilesTable#7791
heye1005 wants to merge 1 commit intoapache:masterfrom
heye1005:system-tables-with-filter-postfilter

Conversation

@heye1005
Copy link
Copy Markdown

@heye1005 heye1005 commented May 9, 2026

close #7792

Purpose

Implement PartitionsRead.withFilter and FilesRead.withFilter, which were
previously no-op stubs marked // TODO. Predicates are now applied as a
post-filter on the materialized row, so WHERE clauses on these system tables
take effect at the source level.
For FilesRead, predicates on partition, bucket and level are excluded
from the post-filter because they are already handled by FilesScan.

Tests

Added unit tests for equal / in / range / combined pushdown + post-filter
scenarios in PartitionsTableTest and FilesTableTest. All existing
system-table tests pass.

@heye1005 heye1005 force-pushed the system-tables-with-filter-postfilter branch from df543e9 to e97a299 Compare May 9, 2026 06:30
Replace the placeholder TODO in PartitionsRead.withFilter and
FilesRead.withFilter with a post-filter that evaluates the predicate
on the materialized row before projection.

For FilesRead, partition / bucket / level are stripped out because
they are already pushed down by FilesScan; re-evaluating them on the
materialized row would compare values of incompatible representations
(e.g. a String literal vs the BinaryString in the row).

Adds tests covering equal / in / range / combined pushdown + post-filter
scenarios for both system tables.
@heye1005 heye1005 force-pushed the system-tables-with-filter-postfilter branch from e97a299 to 028e584 Compare May 9, 2026 06:37
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.

[Feature] Implement withFilter for PartitionsTable and FilesTable

1 participant