Steve Carlin has uploaded this change for review. ( http://gerrit.cloudera.org:8080/21976
Change subject: IMPALA-13481: Add support for various agg and analytic functions ...................................................................... IMPALA-13481: Add support for various agg and analytic functions Various functions were added. There were several issues for these functions: 1) The Calcite parser and/or validator was generating SqlNodes that weren't compatible with Impala. To fix this, the parsing had to be removed from the Parser.jj file and the functions were marked to use the ImpalaOperator rather than the Calcite operator. These functions include: trim, extract, regr*, regexp*, localtime, group_concat 2) The ntile, cume_dist, and percent_rank functions undergo a transformation in AnalyticExpr. To make this more clean for Calcite, the transformation now happens in the RewriteRexOverRule. 3) The "negative" operator had to be added to the custom operator table. The subtract was already added there, and all "-" operators need to be in the same table. 4) Various functions were added to function resolver where the Calcite function name was different from the Impala function name. Change-Id: I57c69a60c63872b2964688f395b662a85698555e --- M java/calcite-planner/src/main/codegen/config.fmpp M java/calcite-planner/src/main/codegen/templates/Parser.jj M java/calcite-planner/src/main/java/org/apache/impala/calcite/functions/FunctionResolver.java M java/calcite-planner/src/main/java/org/apache/impala/calcite/operators/ImpalaCustomOperatorTable.java M java/calcite-planner/src/main/java/org/apache/impala/calcite/operators/ImpalaOperatorTable.java A java/calcite-planner/src/main/java/org/apache/impala/calcite/rules/RewriteRexOverRule.java M java/calcite-planner/src/main/java/org/apache/impala/calcite/service/CalciteOptimizer.java 7 files changed, 279 insertions(+), 76 deletions(-) git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/76/21976/5 -- To view, visit http://gerrit.cloudera.org:8080/21976 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I57c69a60c63872b2964688f395b662a85698555e Gerrit-Change-Number: 21976 Gerrit-PatchSet: 5 Gerrit-Owner: Steve Carlin <[email protected]>
