This is an automated email from the ASF dual-hosted git repository.

eldenmoon pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/master by this push:
     new 65a0d3dc454 [fix](nereids)should always call visitBoundFunction first 
when binding ElementAt function (#30469)
65a0d3dc454 is described below

commit 65a0d3dc454ebe5989523e8174e731d664d6da06
Author: starocean999 <40539150+starocean...@users.noreply.github.com>
AuthorDate: Sun Jan 28 00:23:22 2024 +0800

    [fix](nereids)should always call visitBoundFunction first when binding 
ElementAt function (#30469)
---
 .../apache/doris/nereids/rules/expression/rules/FunctionBinder.java  | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git 
a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/expression/rules/FunctionBinder.java
 
b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/expression/rules/FunctionBinder.java
index 76d3b6748e1..f60f38f7649 100644
--- 
a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/expression/rules/FunctionBinder.java
+++ 
b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/expression/rules/FunctionBinder.java
@@ -200,7 +200,8 @@ public class FunctionBinder extends 
AbstractExpressionRewriteRule {
 
     @Override
     public Expression visitElementAt(ElementAt elementAt, 
ExpressionRewriteContext context) {
-        if (PushDownToProjectionFunction.validToPushDown(elementAt)) {
+        Expression boundFunction = visitBoundFunction(elementAt, context);
+        if (PushDownToProjectionFunction.validToPushDown(boundFunction)) {
             if (ConnectContext.get() != null
                     && ConnectContext.get().getSessionVariable() != null
                     && 
!ConnectContext.get().getSessionVariable().isEnableRewriteElementAtToSlot()) {
@@ -214,7 +215,7 @@ public class FunctionBinder extends 
AbstractExpressionRewriteRule {
             // rewrite to slot and bound this slot
             return ElementAtToSlot.rewriteToSlot(elementAt, (SlotReference) 
slot);
         }
-        return visitBoundFunction(elementAt, context);
+        return boundFunction;
     }
 
     /**


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to