You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "mingmwang (via GitHub)" <gi...@apache.org> on 2023/05/11 06:13:16 UTC

[GitHub] [arrow-datafusion] mingmwang commented on a diff in pull request #6331: refine decimal multiply, avoid cast to wider type

mingmwang commented on code in PR #6331:
URL: https://github.com/apache/arrow-datafusion/pull/6331#discussion_r1190679321


##########
datafusion/expr/src/type_coercion/binary.rs:
##########
@@ -514,7 +514,7 @@ pub fn coercion_decimal_mathematics_type(
                 left_decimal_type,
                 right_decimal_type,
             ),
-            Operator::Multiply | Operator::Divide | Operator::Modulo => {
+            Operator::Divide | Operator::Modulo => {
                 get_wider_decimal_type(left_decimal_type, right_decimal_type)
             }

Review Comment:
   Why decimal multiply decimal need to cast to a common wider type ? I do not change the get result type logic.
   I think in the latest SparkSQL,  for decimal multiply, they do not cast to common wider type either.



-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org