github-actions[bot] commented on code in PR #63366:
URL: https://github.com/apache/doris/pull/63366#discussion_r3397293736


##########
fe/fe-core/src/main/java/org/apache/doris/datasource/tvf/source/TVFScanNode.java:
##########
@@ -212,4 +217,10 @@ protected void setScanParams(TFileRangeDesc rangeDesc, 
Split split) {
     public int getNumInstances() {
         return scanRangeLocations.size();
     }
+
+    @Override
+    public Pair<PlanNode, LocalExchangeType> 
enforceAndDeriveLocalExchange(PlanTranslatorContext translatorContext,
+            PlanNode parent, LocalExchangeTypeRequire parentRequire) {
+        return Pair.of(this, LocalExchangeType.PASSTHROUGH);
+    }

Review Comment:
   `PASSTHROUGH` here says the scan already satisfies a parent 
`requirePassthrough()`, so `PlanNode.enforceRequire()` will not insert a 
`LocalExchangeNode(PASSTHROUGH)` above this TVF scan. A scan leaf has not done 
that rebalance; BE local-exchange planning treats non-hash requirements as 
always needing an exchange (`Pipeline::need_to_local_exchange()` returns true 
for non-hash target types). A concrete miss is `TVFScan -> merge sort` / 
`AssertNumRows` / `TableFunction`, or a broadcast-join probe with 
force-passthrough: FE-planned mode skips the local exchange while BE-planned 
mode would insert it, leaving the parent on the scan original task 
distribution. Please report `NOOP` here, or actually wrap the scan in a 
`LocalExchangeNode` when a parent asks for passthrough, so non-hash 
requirements are not silently satisfied by a leaf.
   
   ```suggestion
           return Pair.of(this, LocalExchangeType.NOOP);
   ```



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