voonhous commented on code in PR #18816:
URL: https://github.com/apache/hudi/pull/18816#discussion_r3887451399
##########
hudi-cli/src/test/java/org/apache/hudi/cli/commands/TestRepairsCommand.java:
##########
@@ -227,19 +222,31 @@ public void testOverwriteHoodieProperties() throws
IOException {
.collect(Collectors.toMap(e -> String.valueOf(e.getKey()), e ->
String.valueOf(e.getValue())));
expected.putIfAbsent(TABLE_CHECKSUM.key(),
String.valueOf(generateChecksum(tableConfig.getProps())));
expected.putIfAbsent(DROP_PARTITION_COLUMNS.key(),
String.valueOf(DROP_PARTITION_COLUMNS.defaultValue()));
+
+ // Add properties that are now present in Hudi 1.x by default
+ if (result.containsKey(HoodieTableConfig.TIMELINE_PATH.key())) {
+ expected.putIfAbsent(HoodieTableConfig.TIMELINE_PATH.key(),
result.get(HoodieTableConfig.TIMELINE_PATH.key()));
+ }
+ if (result.containsKey("hoodie.table.initial.version")) {
+ expected.putIfAbsent("hoodie.table.initial.version",
result.get("hoodie.table.initial.version"));
+ }
+ if (result.containsKey(HoodieTableConfig.TIMELINE_HISTORY_PATH.key())) {
+ expected.putIfAbsent(HoodieTableConfig.TIMELINE_HISTORY_PATH.key(),
result.get(HoodieTableConfig.TIMELINE_HISTORY_PATH.key()));
+ }
+
assertEquals(expected, result);
// check result
- List<String> allPropsStr = Arrays.asList(NAME.key(), TYPE.key(),
VERSION.key(),
- TIMELINE_HISTORY_PATH.key(), TIMELINE_LAYOUT_VERSION.key(),
TABLE_CHECKSUM.key(), DROP_PARTITION_COLUMNS.key());
+ // Include all properties from both old and new props for comparison
Review Comment:
Removed -- `allKeys`, `allPropsStr` and `rows` were left over from a deleted
`HoodiePrintHelper.print` call and fed nothing.
##########
hudi-cli/src/test/java/org/apache/hudi/cli/commands/TestRepairsCommand.java:
##########
@@ -227,19 +222,31 @@ public void testOverwriteHoodieProperties() throws
IOException {
.collect(Collectors.toMap(e -> String.valueOf(e.getKey()), e ->
String.valueOf(e.getValue())));
expected.putIfAbsent(TABLE_CHECKSUM.key(),
String.valueOf(generateChecksum(tableConfig.getProps())));
expected.putIfAbsent(DROP_PARTITION_COLUMNS.key(),
String.valueOf(DROP_PARTITION_COLUMNS.defaultValue()));
+
+ // Add properties that are now present in Hudi 1.x by default
+ if (result.containsKey(HoodieTableConfig.TIMELINE_PATH.key())) {
+ expected.putIfAbsent(HoodieTableConfig.TIMELINE_PATH.key(),
result.get(HoodieTableConfig.TIMELINE_PATH.key()));
+ }
Review Comment:
Done -- now uses `HoodieTableConfig.INITIAL_VERSION.key()` instead of the
raw literal.
--
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]