[ https://issues.apache.org/jira/browse/HIVE-25102?focusedWorklogId=601902&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-601902 ]
ASF GitHub Bot logged work on HIVE-25102: ----------------------------------------- Author: ASF GitHub Bot Created on: 25/May/21 18:41 Start Date: 25/May/21 18:41 Worklog Time Spent: 10m Work Description: lcspinter commented on a change in pull request #2261: URL: https://github.com/apache/hive/pull/2261#discussion_r639093469 ########## File path: ql/src/java/org/apache/hadoop/hive/ql/Driver.java ########## @@ -213,7 +216,14 @@ private void runInternal(String command, boolean alreadyCompiled) throws Command releaseResources(); } + if (SessionState.get() != null) { + // Clean up every resource object stored in the query state + driverContext.getQueryState().removeResources(); Review comment: I think we need it. We have an instance of `QueryState` stored on the `DriverContext`, and we have the same `QueryState` instance stored on `SessionState` as well. If I remove the `QueryState` just from the `SessionState`, we will end up with some dangling resources on the `QueryState` bound to the `DriverContext`. -- 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 Issue Time Tracking ------------------- Worklog Id: (was: 601902) Time Spent: 7h 50m (was: 7h 40m) > Cache Iceberg table objects within same query > --------------------------------------------- > > Key: HIVE-25102 > URL: https://issues.apache.org/jira/browse/HIVE-25102 > Project: Hive > Issue Type: Improvement > Reporter: László Pintér > Assignee: László Pintér > Priority: Major > Labels: pull-request-available > Time Spent: 7h 50m > Remaining Estimate: 0h > > We run Catalogs.loadTable(configuration, props) plenty of times which is > costly. > We should: > - Cache it maybe even globally based on the queryId > - Make sure that the query uses one snapshot during the whole execution of a > single query -- This message was sent by Atlassian Jira (v8.3.4#803005)