github-actions[bot] commented on code in PR #69938: URL: https://github.com/apache/doris/pull/69938#discussion_r4488919277
########## fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/PushDownProject.java: ########## @@ -23,11 +23,15 @@ import org.apache.doris.nereids.rules.Rule; import org.apache.doris.nereids.rules.RuleType; import org.apache.doris.nereids.trees.expressions.Alias; +import org.apache.doris.nereids.trees.expressions.ArrayItemReference; Review Comment: [P2] Cache or combine free-lambda checks across nested candidates `hasFreeLambdaArgument` is recomputed for every nested `PreferPushDownProject` node. A valid linear-size expression can make this quadratic: build `F_i = array_map(x_i -> x_i, F_(i+1))` over an outer lambda parameter, and make the outer lambda body also reference an array from the other join child so the outer candidate cannot be pushed. Each nested `ArrayMap` then has no ordinary `getInputSlots()` (`ArrayItemSlot` is excluded), passes the child-output check, and is rejected only after scanning its entire suffix. At the 3000 expression-depth limit this is roughly 180k-280k recursive checks for about 600-750 layers, depending on the witness shape. Please carry a shared free-slot summary or cache rejected eligibility so nested candidates do not rescan the same suffix. -- 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]
