deniskuzZ commented on code in PR #4165:
URL: https://github.com/apache/hive/pull/4165#discussion_r1157306903


##########
ql/src/java/org/apache/hadoop/hive/ql/session/SessionStateUtil.java:
##########
@@ -115,7 +115,7 @@ public static boolean addCommitInfo(Configuration conf, 
String tableName, String
     return addResource(conf, COMMIT_INFO_PREFIX + tableName, newCommitInfoMap);
   }
 
-  private static Optional<QueryState> getQueryState(Configuration conf) {
+  public static Optional<QueryState> getQueryState(Configuration conf) {
     return Optional.ofNullable(SessionState.get())

Review Comment:
   could we refactor to:
   ````
       return Optional.ofNullable(SessionState.get())
           .map(ss -> ss.getQueryState(HiveConf.getQueryId(conf)));
   ````
   HiveConf
   ````
     public static String getQuertyId(Configuration conf) {
       return getVar(conf, HiveConf.ConfVars.HIVEQUERYID, "");
     }
   ````
   see getQueryString



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