wombatu-kun commented on code in PR #11152:
URL: https://github.com/apache/hudi/pull/11152#discussion_r1625204089
##########
hudi-client/hudi-client-common/src/test/java/org/apache/hudi/utils/HoodieWriterClientTestHarness.java:
##########
@@ -165,71 +247,1183 @@ public HoodieWriteConfig.Builder
getConfigBuilder(String schemaStr, HoodieIndex.
return builder;
}
- public void assertPartitionMetadataForRecords(String basePath,
List<HoodieRecord> inputRecords,
- HoodieStorage storage) throws
IOException {
- Set<String> partitionPathSet = inputRecords.stream()
- .map(HoodieRecord::getPartitionPath)
- .collect(Collectors.toSet());
- assertPartitionMetadata(basePath,
partitionPathSet.stream().toArray(String[]::new), storage);
+ // Functional Interfaces for passing lambda and Hoodie Write API contexts
+
+ @FunctionalInterface
+ public interface Function2<R, T1, T2> {
Review Comment:
The order of types is different from BiFunction: here resulting type is
first, but in BiFunction it is the last. I did not add Function2, before
refactoring it was already in code and it was used a lot (>50 usages). And also
there is Function3 with resulting type in the first place. Function3 has >80
usages. And if we replace Function2 with BiFunction, we should also reorder
type params in Function3 declaration and usages for consistency.
Is it really necessary?
--
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]