Steve Carlin has uploaded this change for review. ( 
http://gerrit.cloudera.org:8080/23900


Change subject: IMPALA-14488: Calcite planner: Support fallback to Original 
planner
......................................................................

IMPALA-14488: Calcite planner: Support fallback to Original planner

Introduced the query option RUNTIME_PLANNERS.  The four choices for
runtime planners are:

ORIGINAL (default): Use the Original planner for queries.
CALCITE: Use the Calcite planner for queries.
CALCITE,ORIGINAL: Use the Calcite planner. If the Calcite planner fails
during compilation, use the Original planner.
ORIGINAL,CALCITE : Use the Original planner. If the Original planner fails
during compilation, use the Calcite planner.

The Calcite planner currently does not support DDL and other various
queries (e.g. complex types). If a known unsupported query is detected,
the original planner will be used regardless of whether CALCITE or
CALCITE,ORIGINAL is set.

The fallback planner will allow for easier transition for users who
want to use the new Calcite planner without having to worry about
backward compatibility issues that the compiler doesn't support.
One example that is currently not supported (in runtime_planners.test)
is the "ignore nulls" phrase which needs to be inside the parens for
Impala, but outside the parens for the Calcite parser.

At the time of this commit, there are also various compiler exceptions
thrown for Calcite which are not yet supported. The CALCITE,ORIGINAL
option is set if the --use_calcite_planner=true server option is
specified. This will allow easier transitioning to the Calcite planner
because the user will assured that even if there is a compilation failure
in Calcite, their exisitng query will still run with the original planner.

In the query options module, the code to handle multiple TPlannerTypes is
similar to the ENABLED_RUNTIME_FILTER_TYPES option. However, the
RUNTIME_PLANNERS option had to be in a list, not a set, so some additional
code was needed to support that.

Change-Id: Id1fdc5ef92fff84e89af0e19c4246cc15e2ea823
---
M be/src/service/impala-server.cc
M be/src/service/query-options.cc
M be/src/service/query-options.h
M common/thrift/ImpalaService.thrift
M common/thrift/PlanNodes.thrift
M common/thrift/Query.thrift
M fe/src/main/java/org/apache/impala/service/Frontend.java
M 
java/calcite-planner/src/main/java/org/apache/impala/calcite/service/ExecRequestCreator.java
M 
java/calcite-planner/src/test/java/org/apache/impala/calcite/planner/TpcdsCpuCostPlannerTest.java
M 
java/calcite-planner/src/test/java/org/apache/impala/planner/CalcitePlannerTest.java
A testdata/workloads/functional-query/queries/QueryTest/runtime_planners.test
M tests/authorization/test_ranger.py
M tests/custom_cluster/test_calcite_planner.py
13 files changed, 255 insertions(+), 75 deletions(-)



  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/00/23900/4
--
To view, visit http://gerrit.cloudera.org:8080/23900
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Id1fdc5ef92fff84e89af0e19c4246cc15e2ea823
Gerrit-Change-Number: 23900
Gerrit-PatchSet: 4
Gerrit-Owner: Steve Carlin <[email protected]>

Reply via email to