Stamatis Zampetakis created HIVE-25046:
------------------------------------------

             Summary: Log CBO plans right after major transformations
                 Key: HIVE-25046
                 URL: https://issues.apache.org/jira/browse/HIVE-25046
             Project: Hive
          Issue Type: Improvement
          Components: CBO
            Reporter: Stamatis Zampetakis
            Assignee: Stamatis Zampetakis


Currently the results of various CBO transformations are logged (in DEBUG mode) 
at the end of the optimization 
[phase|https://github.com/apache/hive/blob/9f5bd72e908244b2fe915e8dc39f55afa94bbffa/ql/src/java/org/apache/hadoop/hive/ql/parse/CalcitePlanner.java#L2106]
 and only if we are not in test mode. This has some disadvantages:
* If there is a failure (exception) in some intermediate step we will miss all 
the intermediate  plans, possibly losing track of what plan led to the problem.
* Intermediate logs are very useful for identifying plan problems while working 
on a patch; unfortunately the logs are explicitly disabled in test mode which 
means that in order to appear the respective code needs to change every time we 
need to see those logs.
* Logging at the end necessitates keeping additional local variables that make 
code harder to read.

The goal of this issue is to place DEBUG logging right after major 
transformations and independently if we are running in test mode or not to 
alleviate the shortcomings mentioned above.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to