Samyak2 commented on code in PR #7919:
URL: https://github.com/apache/arrow-rs/pull/7919#discussion_r2203143325


##########
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:
   That sounds like the "row-based" approach I mentioned in the description. 
The reason I did it this way: it looks more like a "columnar" approach. I 
assumed perf would be better. Perhaps we should benchmark both the approaches? 
I'll see what I can do



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

Reply via email to