Jefffrey commented on code in PR #11043:
URL: https://github.com/apache/arrow-rs/pull/11043#discussion_r4011900378
##########
arrow-cast/src/cast/mod.rs:
##########
@@ -876,11 +876,21 @@ pub fn cast_with_options(
}
let array = array.as_fixed_size_list();
let values = cast_with_options(array.values(),
list_to.data_type(), cast_options)?;
+ let nulls = array.nulls().cloned();
+ if *size_from == 0 && nulls.is_none() {
+ return Ok(Arc::new(FixedSizeListArray::try_new_with_length(
+ list_to.clone(),
+ *size_from,
Review Comment:
instead of branching what about just using `try_new_with_length`
unconditionally?
--
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]