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

[CALCITE-4345] NPE in AggregateCaseToFilterRule when converts SUM(CASE WHEN c THEN 1 END) (Jiatao Tao) #2225

Closed
wants to merge 1 commit into from

Conversation

Aaaaaaron
Copy link
Member

@Aaaaaaron Aaaaaaron commented Oct 19, 2020

Copy link
Contributor

@amaliujia amaliujia left a comment

Choose a reason for hiding this comment

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

LGTM thanks!

@Aaaaaaron Aaaaaaron changed the title [CALCITE-4345] Avoid NPE in AggregateCaseToFilterRule when converts SUM(CASE WHEN c THEN 1 END) (Jiatao Tao) [CALCITE-4345] NPE in AggregateCaseToFilterRule when converts SUM(CASE WHEN c THEN 1 END) (Jiatao Tao) Oct 20, 2020
@Aaaaaaron Aaaaaaron requested review from julianhyde and vlsi October 28, 2020 08:58
@asfgit asfgit closed this in 0e71469 Nov 3, 2020
julianhyde pushed a commit that referenced this pull request Nov 3, 2020
…when converting CASE without ELSE (Jiatao Tao)

For example, 'SUM(CASE WHEN b THEN 1 END)' is equivalent to
'SUM(CASE WHEN b THEN 1 ELSE NULL END)', and both should be
converted to 'SUM(1) FILTER (WHERE b)', but before this bug
was fixed the former would throw NullPointerException.

Close #2225
MalteBellmann pushed a commit to caespes/calcite that referenced this pull request Feb 21, 2021
…when converting CASE without ELSE (Jiatao Tao)

For example, 'SUM(CASE WHEN b THEN 1 END)' is equivalent to
'SUM(CASE WHEN b THEN 1 ELSE NULL END)', and both should be
converted to 'SUM(1) FILTER (WHERE b)', but before this bug
was fixed the former would throw NullPointerException.

Close apache#2225
XuQianJin-Stars pushed a commit to XuQianJin-Stars/calcite that referenced this pull request Jul 14, 2021
…when converting CASE without ELSE (Jiatao Tao)

For example, 'SUM(CASE WHEN b THEN 1 END)' is equivalent to
'SUM(CASE WHEN b THEN 1 ELSE NULL END)', and both should be
converted to 'SUM(1) FILTER (WHERE b)', but before this bug
was fixed the former would throw NullPointerException.

Close apache#2225
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.

5 participants