Remove SchemaBuilder
dependency from StructArray
constructors
#6138
Labels
arrow
Changes to the arrow crate
SchemaBuilder
dependency from StructArray
constructors
#6138
Summary
Three functions in
array/struct_array.rs
useSchemaBuilder
in the course of building aStructArray
. However, in all cases they just extract the fields from the schema and throw out the empty metadata. It seems it would be more straightforward to just collect the fields into aVec
directly.I had considered that this might be intentional, perhaps in case the implementation of
SchemaBuilder
is ever changed, for example to collect into something other than aVec
. If so, I'd appreciate a little more context because as it stands this abstraction seems more confusing than useful.Proposal
In the three mentioned functions, collect into a
Vec<Field>
directly and then.into()
it into aFields
. This eliminates the dependency onSchemaBuilder
, making the code easier to read in isolation.The text was updated successfully, but these errors were encountered: