wangxianghu commented on a change in pull request #2993: URL: https://github.com/apache/hudi/pull/2993#discussion_r643974052
########## File path: hudi-client/hudi-spark-client/src/test/java/org/apache/hudi/keygen/TestCustomKeyGenerator.java ########## @@ -220,5 +425,21 @@ public void testComplexRecordKeysWithComplexPartitionPath() { Row row = KeyGeneratorTestUtilities.getRow(record); Assertions.assertEquals(keyGenerator.getRecordKey(row), "_row_key:key1,pii_col:pi"); Assertions.assertEquals(keyGenerator.getPartitionPath(row), "timestamp=4357686/ts_ms=20200321"); + + // Test config with HoodieWriteConfig.KEYGENERATOR_TYPE_PROP + complexRecordKeyAndPartitionPathProps = getComplexRecordKeyAndPartitionPathProps(); + complexRecordKeyAndPartitionPathProps + .put(HoodieWriteConfig.KEYGENERATOR_TYPE_PROP, KeyGeneratorType.CUSTOM.name()); + + keyGenerator = HoodieSparkKeyGeneratorFactory.createKeyGenerator(complexRecordKeyAndPartitionPathProps); + + record = getRecord(); Review comment: > would be nice to avoid copy pasting code. Let's try to parametrize tests. sure -- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org