Skip to content

Commit

Permalink
ARROW-1347: [JAVA] return consistent child field name for List vectors
Browse files Browse the repository at this point in the history
  • Loading branch information
StevenMPhillips authored and BryanCutler committed Sep 20, 2017
1 parent 975f32b commit 2923a45
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
import org.apache.arrow.vector.schema.ArrowFieldNode;
import org.apache.arrow.vector.types.Types.MinorType;
import org.apache.arrow.vector.types.pojo.ArrowType;
import org.apache.arrow.vector.types.pojo.ArrowType.Null;
import org.apache.arrow.vector.types.pojo.DictionaryEncoding;
import org.apache.arrow.vector.types.pojo.Field;
import org.apache.arrow.vector.types.pojo.FieldType;
Expand Down Expand Up @@ -323,6 +324,9 @@ public int getBufferSize() {

@Override
public Field getField() {
if (getDataVector() == ZeroVector.INSTANCE) {
return new Field(name, fieldType, ImmutableList.of(new Field(DATA_VECTOR_NAME, FieldType.nullable(Null.INSTANCE), null)));
}
return new Field(name, fieldType, ImmutableList.of(getDataVector().getField()));
}

Expand Down

0 comments on commit 2923a45

Please sign in to comment.