suryaprasanna commented on code in PR #17787:
URL: https://github.com/apache/hudi/pull/17787#discussion_r2743840541
##########
hudi-client/hudi-spark-client/src/test/java/org/apache/hudi/keygen/TestSimpleKeyGenerator.java:
##########
@@ -168,4 +179,21 @@ void testNestedPartitionPathField(GenericRecord
nestedColRecord) {
Assertions.assertEquals("key1", keyGenerator.getRecordKey(row));
Assertions.assertEquals(expectedPartitionPath,
keyGenerator.getPartitionPath(row));
}
+
+ @Test
+ void testSlashSeparatedDatePartitioning() {
+ SimpleKeyGenerator keyGenerator = new
SimpleKeyGenerator(getPropsWithSlashSeparatedDatePartitioning());
+
+ // Create a record with date in yyyy-MM-dd format
+ GenericRecord avroRecord = new
GenericData.Record(HoodieSchema.parse(KeyGeneratorTestUtilities.EXAMPLE_SCHEMA).getAvroSchema());
+ avroRecord.put("timestamp", "2026-01-05");
+ avroRecord.put("_row_key", "key1");
+ avroRecord.put("ts_ms", "2026-01-05");
+ avroRecord.put("pii_col", "val1");
+
+ // The partition path should be transformed to yyyy/MM/dd format
Review Comment:
Added more tests.
--
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]