924060929 commented on code in PR #67490:
URL: https://github.com/apache/doris/pull/67490#discussion_r3923631016
##########
fe/fe-core/src/main/java/org/apache/doris/planner/PlanNode.java:
##########
@@ -1069,7 +1069,10 @@ protected Pair<PlanNode, LocalExchangeType>
enforceRequire(
// node's sink, e.g. Exchange is in AGG_Sink pipeline).
// For non-splitting operators (shouldReset=false, e.g. streaming AGG):
// Inherit parent's serial flag + this node's own.
- boolean inheritedSerial = shouldResetSerialFlagForChild(childIndex)
+ boolean startsNewPipeline = shouldResetSerialFlagForChild(childIndex);
+ boolean currentPipelineSerial =
translatorContext.hasSerialAncestorInPipeline(this)
+ || isSerialOperatorOnBe(translatorContext.getConnectContext());
Review Comment:
the `isSerialOperatorOnBe(translatorContext.getConnectContext())` invoke
twice in this function, you should reuse the result and not compute it twice:
```java
Supplier<Boolean> isSerialOperatorOnBe = Suppliers.memoize(() ->
isSerialOperatorOnBe(translatorContext.getConnectContext()));
boolean currentPipelineSerial =
translatorContext.hasSerialAncestorInPipeline(this)
|| isSerialOperatorOnBe;
boolean childHasSerialAncestor = inheritedSerial
|| isSerialOperatorOnBe;
```
--
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]