wjones127 commented on code in PR #5081:
URL: https://github.com/apache/arrow-rs/pull/5081#discussion_r1396639493
##########
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:
I don't love this behavior, but I'm not sure a better way in the current
framework. Personally, I don't think I ever care to use `safe=True` here. But
I'd also like it to not be too shocking to those that do use it.
--
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]