Joe McDonnell has submitted this change and it was merged. ( 
http://gerrit.cloudera.org:8080/21989 )

Change subject: IMPALA-13495: Make exceptions from the Calcite planner easier 
to classify
......................................................................

IMPALA-13495: Make exceptions from the Calcite planner easier to classify

This makes several changes to the Calcite planner to improve the
generated exceptions when there are errors:
1. When the Calcite parser produces SqlParseException, this is converted
   to Impala's regular ParseException.
2. When the Calcite validation fails, it produces a CalciteContextException,
   which is a wrapper around the real cause. This converts these validation
   errors into AnalysisExceptions.
3. This produces UnsupportedFeatureException for non-HDFS table types like
   Kudu, HBase, Iceberg, and views. It also produces
   UnsupportedFeatureException for HDFS tables with complex types (which
   otherwise would hit ClassCastException).
4. This changes exception handling in CalciteJniFrontend.java so it does
   not convert exceptions to InternalException. The JNI code will print
   the stacktrace for exceptions, so this drops the existing call to
   print the exception stack trace.

Testing:
 - Ran some end-to-end tests with a mode that continues past failures
   and examined the output.

Change-Id: I6702ceac1d1d67c3d82ec357d938f12a6cf1c828
Reviewed-on: http://gerrit.cloudera.org:8080/21989
Reviewed-by: Michael Smith <[email protected]>
Reviewed-by: Joe McDonnell <[email protected]>
Tested-by: Joe McDonnell <[email protected]>
---
M fe/src/main/java/org/apache/impala/analysis/Parser.java
A fe/src/main/java/org/apache/impala/common/ParseException.java
M 
java/calcite-planner/src/main/java/org/apache/impala/calcite/schema/CalciteTable.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/CalciteQueryParser.java
M 
java/calcite-planner/src/main/java/org/apache/impala/calcite/service/CalciteValidator.java
7 files changed, 79 insertions(+), 42 deletions(-)

Approvals:
  Michael Smith: Looks good to me, but someone else must approve
  Joe McDonnell: Looks good to me, approved; Verified

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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I6702ceac1d1d67c3d82ec357d938f12a6cf1c828
Gerrit-Change-Number: 21989
Gerrit-PatchSet: 6
Gerrit-Owner: Joe McDonnell <[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