Jefffrey commented on code in PR #9198:
URL: https://github.com/apache/arrow-rs/pull/9198#discussion_r2696361705


##########
arrow-cast/src/cast/mod.rs:
##########
@@ -178,19 +179,25 @@ pub fn can_cast_types(from_type: &DataType, to_type: 
&DataType) -> bool {
         ) => true,
         // signed numeric to decimal
         (
-            Int8 | Int16 | Int32 | Int64 | Float32 | Float64,
+            Int8 | Int16 | Int32 | Int64 | Float16 | Float32 | Float64,
             Decimal32(_, _) | Decimal64(_, _) | Decimal128(_, _) | 
Decimal256(_, _),
         ) => true,
+
+        // decimal to null
+        (Decimal32(_, _) | Decimal64(_, _) | Decimal128(_, _) | Decimal256(_, 
_), Null) => true,

Review Comment:
   These changes don't seem necessary?



##########
arrow-schema/src/datatype.rs:
##########
@@ -567,8 +567,10 @@ impl DataType {
     /// Returns true if this type is floating: (Float*).
     #[inline]
     pub fn is_floating(&self) -> bool {
-        use DataType::*;
-        matches!(self, Float16 | Float32 | Float64)
+        matches!(

Review Comment:
   Same here



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