liukun4515 commented on a change in pull request #1607:
URL: https://github.com/apache/arrow-datafusion/pull/1607#discussion_r788294707
##########
File path: datafusion/src/physical_plan/coercion_rule/binary_rule.rs
##########
@@ -293,14 +289,192 @@ fn coercion_decimal_mathematics_type(
}
}
+/// Determine if a DataType is signed numeric or not
+pub fn is_signed_numeric(dt: &DataType) -> bool {
Review comment:
https://github.com/apache/arrow-datafusion/issues/1613
##########
File path: datafusion/src/physical_plan/coercion_rule/binary_rule.rs
##########
@@ -293,14 +289,192 @@ fn coercion_decimal_mathematics_type(
}
}
+/// Determine if a DataType is signed numeric or not
+pub fn is_signed_numeric(dt: &DataType) -> bool {
+ matches!(
+ dt,
+ DataType::Int8
+ | DataType::Int16
+ | DataType::Int32
+ | DataType::Int64
+ | DataType::Float16
+ | DataType::Float32
+ | DataType::Float64
+ | DataType::Decimal(_, _)
+ )
+}
+
+/// Determine if a DataType is numeric or not
+pub fn is_numeric(dt: &DataType) -> bool {
Review comment:
https://github.com/apache/arrow-datafusion/issues/1613
--
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]