morrySnow commented on code in PR #18257:
URL: https://github.com/apache/doris/pull/18257#discussion_r1263363784


##########
fe/fe-core/src/main/java/org/apache/doris/nereids/rules/expression/rules/FunctionBinder.java:
##########
@@ -86,7 +88,7 @@ public Expression visitUnboundFunction(UnboundFunction 
unboundFunction, Expressi
                 .map(e -> e.accept(this, 
context)).collect(Collectors.toList()));
 
         // bind function
-        FunctionRegistry functionRegistry = 
context.cascadesContext.getConnectContext().getFunctionRegistry();
+        FunctionRegistry functionRegistry = 
Env.getCurrentEnv().getFunctionRegistry();

Review Comment:
   why replace will call function binder's method?



##########
fe/fe-core/src/main/java/org/apache/doris/nereids/rules/expression/rules/FunctionBinder.java:
##########
@@ -86,7 +88,7 @@ public Expression visitUnboundFunction(UnboundFunction 
unboundFunction, Expressi
                 .map(e -> e.accept(this, 
context)).collect(Collectors.toList()));
 
         // bind function
-        FunctionRegistry functionRegistry = 
context.cascadesContext.getConnectContext().getFunctionRegistry();
+        FunctionRegistry functionRegistry = 
Env.getCurrentEnv().getFunctionRegistry();

Review Comment:
   if we must use Env.getCurrentEnv(), please add comment to explain it



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