yihua commented on code in PR #6669: URL: https://github.com/apache/hudi/pull/6669#discussion_r973522477
########## 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: No worries. I'll merge this PR once CI passes. Thanks for the fix! -- 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