Skip to content

[GLUTEN-9176][CH] Rewrite aggregate if to aggregate with filter clause#9185

Merged
taiyang-li merged 3 commits into
apache:mainfrom
bigo-sg:gluten_9176
Apr 3, 2025
Merged

[GLUTEN-9176][CH] Rewrite aggregate if to aggregate with filter clause#9185
taiyang-li merged 3 commits into
apache:mainfrom
bigo-sg:gluten_9176

Conversation

@taiyang-li

@taiyang-li taiyang-li commented Mar 31, 2025

Copy link
Copy Markdown
Contributor

What changes were proposed in this pull request?

Rewrite aggregate if to aggregate with filter clause to use CH aggregate combinator -If .

  • Rule1: sum(if(cond, expr, 0)) -> sum(expr) FILTER (WHERE cond)
  • Rule2: func(if(cond, expr, null)) -> func(expr) FILTER (WHERE cond)

(Fixes: #9176)

How was this patch tested?

(Please explain how this patch was tested. E.g. unit tests, integration tests, manual tests)

(If this patch involves UI changes, please attach a screenshot; otherwise, remove this)

@github-actions

Copy link
Copy Markdown
@github-actions

Copy link
Copy Markdown

Run Gluten Clickhouse CI on x86

1 similar comment
@github-actions

github-actions Bot commented Apr 1, 2025

Copy link
Copy Markdown

Run Gluten Clickhouse CI on x86

@github-actions

github-actions Bot commented Apr 1, 2025

Copy link
Copy Markdown

Run Gluten Clickhouse CI on x86

@github-actions

github-actions Bot commented Apr 2, 2025

Copy link
Copy Markdown

Run Gluten Clickhouse CI on x86

@zhanglistar zhanglistar left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@taiyang-li taiyang-li merged commit e49f033 into apache:main Apr 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

2 participants