Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CH] Use if function if condition size is 1 #4042

Merged
merged 4 commits into from
Dec 28, 2023

Conversation

zhanglistar
Copy link
Contributor

@zhanglistar zhanglistar commented Dec 14, 2023

What changes were proposed in this pull request?

(Please fill in changes proposed in this fix)

(Fixes: #4041)
If performance is better than mulitiIf, so we use if function if we have only on condition.

How was this patch tested?

(Please explain how this patch was tested. E.g. unit tests, integration tests, manual tests)
CI
Function if has better performance than mulitiIf when there is only one condition, especially after PR:
ClickHouse/ClickHouse#57885

On SQL 7954_0
Before:
image

After PR ClickHouse/ClickHouse#57745
image

Still if is faster than multiIf:
image

Copy link

Thanks for opening a pull request!

Could you open an issue for this pull request on Github Issues?

https://github.com/oap-project/gluten/issues

Then could you also rename commit message and pull request title in the following format?

[GLUTEN-${ISSUES_ID}][COMPONENT]feat/fix: ${detailed message}

See also:

Copy link

Run Gluten Clickhouse CI

Copy link

Run Gluten Clickhouse CI

1 similar comment
Copy link

Run Gluten Clickhouse CI

Copy link

Run Gluten Clickhouse CI

1 similar comment
Copy link

Run Gluten Clickhouse CI

Copy link

Run Gluten Clickhouse CI

Copy link

Run Gluten Clickhouse CI

Copy link

Run Gluten Clickhouse CI

Copy link

Run Gluten Clickhouse CI

Copy link
Contributor

@liuneng1994 liuneng1994 left a comment

Choose a reason for hiding this comment

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

LGTM

@liuneng1994 liuneng1994 merged commit 2731398 into apache:main Dec 28, 2023
8 checks passed
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.

[CH] Use if instead of multiIf function if condtion size is 1
3 participants