Elbin Pallimalil
Elbin Pallimalil

Reputation: 33

How to identify if a field vector is dictionary encoded

We are implementing an Arrow Flight client in Java. Is there a standard way that Flight servers use to indicate that a particular Field Vector is dictionary encoded. We are trying to make the Flight client be compatible with different types of Flight server.

FieldVector vector = vectorSchemaRoot.getVector(columnIndex);
vector.getField().getDictionary()

I can see there is a method to get the dictionary encoding of a field. Can we assume that if the dictionary encoding is set, then the field is dictionary encoded and if dictionary encoding is null the field is not encoded?

Upvotes: 0

Views: 49

Answers (1)

li.davidm
li.davidm

Reputation: 12126

Dictionary encoding is part of the type, so yes, you would check the field metadata. There's nothing specific to Flight in this.

Upvotes: 1

Related Questions