alamb commented on code in PR #8673:
URL: https://github.com/apache/arrow-rs/pull/8673#discussion_r2456282394
##########
parquet-variant-compute/src/variant_array.rs:
##########
@@ -708,6 +730,9 @@ impl From<ShreddedVariantFieldArray> for StructArray {
}
}
+pub type TypedValue = (FieldRef, ArrayRef);
Review Comment:
This combination of an Array (which only has a `DataType`) and a `Field`
(which has the DataType and metadata information) has come up recently upstream
as @paleolimbot is working extension types through DataFusion as well in
- https://github.com/apache/datafusion/pull/17986
We are still looking for a good pattern to use.
I wonder if something like this is too crazy
```rust
/// A value that has associated Arrow field infomration
struct TypedValue<T> {
value: T, // could be ArrayRef, could be ScalarValue
field: FieldRef,
}
```
🤔
##########
parquet-variant-compute/src/shred_variant.rs:
##########
@@ -400,6 +400,7 @@ mod tests {
let typed_value_field = result
.typed_value_field()
.unwrap()
+ .1
Review Comment:
yes , please, let's return a type with real field names and documentation
--
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]