alamb commented on code in PR #8201: URL: https://github.com/apache/arrow-rs/pull/8201#discussion_r2291824993
########## parquet-variant-compute/src/cast_to_variant.rs: ########## @@ -535,6 +534,70 @@ pub fn cast_to_variant(input: &dyn Array) -> Result<VariantArray, ArrowError> { builder.append_variant(value); } } + DataType::List(_) => { + let list_array = input.as_list::<i32>(); + let values_variant_array = cast_to_variant(list_array.values().as_ref())?; Review Comment: as a future optimization, we could avoid casting the entire values to variant if the list only refers to a subset For example, if the list array is sliced, then `start` will not be zero, so we could avoid casting the all the elements of the list The same comment applies below -- 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: github-unsubscr...@arrow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org