Hi

I'm confused by NullVector::getField.
It is a FieldVector so, according to the javadoc, should be "A vector 
corresponding to a Field in the schema."
However, getField unconditionally returns a new field - with the name "$data$" 
(which is clearly intentional: https://github.com/apache/arrow/pull/1193). It 
does not return the field in the schema that was used to create the vector.
(there is some indication in that PR that NullVector/ZeroVector is only ever 
supposed to be an inner vector?)
I have noticed this because for some types, pyarrow serialises fields of an 
empty data table to null-type Arrow fields 
(https://github.com/apache/arrow/issues/2110). When deserializing in Java, the 
original schema field names are not contained in the names of 
VectorSchemaRoot::getFieldVectors (and instead the "$data$" names are exposed).

Is this a bug?

Best
Matt



(p.s. I emailed u...@arrow.apache.org <mailto:u...@arrow.apache.org> using the 
web GUI but it still hasn’t shown up, so am trying this instead)

Reply via email to