Fang-Yu Rao has uploaded this change for review. ( 
http://gerrit.cloudera.org:8080/22347


Change subject: IMPALA-13657: Connect Calcite planner to Impala Frontend 
framework
......................................................................

IMPALA-13657: Connect Calcite planner to Impala Frontend framework

This commit adds the plumbing created by IMPALA-13653. The Calcite
planner is now called from Impala's Frontend code via 4 hooks which
are:

- CalciteParsedStatementCreator: the factory class that creates
    a parsed statement
- CalciteParsedStatement: The class which holds the Calcite SqlNode
    AST.
- CalciteAnalysisDriver: The class that does the validation of the
    SqlNode AST
- CalciteSingleNodePlanner: The class that converts the AST to a
    logical plan, optimizes it, and converts it into an Impala
    PlanNode physical plan.

To run on Calcite, one needs to do two things:

1) set the USE_CALCITE_PLANNER env variable to true before starting
the cluster. This adds the jar file into the path in the setclasspath.sh
file, which is not there by default at the time of this commit.
2) set the use_calcite_planner query option to true.

This commit makes the CalciteJniFrontend class obsolete. Once the
test cases are moved out of there, that class and others can be
removed.

Change-Id: I108f6c62f6c581c9a2d06f2bcac0b047d9166618
---
M be/src/service/query-options.cc
M be/src/service/query-options.h
M common/thrift/ImpalaService.thrift
M common/thrift/Query.thrift
M fe/src/main/java/org/apache/impala/service/Frontend.java
A 
java/calcite-planner/src/main/java/org/apache/impala/calcite/service/CalciteAnalysisDriver.java
M 
java/calcite-planner/src/main/java/org/apache/impala/calcite/service/CalciteJniFrontend.java
M 
java/calcite-planner/src/main/java/org/apache/impala/calcite/service/CalciteMetadataHandler.java
M 
java/calcite-planner/src/main/java/org/apache/impala/calcite/service/CalciteOptimizer.java
A 
java/calcite-planner/src/main/java/org/apache/impala/calcite/service/CalciteParsedStatement.java
A 
java/calcite-planner/src/main/java/org/apache/impala/calcite/service/CalciteParsedStatementCreator.java
M 
java/calcite-planner/src/main/java/org/apache/impala/calcite/service/CalcitePhysPlanCreator.java
M 
java/calcite-planner/src/main/java/org/apache/impala/calcite/service/CalciteQueryParser.java
M 
java/calcite-planner/src/main/java/org/apache/impala/calcite/service/CalciteRelNodeConverter.java
A 
java/calcite-planner/src/main/java/org/apache/impala/calcite/service/CalciteSingleNodePlanner.java
15 files changed, 511 insertions(+), 35 deletions(-)



  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/47/22347/1
--
To view, visit http://gerrit.cloudera.org:8080/22347
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I108f6c62f6c581c9a2d06f2bcac0b047d9166618
Gerrit-Change-Number: 22347
Gerrit-PatchSet: 1
Gerrit-Owner: Fang-Yu Rao <[email protected]>
Gerrit-Reviewer: Steve Carlin <[email protected]>

Reply via email to