openinx commented on a change in pull request #3539:
URL: https://github.com/apache/iceberg/pull/3539#discussion_r748046649
##########
File path:
mr/src/test/java/org/apache/iceberg/mr/hive/TestHiveIcebergStorageHandlerLocalScan.java
##########
@@ -311,6 +313,26 @@ public void
testCreateTableWithColumnSpecificationMultilevelPartitioned() throws
runCreateAndReadTest(identifier, createSql,
HiveIcebergStorageHandlerTestUtils.CUSTOMER_SCHEMA, spec, data);
}
+ @Test
+ public void testExternalTableToTableManagedInHiveCatalog() throws
IOException {
+ Assume.assumeTrue("Only relevant for HiveCatalog", testTableType ==
TestTables.TestTableType.HIVE_CATALOG);
+
+ TableIdentifier identifier = TableIdentifier.of("default", "customers");
+ testTables.createIcebergTable(shell.getHiveConf(), identifier.name(),
+ HiveIcebergStorageHandlerTestUtils.CUSTOMER_SCHEMA, FileFormat.PARQUET,
+ Collections.emptyList());
+
+ Map<StructLike, List<Record>> data = Maps.newHashMap();
+ data.put(null, HiveIcebergStorageHandlerTestUtils.CUSTOMER_RECORDS);
+
+ String createSql = String.format("CREATE EXTERNAL TABLE
external_table_to_iceberg " +
+ "STORED BY 'org.apache.iceberg.mr.hive.HiveIcebergStorageHandler' " +
+ "TBLPROPERTIES('name'='%s')", identifier);
Review comment:
The `name` property seems like to be an internal property for convertion
between hive table and iceberg table, I'm not sure it is correct to expose as a
table property like this to hive sql users.
--
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]