vinothchandar commented on a change in pull request #2650:
URL: https://github.com/apache/hudi/pull/2650#discussion_r593856693



##########
File path: 
hudi-client/hudi-flink-client/src/main/java/org/apache/hudi/index/simple/FlinkHoodieSimpleIndex.java
##########
@@ -135,8 +133,8 @@ public boolean isImplicitWithStorage() {
         context.map(latestBaseFiles, partitionPathBaseFile -> new 
HoodieKeyLocationFetchHandle<>(config, hoodieTable, partitionPathBaseFile), 
parallelism);
     Map<HoodieKey, HoodieRecordLocation> recordLocations = new HashMap<>();
     hoodieKeyLocationFetchHandles.stream()
-        .flatMap(handle -> Lists.newArrayList(handle.locations()).stream())
-        .forEach(x -> x.forEach(y -> recordLocations.put(y.getKey(), 
y.getRight())));
+        .flatMap(handle -> handle.locations())

Review comment:
       seems orthgonal. but agree with the changes

##########
File path: hudi-common/src/main/avro/HoodieRestoreMetadata.avsc
##########
@@ -38,7 +38,6 @@
      /* overlaps with 'instantsToRollback' field. Adding this to track action 
type for all the instants being rolled back. */
      {
        "name": "restoreInstantInfo",
-       "default": null,

Review comment:
       could you help me understand why the default value was removed?

##########
File path: hudi-common/src/main/avro/HoodieClusteringPlan.avsc
##########
@@ -30,7 +30,7 @@
     },
     {
        "name":"strategy",
-       "type":["HoodieClusteringStrategy", "null"],
+       "type":["null", "HoodieClusteringStrategy"],

Review comment:
       oops. cc @satishkotha @n3nash  you may also want to look at this. 
default values work only based on the type of the first element in an union 
IIUC. 

##########
File path: hudi-common/src/main/avro/HoodieRequestedReplaceMetadata.avsc
##########
@@ -23,11 +23,11 @@
      {
          "name":"operationType",
          "type":["null", "string"],
-         "default": ""
+         "default": null

Review comment:
       same here
   




----------------------------------------------------------------
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]


Reply via email to