Steve Carlin has uploaded this change for review. ( http://gerrit.cloudera.org:8080/23513
Change subject: IMPALA-13695: Calcite planner: fix for ndv with 2 args ...................................................................... IMPALA-13695: Calcite planner: fix for ndv with 2 args The NDV function was crashing when called with the "scale" arg. This requires special processing which exists in FunctionCallExpr. The validation for this is now done in ImpalaNdvFunction and the special calculation is done within ImpalaAggRel This also fixes ndv for varchar types. The aggregation call within CoerceNodes was not differentiating between varchar and string. A cast to string function is needed in order to run the ndv function on a varchar column. Change-Id: I82419f77e043e9975865a042ffb8db75a26931f7 --- M fe/src/main/java/org/apache/impala/analysis/FunctionCallExpr.java M java/calcite-planner/src/main/java/org/apache/impala/calcite/coercenodes/CoerceNodes.java M java/calcite-planner/src/main/java/org/apache/impala/calcite/operators/ImpalaCustomOperatorTable.java A java/calcite-planner/src/main/java/org/apache/impala/calcite/operators/ImpalaNdvFunction.java M java/calcite-planner/src/main/java/org/apache/impala/calcite/rel/node/ImpalaAggRel.java M testdata/workloads/functional-query/queries/QueryTest/calcite.test 6 files changed, 104 insertions(+), 6 deletions(-) git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/13/23513/2 -- To view, visit http://gerrit.cloudera.org:8080/23513 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I82419f77e043e9975865a042ffb8db75a26931f7 Gerrit-Change-Number: 23513 Gerrit-PatchSet: 2 Gerrit-Owner: Steve Carlin <[email protected]>
