github-actions[bot] commented on code in PR #62804:
URL: https://github.com/apache/doris/pull/62804#discussion_r3146343058
##########
fe/fe-core/src/main/java/org/apache/doris/datasource/FileQueryScanNode.java:
##########
@@ -410,16 +410,21 @@ public void createScanRangeLocations() throws
UserException {
if (inputSplits.isEmpty() && !isFileStreamType()) {
return;
}
+ Set<String> distinctFilePaths = new HashSet<>();
Multimap<Backend, Split> assignment =
backendPolicy.computeScanRangeAssignment(inputSplits);
for (Backend backend : assignment.keySet()) {
Collection<Split> splits = assignment.get(backend);
for (Split split : splits) {
scanRangeLocations.add(splitToScanRange(backend,
locationProperties, split, pathPartitionKeys,
admissionResult));
totalFileSize += split.getLength();
+ if (split instanceof FileSplit) {
+ distinctFilePaths.add(((FileSplit)
split).getPathString());
+ }
}
scanBackendIds.add(backend.getId());
}
Review Comment:
This only fixes the eager-split branch. When `isBatchMode()` is true we
never set `selectedFileNum`, so
`InsertIntoTableCommand.applyInsertPlanStatistic()` falls back to
`selectedSplitNum`. For large Hive/Hudi/Iceberg/MaxCompute inserts that can
enter batch mode, `numApproximateSplits()` is not the physical file count.
Iceberg even returns `partitionMapInfos.size()`. So `LoadStatistic.FileNumber`
is still wrong for those `INSERT INTO ... SELECT` jobs; the batch-mode path
needs to carry an exact file count too.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]