Steve Carlin has submitted this change and it was merged. ( 
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.

Also added the test mentioned in IMPALA-13688 for cume_dist with
duplicates.

Change-Id: I57c69a60c63872b2964688f395b662a85698555e
Reviewed-on: http://gerrit.cloudera.org:8080/21976
Reviewed-by: Joe McDonnell <[email protected]>
Tested-by: Impala Public Jenkins <[email protected]>
---
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
M testdata/workloads/functional-query/queries/QueryTest/analytic-fns.test
8 files changed, 482 insertions(+), 76 deletions(-)

Approvals:
  Joe McDonnell: Looks good to me, approved
  Impala Public Jenkins: Verified

--
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: merged
Gerrit-Change-Id: I57c69a60c63872b2964688f395b662a85698555e
Gerrit-Change-Number: 21976
Gerrit-PatchSet: 19
Gerrit-Owner: Steve Carlin <[email protected]>
Gerrit-Reviewer: Aman Sinha <[email protected]>
Gerrit-Reviewer: Anonymous Coward (816)
Gerrit-Reviewer: Impala Public Jenkins <[email protected]>
Gerrit-Reviewer: Joe McDonnell <[email protected]>
Gerrit-Reviewer: Michael Smith <[email protected]>
Gerrit-Reviewer: Steve Carlin <[email protected]>

Reply via email to