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

(Updated Dec. 6, 2019, 3:12 p.m.)


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
-------


File Attachments (updated)
----------------

HIVE-22578.2.patch
  
https://reviews.apache.org/media/uploaded/files/2019/12/06/8254f1f7-9dde-4837-a8bb-36d699489099__HIVE-22578.2.patch


Thanks,

Aron Hamvas

Reply via email to