Skip to content

ref: rework filter pushdown: ActionsDAG converter, temporal types and… - #116021

Merged
alexey-milovidov merged 1 commit into
ClickHouse:vortex-formatfrom
m7kss1:vortex-pushdown-refactor
Aug 29, 2026
Merged

alexey-milovidov merged 1 commit into
ClickHouse:vortex-formatfrom
m7kss1:vortex-pushdown-refactor

Conversation

@m7kss1

@m7kss1 m7kss1 commented Aug 23, 2026

Copy link
Copy Markdown
Member

Pushdown

  • Translate filters directly from the ActionsDAG

  • Allow pushdown of:

    • Bool and Date over U16 file columns
    • Date32 and DateTime64 predicates
    • LIKE, NOT LIKE, and startsWith predicates as prefix ranges
  • Forbid a Bool header over a U8 file column

  • Forbid DateTime64 when its scale differs from the file's unit

  • Forbid Date32 when date_time_overflow_behavior = 'saturate'

  • Forbid building IN subquery sets inside the reader

    • Explicit IN lists are capped at 64 elements before materialization

Observability

Add the following profile events:

  • VortexFilterPushdownConjunctsPushed/Dropped - number of filter conjuncts can (not) be pushed down
  • VortexScanEmptySplits - number of scan splits found to be empty

Usage example

SELECT
    ProfileEvents['VortexFilterPushdownConjunctsPushed'],
    ProfileEvents['VortexFilterPushdownConjunctsDropped'],
    ProfileEvents['VortexScanEmptySplits']
FROM system.query_log
WHERE query_id = '<id>'
  AND type = 'QueryFinish';

Debug logging example

$ clickhouse local --send_logs_level=test -q \
  "SELECT count()
   FROM file('data.vortex')
   WHERE d >= '2026-12-15' AND n % 2 = 0"

<Test> VortexBlockInputFormat: Vortex scan plan: columns [d, n], \
filter: ($.d >= 2026-12-15) (1 of 2 conjuncts pushed)

@m7kss1
m7kss1 marked this pull request as ready for review August 24, 2026 09:28
@m7kss1

m7kss1 commented Aug 26, 2026

Copy link
Copy Markdown
Member Author

cc: @alexey-milovidov

@alexey-milovidov
alexey-milovidov merged commit 1313c3c into ClickHouse:vortex-format Aug 29, 2026
@alexey-milovidov

Copy link
Copy Markdown
Member

Merged into #112950 (the vortex-format branch) as 1313c3cec990671de613f2daaac7d5b70dc4cfbf, so the pushdown rework ships together with the rest of the Vortex format in a single pull request against master. A pull request based on another feature branch gets no CI, which is why this one is being closed rather than merged on its own.

Verified locally on aarch64 before pushing: a Release build with ENABLE_VORTEX=ON compiles clean, and all 11 Vortex stateless tests pass, including the two new ones and the pre-existing 04821_vortex_filter_pushdown.

One change on the way in: the new tests were numbered 05030/05031, both of which are already taken in tests/queries/0_stateless (five tests share 05030), so they are now 05045_vortex_pushdown_types and 05046_vortex_pushdown_profile_events.

Thank you!

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.

2 participants