vinothchandar commented on a change in pull request #1834:
URL: https://github.com/apache/hudi/pull/1834#discussion_r469401767
##########
File path:
hudi-spark/src/test/java/org/apache/hudi/keygen/TestTimestampBasedKeyGenerator.java
##########
@@ -116,20 +165,26 @@ public void testScalar() throws IOException {
// timezone is GMT
properties = getBaseKeyConfig("SCALAR", "yyyy-MM-dd hh", "GMT", "days");
- HoodieKey hk5 = new
TimestampBasedKeyGenerator(properties).getKey(baseRecord);
+ TimestampBasedKeyGenerator keyGen = new
TimestampBasedKeyGenerator(properties);
+ HoodieKey hk5 = keyGen.getKey(baseRecord);
assertEquals(hk5.getPartitionPath(), "2024-10-04 12");
+
+ // test w/ Row
+ baseRow = genericRecordToRow(baseRecord);
+ keyGen.initializeRowKeyGenerator(structType, testStructName,
testNamespace);
+ assertEquals("2024-10-04 12", keyGen.getPartitionPathFromRow(baseRow));
}
@Test
public void
test_ExpectsMatch_SingleInputFormat_ISO8601WithMsZ_OutputTimezoneAsUTC() throws
IOException {
baseRecord.put("createTime", "2020-04-01T13:01:33.428Z");
properties = this.getBaseKeyConfig(
- "DATE_STRING",
- "yyyy-MM-dd'T'HH:mm:ss.SSSZ",
- "",
- "",
- "yyyyMMddHH",
- "GMT");
+ "DATE_STRING",
Review comment:
@nsivabalan this is done?
----------------------------------------------------------------
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:
[email protected]