[ https://issues.apache.org/jira/browse/HIVE-25195?focusedWorklogId=606426&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-606426 ]
ASF GitHub Bot logged work on HIVE-25195: ----------------------------------------- Author: ASF GitHub Bot Created on: 04/Jun/21 07:33 Start Date: 04/Jun/21 07:33 Worklog Time Spent: 10m Work Description: marton-bod commented on a change in pull request #2347: URL: https://github.com/apache/hive/pull/2347#discussion_r645354876 ########## File path: iceberg/iceberg-handler/src/main/java/org/apache/iceberg/mr/hive/HiveIcebergSerDe.java ########## @@ -183,10 +183,9 @@ private void createTableForCTAS(Configuration configuration, Properties serDePro serDeProperties.get(Catalogs.NAME), tableSchema, serDeProperties.get(InputFormatConfig.PARTITION_SPEC)); Catalogs.createTable(configuration, serDeProperties); - // set these in the global conf so that we can rollback the table in the lifecycle hook in case of failures - String queryId = configuration.get(HiveConf.ConfVars.HIVEQUERYID.varname); - configuration.set(String.format(InputFormatConfig.IS_CTAS_QUERY_TEMPLATE, queryId), "true"); - configuration.set(String.format(InputFormatConfig.CTAS_TABLE_NAME_TEMPLATE, queryId), + // set these in the query state so that we can rollback the table in the lifecycle hook in case of failures + SessionStateUtil.addResource(configuration, InputFormatConfig.IS_CTAS_QUERY, "true"); Review comment: Yes, true, CTAS_TABLE_NAME should be enough -- 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: 606426) Time Spent: 1h 50m (was: 1h 40m) > Store Iceberg write commit and ctas information in QueryState > -------------------------------------------------------------- > > Key: HIVE-25195 > URL: https://issues.apache.org/jira/browse/HIVE-25195 > Project: Hive > Issue Type: Improvement > Reporter: Marton Bod > Assignee: Marton Bod > Priority: Major > Labels: pull-request-available > Time Spent: 1h 50m > Remaining Estimate: 0h > > We should replace the current method of passing Iceberg write commit-related > information (jobID, task num) and CTAS info via the session conf using > prefixed keys. We have a new way of doing that more cleanly, using the > QueryState object. This should make the code easier to maintain and guard > against accidental session conf pollution. -- This message was sent by Atlassian Jira (v8.3.4#803005)