scovich commented on code in PR #8241:
URL: https://github.com/apache/arrow-rs/pull/8241#discussion_r2373188034
##########
parquet-variant-compute/src/cast_to_variant.rs:
##########
@@ -1258,6 +1258,132 @@ mod tests {
);
}
+ #[test]
+ fn test_cast_to_variant_list_view() {
+ // Create a ListViewArray with some data
+ let mut builder = ListViewBuilder::new(Int32Array::builder(0));
+ builder.append_value(&Int32Array::from(vec![Some(0), Some(1),
Some(2)]));
+ builder.append_value(&Int32Array::from(vec![Some(3), Some(4)]));
Review Comment:
Technically, variant array elements are non-nullable. So any (SQL) NULL must
be converted to `Variant::Null` before adding it to the array -- this is true
regardless of shredding.
Note: It almost certainly makes sense to convert NULL values from an arrow
array with nullable elements into `Variant::Null` values when converting to
variant. So the resulting code might be the same either way. But it might still
be helpful to understand the distinction (code comments, unstated assumptions,
etc)
--
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]