ZhangHuiGui commented on code in PR #40200:
URL: https://github.com/apache/arrow/pull/40200#discussion_r1510002479


##########
cpp/src/arrow/compute/expression_internal.h:
##########
@@ -278,8 +278,11 @@ struct FlattenedAssociativeChain {
 
 inline Result<std::shared_ptr<compute::Function>> GetFunction(
     const Expression::Call& call, compute::ExecContext* exec_context) {
-  if (call.function_name != "cast") {
-    return exec_context->func_registry()->GetFunction(call.function_name);
+  auto input_call_function =
+      exec_context->func_registry()->GetFunction(call.function_name);
+  auto cast_function = exec_context->func_registry()->GetFunction("cast");
+  if (input_call_function != cast_function) {
+    return input_call_function;

Review Comment:
   Thanks for your suggestion, it's much better than before.



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

Reply via email to