Samyak2 commented on code in PR #7919: URL: https://github.com/apache/arrow-rs/pull/7919#discussion_r2203424175
########## parquet-variant-compute/src/variant_get.rs: ########## @@ -0,0 +1,265 @@ +use std::sync::Arc; + +use arrow::{ + array::{ + Array, ArrayRef, ArrowPrimitiveType, BinaryArray, PrimitiveArray, PrimitiveBuilder, + StructArray, + }, + compute::CastOptions, + datatypes::UInt64Type, + error::Result, +}; +use arrow_schema::{ArrowError, DataType, Field}; +use parquet_variant::Variant; + +use crate::utils::variant_from_struct_array; + +/// Returns an array with the specified path extracted from the variant values. +pub fn variant_get(input: &ArrayRef, options: GetOptions) -> Result<ArrayRef> { Review Comment: Got it. That makes sense. I'll clean up the PR. > but it will always potentially be needed in some cases (for example when the source arrays are not BinaryView) Not sure I follow. Perhaps worth a separate discussion in a follow-up issue. -- 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