difin commented on code in PR #6218:
URL: https://github.com/apache/hive/pull/6218#discussion_r2617368359
##########
iceberg/iceberg-handler/src/main/java/org/apache/iceberg/mr/hive/HiveIcebergMetaHook.java:
##########
@@ -181,22 +181,22 @@ public void
rollbackCreateTable(org.apache.hadoop.hive.metastore.api.Table hmsTa
public void commitCreateTable(org.apache.hadoop.hive.metastore.api.Table
hmsTable) {
if (icebergTable == null) {
-
setFileFormat(catalogProperties.getProperty(TableProperties.DEFAULT_FILE_FORMAT));
+
setFileFormat(tableProperties.getProperty(TableProperties.DEFAULT_FILE_FORMAT));
String metadataLocation =
hmsTable.getParameters().get(BaseMetastoreTableOperations.METADATA_LOCATION_PROP);
Table table;
if (metadataLocation != null) {
- table = Catalogs.registerTable(conf, catalogProperties,
metadataLocation);
+ table = Catalogs.registerTable(conf, tableProperties,
metadataLocation);
} else {
- table = Catalogs.createTable(conf, catalogProperties);
+ table = Catalogs.createTable(conf, tableProperties);
}
- if (!HiveTableUtil.isCtas(catalogProperties)) {
+ if (!HiveTableUtil.isCtas(tableProperties)) {
return;
}
// set this in the query state so that we can rollback the table in the
lifecycle hook in case of failures
- String tableIdentifier = catalogProperties.getProperty(Catalogs.NAME);
+ String tableIdentifier = tableProperties.getProperty(Catalogs.NAME);
Review Comment:
Previously this properties object was called `catalogProperties`, but in
reality in contained only table properties. Iceberg table properties can
contain catalog name set on table level, this overrides the default catalog.
--
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]