openinx commented on a change in pull request #3539:
URL: https://github.com/apache/iceberg/pull/3539#discussion_r754014895



##########
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:
       Agree,  Then I think we add document in the hive section to 
describe/explain the property `name` for end 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]

Reply via email to