yihua commented on code in PR #7642:
URL: https://github.com/apache/hudi/pull/7642#discussion_r1087304471


##########
hudi-client/hudi-spark-client/src/main/java/org/apache/hudi/data/HoodieJavaRDD.java:
##########
@@ -119,7 +118,16 @@ public <O> HoodieData<O> 
mapPartitions(SerializableFunction<Iterator<T>, Iterato
 
   @Override
   public <O> HoodieData<O> flatMap(SerializableFunction<T, Iterator<O>> func) {
-    return HoodieJavaRDD.of(rddData.flatMap(e -> func.apply(e)));
+    // NOTE: Unrolling this lambda into a method reference results in 
[[ClassCastException]]
+    //       due to weird interop b/w Scala and Java
+    return HoodieJavaRDD.of(rddData.flatMap(x -> func.apply(x)));
+  }

Review Comment:
   Yeah, let's make the code the same as before.  We can keep the note for 
reference.



-- 
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: commits-unsubscr...@hudi.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to