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


##########
cpp/src/arrow/compute/expression.cc:
##########
@@ -536,14 +566,21 @@ Result<Expression> BindNonRecursive(Expression::Call 
call, bool insert_implicit_
   std::vector<TypeHolder> types = GetTypes(call.arguments);
   ARROW_ASSIGN_OR_RAISE(call.function, GetFunction(call, exec_context));
 
-  // First try and bind exactly
-  Result<const Kernel*> maybe_exact_match = 
call.function->DispatchExact(types);
-  if (maybe_exact_match.ok()) {
-    call.kernel = *maybe_exact_match;
-  } else {
-    if (!insert_implicit_casts) {
-      return maybe_exact_match.status();
+  bool maybe_need_dispatch_best = IsNeedDispatchBest(types, 
call.function_name);

Review Comment:
   Yes, i have thought the changes here, it's much clear.
   But in fact, this is indeed a special case. The calculation operation of 
decimal type must enter DispatchBest before it can be cast implicitly :(. 
Changes here only return a invalid status.



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