scovich commented on code in PR #8241:
URL: https://github.com/apache/arrow-rs/pull/8241#discussion_r2373253423


##########
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:
   I asked some variant spec folks a while back, and in their (parquet storage) 
world, arrays with SQL NULL elements are simply not a thing, and so variant 
code should not even need to think about it. For 
[example](https://github.com/apache/parquet-format/pull/520#discussion_r2298998580):
   > it doesn't really make sense to talk about `an array with (SQL) nullable 
elements`. The array must already be a Variant array, and the Variant binary 
spec has no way to represent SQL NULL as an array element, only Variant `null`.
   
   Meanwhile, IMO it's perfectly fine for _arrow_ to take a position that NULL 
values in an arrow list array will produce `Variant::NULL` values if converted 
to variant.



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