Marcel Kornacker has posted comments on this change. Change subject: IMPALA-4792: Fix number of distinct values for a CASE with constant outputs ......................................................................
Patch Set 2: (1 comment) http://gerrit.cloudera.org:8080/#/c/5768/2/fe/src/main/java/org/apache/impala/analysis/CaseExpr.java File fe/src/main/java/org/apache/impala/analysis/CaseExpr.java: Line 384: // Otherwise, take a max over all the outputs as well as all the slotrefs that > Yes. The alternative is to take the max over the 'then/else exprs' and igno hm, not sure what to do here. we could try out both variants, and i can make arguments for both (don't throw information away; counterexample: case when a < 10 then 1 else a end will get it really wrong if ndv(a) == -1 but in reality it has 10^9 values). or maybe start with the -1 propagation, and then see how many benchmark queries we regress. -- To view, visit http://gerrit.cloudera.org:8080/5768 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-MessageType: comment Gerrit-Change-Id: I21dbdaad8452b7e58c477612b47847dccd9d98d2 Gerrit-PatchSet: 2 Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-Owner: Joe McDonnell <[email protected]> Gerrit-Reviewer: Alex Behm <[email protected]> Gerrit-Reviewer: Joe McDonnell <[email protected]> Gerrit-Reviewer: Marcel Kornacker <[email protected]> Gerrit-HasComments: Yes
