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


##########
fe/fe-core/src/main/java/org/apache/doris/planner/ScanNode.java:
##########
@@ -129,6 +131,32 @@ protected List<Column> getColumns() {
         return columns;
     }
 
+    /**
+     * Split this scan node's ranges into the requested number of fragment 
instances.
+     * Subclasses may keep related ranges in the same partition by overriding 
this method.
+     */
+    public List<List<Integer>> splitScanRangeParamsByInstance(
+            List<TScanRangeParams> scanRangeParams, int expectedInstanceNum) {
+        List<Integer> rangeIndexes = IntStream.range(0, 
scanRangeParams.size()).boxed().collect(Collectors.toList());

Review Comment:
   Fixed in 62fbf3d96ac. The default ScanNode/legacy path now keeps the 
previous direct ListUtil.splitBySize over range objects, and Nereids defaults 
to the original ScanRanges.split(instanceNum). Index grouping and 
rematerialization are only used when FileQueryScanNode has a non-empty 
query-local file-affinity map. This removes the extra boxing/traversals for 
OlapScanNode and other scans without affinity work. Verified with 
UnassignedScanSingleOlapTableJobTest (3/3) and FileQueryScanNodeTest (15/15).



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