zhangbutao commented on code in PR #5959: URL: https://github.com/apache/hive/pull/5959#discussion_r2200314287
########## iceberg/iceberg-handler/src/main/java/org/apache/iceberg/mr/hive/HiveIcebergMetaHook.java: ########## @@ -815,8 +815,8 @@ private void assertFileFormat(String format) { } private void setCommonHmsTablePropertiesForIceberg(org.apache.hadoop.hive.metastore.api.Table hmsTable) { - // If the table is not managed by Hive catalog then the location should be set - if (!Catalogs.hiveCatalog(conf, catalogProperties)) { + // If the table is not managed by Hive or Hadoop catalog, then the location should be set + if (!Catalogs.hiveCatalog(conf, catalogProperties) && !Catalogs.hadoopCatalog(conf, catalogProperties)) { Review Comment: My bad, i just forget to add TBLPROPERTIES when creating table: ``` set iceberg.catalog.ice01.type=hadoop; set iceberg.catalog.ice01.warehouse=hdfs://127.0.0.1:8020/tmp; CREATE EXTERNAL TABLE orders (orderid INT, quantity INT, itemid INT, tradets TIMESTAMP) PARTITIONED BY (p1 STRING, p2 STRING) STORED BY ICEBERG STORED AS ORC TBLPROPERTIES('format-version'='2', 'iceberg.catalog'='ice01'); ``` Can not create Hadoop catalog tables without setting the location. Will throw exception: `Caused by: java.lang.IllegalArgumentException: Table location not set` -- 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: gitbox-unsubscr...@hive.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: gitbox-unsubscr...@hive.apache.org For additional commands, e-mail: gitbox-h...@hive.apache.org