Skip to content

More function support fixes#184

Merged
serprex merged 1 commit intomainfrom
more-functions
Apr 4, 2026
Merged

More function support fixes#184
serprex merged 1 commit intomainfrom
more-functions

Conversation

@serprex
Copy link
Copy Markdown
Member

@serprex serprex commented Apr 4, 2026

Do not attempt to pushdown the following:
string_agg (groupConcat uses incompatible parametric syntax)
regr_avgx, regr_avgy, regr_count, regr_intercept, regr_r2, regr_slope,
regr_sxx, regr_sxy, regr_syy, json_agg_strict, jsonb_agg_strict

These were being pushed down and failing with "Function does not exist" on ClickHouse,
now compute correctly on Postgres over rows fetched from the foreign scan

Skip frame clause for ranking window functions:
row_number, rank, dense_rank, ntile, cume_dist, percent_rank

ClickHouse rejects frame specifications on these;
FDW was emitting ROWS UNBOUNDED PRECEDING which caused pushdown to fail

based on #175

@serprex serprex requested review from iskakaushik and theory April 4, 2026 06:11
@serprex serprex changed the base branch from main to new-functions April 4, 2026 06:11
@serprex serprex changed the title Fix ORDER BY pushdown for window function queries More function support fixes Apr 4, 2026
@serprex serprex force-pushed the more-functions branch 3 times, most recently from eff2587 to 758af35 Compare April 4, 2026 08:00
24.3 | window_functions_2.out
23 | window_functions_3.out
23.8 | window_functions_5.out
23.3 | window_functions_3.out
Copy link
Copy Markdown
Member Author

@serprex serprex Apr 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we really need this many versions in CI? 24.3 gets its own entry because it had a typo in new error message ("Aggregate function with name 'lead' does not exists")

@serprex serprex mentioned this pull request Apr 4, 2026
Base automatically changed from new-functions to main April 4, 2026 20:55
Map bool_and/bool_or/every to ClickHouse, fix ranking window pushdown

Do not attempt to pushdown the following:
string_agg (groupConcat uses incompatible parametric syntax)
regr_avgx, regr_avgy, regr_count, regr_intercept, regr_r2, regr_slope,
regr_sxx, regr_sxy, regr_syy, json_agg_strict, jsonb_agg_strict

These were being pushed down and failing with "Function does not exist" on ClickHouse,
now compute correctly on Postgres over rows fetched from the foreign scan

Skip frame clause for ranking window functions:
row_number, rank, dense_rank, ntile, cume_dist, percent_rank

ClickHouse rejects frame specifications on these;
FDW was emitting ROWS UNBOUNDED PRECEDING which caused pushdown to fail
@serprex serprex merged commit 6064e2a into main Apr 4, 2026
30 of 36 checks passed
@serprex serprex deleted the more-functions branch April 4, 2026 21:22
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