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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to