empcl commented on code in PR #10840:
URL: https://github.com/apache/hudi/pull/10840#discussion_r1517530324
##########
hudi-flink-datasource/hudi-flink/src/test/java/org/apache/hudi/table/catalog/TestHoodieCatalog.java:
##########
@@ -258,6 +267,40 @@ public void testCreateTable() throws Exception {
String keyGeneratorClassName =
metaClient.getTableConfig().getKeyGeneratorClassName();
assertEquals(keyGeneratorClassName,
SimpleAvroKeyGenerator.class.getName());
+ // validate single key and multiple partition for partitioned table
+ ObjectPath singleKeyMultiplePartitionPath = new
ObjectPath(TEST_DEFAULT_DATABASE, "tb_skmp" + System.currentTimeMillis());
+ final ResolvedCatalogTable singleKeyMultiplePartitionTable = new
ResolvedCatalogTable(
+ CatalogTable.of(
+
Schema.newBuilder().fromResolvedSchema(CREATE_TABLE_SCHEMA).build(),
+ "test",
+ Lists.newArrayList("par1,par2"),
+ EXPECTED_OPTIONS),
+ CREATE_TABLE_SCHEMA
+ );
+
+ catalog.createTable(singleKeyMultiplePartitionPath,
singleKeyMultiplePartitionTable, false);
+ metaClient =
+ StreamerUtil.createMetaClient(catalog.inferTablePath(catalogPathStr,
singleKeyMultiplePartitionPath), new org.apache.hadoop.conf.Configuration());
+ keyGeneratorClassName =
metaClient.getTableConfig().getKeyGeneratorClassName();
+ assertEquals(keyGeneratorClassName,
ComplexAvroKeyGenerator.class.getName());
Review Comment:
Okay, I didn't notice it before. Modified
--
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]