wjones127 commented on code in PR #5081:
URL: https://github.com/apache/arrow-rs/pull/5081#discussion_r1397574108


##########
arrow-cast/src/cast.rs:
##########
@@ -279,6 +282,10 @@ pub fn can_cast_types(from_type: &DataType, to_type: 
&DataType) -> bool {
 ///   in integer casts return null
 /// * Numeric to boolean: 0 returns `false`, any other value returns `true`
 /// * List to List: the underlying data type is cast
+/// * List to FixedSizeList: the underlying data type is cast. If the list 
size is different
+///   than the FixedSizeList size and safe casting is requested, then lists are
+///   truncated or filled will some value to achieve the requested size. If 
the output
+///   field is nullable, the fill value is null, otherwise it is the first 
value.

Review Comment:
   Ah I hadn't thought about having the list itself just making anything 
improperly sized be null. That seems like it would be reasonable behavior. We 
can ignore truncation, I don't think we want that.



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