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

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

                Author: ASF GitHub Bot
            Created on: 04/Apr/23 14:07
            Start Date: 04/Apr/23 14:07
    Worklog Time Spent: 10m 
      Work Description: 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





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

    Worklog Id:     (was: 854804)
    Time Spent: 2h 40m  (was: 2.5h)

> Iceberg: Cache iceberg table while loading for stats
> ----------------------------------------------------
>
>                 Key: HIVE-27185
>                 URL: https://issues.apache.org/jira/browse/HIVE-27185
>             Project: Hive
>          Issue Type: Improvement
>            Reporter: Ayush Saxena
>            Assignee: Ayush Saxena
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 2h 40m
>  Remaining Estimate: 0h
>
> Presently iceberg for stats loads the iceberg table multiple times for stats 
> via different routes.
> Cache it to avoid reading/loading the iceberg table multiple times.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to