You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@calcite.apache.org by GitBox <gi...@apache.org> on 2020/10/20 22:13:15 UTC

[GitHub] [calcite] julianhyde commented on a change in pull request #2225: [CALCITE-4345] NPE in AggregateCaseToFilterRule when converts SUM(CASE WHEN c THEN 1 END) (Jiatao Tao)

julianhyde commented on a change in pull request #2225:
URL: https://github.com/apache/calcite/pull/2225#discussion_r508871559



##########
File path: core/src/test/java/org/apache/calcite/test/RelOptRulesTest.java
##########
@@ -3825,7 +3825,8 @@ public boolean test(Project project) {
         + " sum(case when deptno = 10 then sal end) as sum_sal_d10,\n"
         + " sum(case when deptno = 20 then sal else 0 end) as sum_sal_d20,\n"
         + " sum(case when deptno = 30 then 1 else 0 end) as count_d30,\n"
-        + " count(case when deptno = 40 then 'x' end) as count_d40,\n"
+        + " sum(case when deptno = 40 then 1 end) as count_d40,\n"

Review comment:
       I see. I got confused because you edited an existing case (`count_d40` to `count_d10`) rather than adding new ones.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org