Michael Smith has submitted this change and it was merged. ( 
http://gerrit.cloudera.org:8080/21897 )

Change subject: IMPALA-13197: (part 2) Added Analytic Expressions to Calcite 
Planner
......................................................................

IMPALA-13197: (part 2) Added Analytic Expressions to Calcite Planner

This commit contains fixes on top of the analytic expressions which fixes
some of the tests in analytic-fns.test.

The fixes include:

- The AnalyzedAnalyticExpr object now calls "standardize" on AnalyticExpr
  which mutates AnalyticExpr into its final compiled form.

- Added handling for sum_init_zero which is produced by Calcite. Note: this
  is only supported in Impala for BIGINT. An implementation is needed for
  Decimal and double (IMPALA-13435)

- CastExpr needs to be analyzed. There is a quirk in the current Impala
  implementation that the parameters for CastExpr are not re-analyzed.
  So an explicit analyze is done when a CastExpr is encountered.

- AnalyticExprs allow "count" with zero parameters

- Certain analytic expressions use default window functions. The Calcite window
  operations will be ignored for these functions.

Change-Id: I56529b13c545cdc9f96dd1c3bea9ef676e8c2755
Reviewed-on: http://gerrit.cloudera.org:8080/21897
Reviewed-by: Michael Smith <[email protected]>
Tested-by: Michael Smith <[email protected]>
---
M 
java/calcite-planner/src/main/java/org/apache/impala/calcite/functions/AnalyzedAnalyticExpr.java
M 
java/calcite-planner/src/main/java/org/apache/impala/calcite/functions/AnalyzedFunctionCallExpr.java
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/functions/RexCallConverter.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/rel/node/ImpalaAnalyticRel.java
M 
java/calcite-planner/src/main/java/org/apache/impala/calcite/rel/util/CreateExprVisitor.java
7 files changed, 143 insertions(+), 16 deletions(-)

Approvals:
  Michael Smith: Looks good to me, approved; Verified

--
To view, visit http://gerrit.cloudera.org:8080/21897
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I56529b13c545cdc9f96dd1c3bea9ef676e8c2755
Gerrit-Change-Number: 21897
Gerrit-PatchSet: 5
Gerrit-Owner: Steve Carlin <[email protected]>
Gerrit-Reviewer: Aman Sinha <[email protected]>
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