-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/66370/
-----------------------------------------------------------

(Updated Июль 1, 2018, 8:55 д.п.)


Review request for hive, Ashutosh Chauhan and Vineet Garg.


Changes
-------

Rewrite the part of handling exception in CalcitePlanner.
1. If we got RuntimeException we just rethrow it.
2. If we got CalciteSemanticException with unsupported feature, we move to 
non-cbo analyzing.
3. If we got CalciteSemanticException w/o unsupported feature, we just rethrow 
it, wrapping it to new SemanticException(e.getMessage()), if we just wrap it, 
we will have redundant exception message with path of CalciteSemanticException.
Also, I've tested the original cause in the Hive CLI, and it throws expected 
error, that column reference not found.


Bugs: HIVE-18725
    https://issues.apache.org/jira/browse/HIVE-18725


Repository: hive-git


Description
-------

If there is a column reference within subquery which doesn't exist Hive throws 
misleading error message.


Diffs (updated)
-----

  
ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/CalciteSubquerySemanticException.java
 4321a5c789 
  
ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/CalciteViewSemanticException.java
 c2a4e94a03 
  ql/src/java/org/apache/hadoop/hive/ql/parse/CalcitePlanner.java e091f38bc6 
  ql/src/test/queries/clientnegative/subquery_non_exisiting_column.q 
PRE-CREATION 
  ql/src/test/results/clientnegative/subquery_non_exisiting_column.q.out 
PRE-CREATION 


Diff: https://reviews.apache.org/r/66370/diff/5/

Changes: https://reviews.apache.org/r/66370/diff/4-5/


Testing
-------


Thanks,

Igor Kryvenko

Reply via email to