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


##########
hudi-flink-datasource/hudi-flink/src/main/java/org/apache/hudi/table/format/cow/CopyOnWriteInputFormat.java:
##########
@@ -214,13 +213,7 @@ public FileInputSplit[] createInputSplits(int 
minNumSplits) throws IOException {
 
         // get the block locations and make sure they are in order with 
respect to their offset
         final BlockLocation[] blocks = fs.getFileBlockLocations(file, 0, len);
-        Arrays.sort(blocks, new Comparator<BlockLocation>() {
-          @Override
-          public int compare(BlockLocation o1, BlockLocation o2) {
-            long diff = o1.getLength() - o2.getOffset();
-            return Long.compare(diff, 0L);
-          }
-        });
+        Arrays.sort(blocks, CopyOnWriteInputFormat::compareBlockLocations);
 

Review Comment:
   @voonhous I don't see the change of using `comparingLong` in the latest 
commit.  Have you pushed your changes?



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