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:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]