924060929 commented on code in PR #66711:
URL: https://github.com/apache/doris/pull/66711#discussion_r3780927767


##########
fe/fe-core/src/main/java/org/apache/doris/datasource/FileQueryScanNode.java:
##########
@@ -492,7 +504,31 @@ public void createScanRangeLocations() throws 
UserException {
         }
     }
 
-    private TScanRangeLocations splitToScanRange(
+    protected boolean supportsPerRangeFileAffinity() {
+        return false;
+    }
+
+    @Override
+    public List<List<Integer>> splitScanRangeParamsByInstance(
+            List<TScanRangeParams> scanRangeParams, int expectedInstanceNum) {
+        return AffinityAwareInstanceSplitter.split(scanRangeParams, 
expectedInstanceNum,
+                param -> 
Optional.ofNullable(scanRangeToFileAffinityKey.get(param.getScanRange())),
+                this::getScanRangeSize);
+    }
+
+    private long getScanRangeSize(TScanRangeParams param) {
+        long size = 0;
+        for (TFileRangeDesc range : 
param.getScanRange().getExtScanRange().getFileScanRange().getRanges()) {

Review Comment:
   Fixed in 124464acaa4b6ab187179ed330df8644c30ebcf6. The generic splitter now 
checks all affinity keys and returns the original round-robin partition before 
evaluating weights when no key is present. Added split-source-only ranges with 
ranges unset and exercised both legacy and Nereids instance planning. FE 
Checkstyle passes with 0 violations; branch-4.1 unit tests remain delegated to 
remote CI because this isolated worktree has no initialized thirdparty 
toolchain.



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

Reply via email to