JingsongLi commented on code in PR #3233: URL: https://github.com/apache/paimon/pull/3233#discussion_r1583013682
########## paimon-flink/paimon-flink-common/src/main/java/org/apache/paimon/flink/source/operator/MultiTablesBatchCompactorSourceFunction.java: ########## @@ -81,8 +83,19 @@ public void run(SourceContext<Tuple2<Split, String>> ctx) throws Exception { for (Map.Entry<Identifier, StreamTableScan> entry : scansMap.entrySet()) { Identifier identifier = entry.getKey(); StreamTableScan scan = entry.getValue(); + int maxLevel = ((InnerStreamTableScanImpl) scan).options().numLevels() - 1; splits.addAll( scan.plan().splits().stream() + .filter( + split -> { + DataSplit dataSplit = (DataSplit) split; + if (dataSplit.dataFiles().isEmpty()) { + return false; + } + return dataSplit.dataFiles().stream() + .map(DataFileMeta::level) + .anyMatch(level -> level != maxLevel); Review Comment: Why filter maxLevel? -- 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: issues-unsubscr...@paimon.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org