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

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

                Author: ASF GitHub Bot
            Created on: 15/Dec/21 15:43
            Start Date: 15/Dec/21 15:43
    Worklog Time Spent: 10m 
      Work Description: pvary commented on a change in pull request #2865:
URL: https://github.com/apache/hive/pull/2865#discussion_r769749700



##########
File path: ql/src/java/org/apache/hadoop/hive/ql/Driver.java
##########
@@ -515,14 +516,16 @@ private void preparForCompile(boolean resetTaskIds) 
throws CommandProcessorExcep
   }
 
   private void prepareContext() throws CommandProcessorException {
+    String originalCboInfo = context != null ? context.cboInfo : null;

Review comment:
       The issue here is that the context we prepared in the 
`ReCompilePlugin#Hook` will be closed here, and a new one will be recreated:
   ```
       if (context != null && context.getExplainAnalyze() != 
AnalyzeState.RUNNING) {
         // close the existing ctx etc before compiling a new query, but does 
not destroy driver
         closeInProcess(false);
       }
   
       if (context == null) {
         context = new Context(driverContext.getConf());
       }
   ```
   
   We have to save the cbo info pushed from the `ReCompilePlugin#Hook`




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

To unsubscribe, e-mail: gitbox-unsubscr...@hive.apache.org

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


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

    Worklog Id:     (was: 696692)
    Time Spent: 4h 40m  (was: 4.5h)

> Multi Insert query fails on CBO path 
> -------------------------------------
>
>                 Key: HIVE-25792
>                 URL: https://issues.apache.org/jira/browse/HIVE-25792
>             Project: Hive
>          Issue Type: Bug
>            Reporter: Zoltan Haindrich
>            Assignee: Peter Vary
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 4h 40m
>  Remaining Estimate: 0h
>
> {code}
> set hive.cbo.enable=true;
> drop table if exists aa1;
> drop table if exists bb1;
> drop table if exists cc1;
> drop table if exists dd1;
> drop table if exists ee1;
> drop table if exists ff1;
> create table aa1 ( stf_id string);
> create table bb1 ( stf_id string);
> create table cc1 ( stf_id string);
> create table ff1 ( x string);
> explain
> from ff1 as a join cc1 as b 
> insert overwrite table aa1 select   stf_id GROUP BY b.stf_id
> insert overwrite table bb1 select b.stf_id GROUP BY b.stf_id
> ;
> {code}



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to