924060929 commented on code in PR #66710:
URL: https://github.com/apache/doris/pull/66710#discussion_r3780926955
##########
fe/fe-core/src/main/java/org/apache/doris/datasource/scan/FileQueryScanNode.java:
##########
@@ -472,7 +485,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 dc64bdec83442efd41c4ccae45f4db88722c284c. The generic instance
splitter now collects affinity keys first and returns the original round-robin
partition before invoking the weight callback when no key exists. Added
production-shaped split-source-only ranges with ranges unset, covering both the
legacy materializer and Nereids DefaultScanSource path. FileQueryScanNodeTest
passes 15/15, FE Checkstyle has 0 violations, and the full FE build succeeds.
--
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]