You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2021/04/22 10:06:00 UTC

[jira] [Work logged] (HIVE-25046) Log CBO plans right after major transformations

     [ https://issues.apache.org/jira/browse/HIVE-25046?focusedWorklogId=587149&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-587149 ]

ASF GitHub Bot logged work on HIVE-25046:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 22/Apr/21 10:05
            Start Date: 22/Apr/21 10:05
    Worklog Time Spent: 10m 
      Work Description: zabetak opened a new pull request #2205:
URL: https://github.com/apache/hive/pull/2205


   ### What changes were proposed in this pull request?
   Places DEBUG logging information after every major transformation step of the CBO planner.
   
   ### Why are the changes needed?
   
   More DEBUG info and overcomes the following shortcomings:
   
   1. If there is a failure (exception) in some transformation step
   intermediate plans are lost, thus losing track of which plan led to the
   problem.
   2. Intermediate logs are 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.
   3. Logging at the end necessitates keeping additional local variables
   which makes the code slightly harder to read.
   
   ### Does this PR introduce _any_ user-facing change?
   DEBUG logs are slightly different.
   
   ### How was this patch tested?
   No need for tests.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Issue Time Tracking
-------------------

            Worklog Id:     (was: 587149)
    Remaining Estimate: 0h
            Time Spent: 10m

> 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
>            Priority: Major
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> 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)