Steve Carlin has submitted this change and it was merged. ( 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 Reviewed-on: http://gerrit.cloudera.org:8080/23513 Reviewed-by: Riza Suminto <[email protected]> Tested-by: Impala Public Jenkins <[email protected]> --- 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, 122 insertions(+), 7 deletions(-) Approvals: Riza Suminto: Looks good to me, approved Impala Public Jenkins: Verified -- 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: merged Gerrit-Change-Id: I82419f77e043e9975865a042ffb8db75a26931f7 Gerrit-Change-Number: 23513 Gerrit-PatchSet: 6 Gerrit-Owner: Steve Carlin <[email protected]> Gerrit-Reviewer: Aman Sinha <[email protected]> Gerrit-Reviewer: Fang-Yu Rao <[email protected]> Gerrit-Reviewer: Impala Public Jenkins <[email protected]> Gerrit-Reviewer: Joe McDonnell <[email protected]> Gerrit-Reviewer: Michael Smith <[email protected]> Gerrit-Reviewer: Riza Suminto <[email protected]> Gerrit-Reviewer: Steve Carlin <[email protected]>
