dengzhhu653 commented on a change in pull request #2204:
URL: https://github.com/apache/hive/pull/2204#discussion_r659451245



##########
File path: 
service/src/java/org/apache/hive/service/cli/thrift/ThriftCLIService.java
##########
@@ -794,11 +794,20 @@ public TGetOperationStatusResp 
GetOperationStatus(TGetOperationStatusReq req) th
       }
       JobProgressUpdate progressUpdate = operationStatus.jobProgressUpdate();
       ProgressMonitorStatusMapper mapper = ProgressMonitorStatusMapper.DEFAULT;
-      if ("tez".equals(hiveConf.getVar(ConfVars.HIVE_EXECUTION_ENGINE))) {
-        mapper = new TezProgressMonitorStatusMapper();
-      }
-      if ("spark".equals(hiveConf.getVar(ConfVars.HIVE_EXECUTION_ENGINE))) {
-        mapper = new SparkProgressMonitorStatusMapper();
+      String engineInSessionConf = 
cliService.getSessionManager().getOperationManager()
+              .getOperation(operationHandle)
+              .getParentSession()
+              .getHiveConf()
+              .getVar(ConfVars.HIVE_EXECUTION_ENGINE);
+      switch (engineInSessionConf) {
+        case "tez":
+          mapper = new TezProgressMonitorStatusMapper();
+          break;
+        case "spark":
+          mapper = new SparkProgressMonitorStatusMapper();
+          break;
+        default:

Review comment:
       nit: maybe we could remove the `default` execution path here?




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