pvary commented on a change in pull request #1222:
URL: https://github.com/apache/hive/pull/1222#discussion_r453155521



##########
File path: ql/src/java/org/apache/hadoop/hive/ql/Driver.java
##########
@@ -139,205 +119,215 @@ public Driver(QueryState queryState, QueryInfo 
queryInfo, HiveTxnManager txnMana
     driverTxnHandler = new DriverTxnHandler(this, driverContext, driverState);
   }
 
-  /**
-   * Compile a new query, but potentially reset taskID counter.  Not resetting 
task counter
-   * is useful for generating re-entrant QL queries.
-   * @param command  The HiveQL query to compile
-   * @param resetTaskIds Resets taskID counter if true.
-   * @return 0 for ok
-   */
-  public int compile(String command, boolean resetTaskIds) {
-    try {
-      compile(command, resetTaskIds, false);
-      return 0;
-    } catch (CommandProcessorException cpr) {
-      return cpr.getErrorCode();
-    }
+  @Override
+  public Context getContext() {
+    return context;
   }
 
-  // deferClose indicates if the close/destroy should be deferred when the 
process has been
-  // interrupted, it should be set to true if the compile is called within 
another method like
-  // runInternal, which defers the close to the called in that method.
-  @VisibleForTesting
-  public void compile(String command, boolean resetTaskIds, boolean 
deferClose) throws CommandProcessorException {
-    preparForCompile(resetTaskIds);
-
-    Compiler compiler = new Compiler(context, driverContext, driverState);
-    QueryPlan plan = compiler.compile(command, deferClose);
-    driverContext.setPlan(plan);
-
-    compileFinished(deferClose);
+  @Override
+  public HiveConf getConf() {
+    return driverContext.getConf();
   }
 
-  private void compileFinished(boolean deferClose) {
-    if (DriverState.getDriverState().isAborted() && !deferClose) {
-      closeInProcess(true);
-    }
+  @Override
+  public CommandProcessorResponse run() throws CommandProcessorException {
+    return run(null, true);

Review comment:
       What does this public method do? Javadoc might be useful




----------------------------------------------------------------
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:
us...@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscr...@hive.apache.org
For additional commands, e-mail: gitbox-h...@hive.apache.org

Reply via email to