friendlymatthew commented on code in PR #8673:
URL: https://github.com/apache/arrow-rs/pull/8673#discussion_r2487391058
##########
parquet-variant-compute/src/variant_array.rs:
##########
@@ -885,13 +937,19 @@ impl StructArrayBuilder {
}
/// Add an array to this struct array as a field with the specified name.
- pub fn with_field(mut self, field_name: &str, array: ArrayRef, nullable:
bool) -> Self {
+ pub fn with_column(mut self, field_name: &str, array: ArrayRef, nullable:
bool) -> Self {
let field = Field::new(field_name, array.data_type().clone(),
nullable);
self.fields.push(Arc::new(field));
self.arrays.push(array);
self
}
+ pub fn with_field(mut self, field: FieldRef, array: ArrayRef) -> Self {
+ self.fields.push(field);
+ self.arrays.push(array);
+ self
+ }
+
Review Comment:
Thanks @klion26, I like that as well
--
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]