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


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:

- CalciteComilerFactory: the factory class that creates
    the implementations of the parser, analysis, and single node
    planner hooks.
- 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.

The getFallbackFactory method will return the Impala compiler factory
class for non-select statements.

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: Ief10b613857cead9ec2cad99a4f213530ff82f51
---
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
A 
java/calcite-planner/src/main/java/org/apache/impala/calcite/service/CalciteAnalysisResult.java
A 
java/calcite-planner/src/main/java/org/apache/impala/calcite/service/CalciteCompilerFactory.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
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
A tests/query_test/test_calcite_planner.py
17 files changed, 674 insertions(+), 35 deletions(-)



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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ief10b613857cead9ec2cad99a4f213530ff82f51
Gerrit-Change-Number: 22624
Gerrit-PatchSet: 1
Gerrit-Owner: Fang-Yu Rao <fangyu....@cloudera.com>
Gerrit-Reviewer: Steve Carlin <scar...@cloudera.com>

Reply via email to