Skip to content

[core] Implement withFilter for TagsTable and FileKeyRangesTable#7874

Open
heye1005 wants to merge 1 commit into
apache:masterfrom
heye1005:implement-with-filter-tags-filekeyranges-tables
Open

[core] Implement withFilter for TagsTable and FileKeyRangesTable#7874
heye1005 wants to merge 1 commit into
apache:masterfrom
heye1005:implement-with-filter-tags-filekeyranges-tables

Conversation

@heye1005
Copy link
Copy Markdown
Contributor

Purpose

Implement withFilter for TagsRead / FileKeyRangesRead (was TODO, predicates were silently ignored).

FileKeyRangesRead excludes partition / bucket / level from the post-filter — already pushed down by scan, and re-evaluating them on the cast-to-string row breaks range predicates. Same pattern as FilesTable (#7791).

Tests

  • TagsTableTest: = / IN / <> on tag_name, filter on snapshot_id.
  • FileKeyRangesTableTest: record_count / schema_id, combined predicate, partition < '{11}' regression.

Replace the placeholder TODO in TagsRead#withFilter and
FileKeyRangesRead#withFilter with a read-side post-filter that evaluates
the predicate on the materialized row before projection.

For FileKeyRangesRead, partition / bucket / level are stripped out
before storing the post-filter because they are already pushed down by
FileKeyRangesScan; re-evaluating them on the materialized row would
compare values of incompatible representations (e.g. a String literal
vs the BinaryString in the row), mirroring the FilesTable behaviour
introduced in apache#7791.

Adds tests covering equal / in / not-equal / non-pushdown column /
combined pushdown + post-filter scenarios.
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