You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/11/02 09:22:17 UTC

[GitHub] [arrow-datafusion] liukun4515 commented on a diff in pull request #4038: Fix Decimal and Floating type coerce rule

liukun4515 commented on code in PR #4038:
URL: https://github.com/apache/arrow-datafusion/pull/4038#discussion_r1011451716


##########
datafusion/expr/src/type_coercion/binary.rs:
##########
@@ -333,6 +333,12 @@ fn mathematics_numerical_coercion(
         (Null, dec_type @ Decimal128(_, _)) | (dec_type @ Decimal128(_, _), Null) => {
             Some(dec_type.clone())
         }
+        (Decimal128(_, _), Float32 | Float64) => {
+            Some(Float64)
+        }
+        (Float32 | Float64, Decimal128(_, _)) => {
+            Some(Float64)
+        }

Review Comment:
   > I think we need to add the same in `comparison_binary_numeric_coercion` and that helps towards q6
   
   the rule between arithmetic op and logical op may be different.



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