-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/71889/
-----------------------------------------------------------
Review request for hive, Zoltan Haindrich and Vineet Garg.
Bugs: HIVE-22578
https://issues.apache.org/jira/browse/HIVE-22578
Repository: hive-git
Description
-------
CalcitePlanner.genOPTree() further invokes CalcitePlanner.fixUpAfterCbo()
method, which, in case of CTAS, VIEW, and MULTI_INSERT queries replaces the
original AST. If CBO fails, it is expected to retry OT generation without CBO,
using the original AST, which is already gone. The change saves the original
AST for re-use in case CBO fails. Also, some refactoring included:
- Removed unused genOPTree parameters from SemanticAnalyzer
- Centralized the handling of ASTNode object within the context of
SemanticAnalyzer and CalcitePlanner (i.e. use instance variable where
appropriate, instead of passing it as method argument)
- Made sure that the exception is always printed to HS2 logs if it happens
during CB optimization.
Thanks for the feedback in advance!
Diffs
-----
ql/src/java/org/apache/hadoop/hive/ql/parse/CalcitePlanner.java ea5fa3f4c3
ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java 60bfba826d
Diff: https://reviews.apache.org/r/71889/diff/1/
Testing
-------
Thanks,
Aron Hamvas