Class VectorAccessors
For a required vector:
reader index --> hyper vector --> required vector
For a nullable vector:
reader index --> hyper vector --> nullable vector
nullable vector --> bits vector
--> values vector
For a repeated vector:
reader index --> hyper vector --> repeated vector
repeated vector --> offset vector
--> values vector
And so on. In each case, we must start with a top-level vector as indicated the row index, indirected through the SV4. That is done by the reader index. That points to a top-level vector in the hyper-vector.
Most of the vectors needed are nested. These inner vectors are not part of a hyper-vector list. Instead, we must get the top-level vector, then navigate down from that vector to the desired vector.
Sometimes the navigation is static (the "bits" vector for a nullable vector.) Other times, it is a bit more dynamic: a member of a map (given by index) or the member of a union (given by type.)
These accessors can be chained to handle deeply-nested structures such as an array of maps that contains a list of unions.
Because the navigation is required on every access, the use of hyper vectors is slow. Since hyper-vectors are seldom used, we optimize for the single-batch case by caching vectors at each stage. Thus, for the single-batch case, we use different accessor implementations. To keep the rest of the code simple, both the hyper and single batch cases use the same API, but they use entirely different implementations. The methods here choose the correct implementation for the single and hyper cases.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classVector accessor for RepeatedVector → data vectorstatic classVector accessor for RepeatedVector → offsets vectorstatic classVector accessor used by the column accessors to obtain the vector for each column value.static classVector accessor for ListVector → bits vectorstatic classstatic classVector accessor for AbstractMapVector → member vectorstatic classVector accessor for NullableVector → bits vectorstatic classVector accessor for NullableVector → values vectorstatic classstatic classstatic classVector accessor for UnionVector → data vectorstatic classVector accessor for UnionVector → type vectorstatic classVector accessor for VariableWidthVector → offsets vector -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic VectorAccessorarrayDataAccessor(VectorAccessor repeatedAccessor) static VectorAccessorarrayOffsetVectorAccessor(VectorAccessor repeatedAccessor) static VectorAccessorlistBitsAccessor(VectorAccessor nullableAccessor) static VectorAccessornullableBitsAccessor(VectorAccessor nullableAccessor) static VectorAccessornullableValuesAccessor(VectorAccessor nullableAccessor) static VectorAccessorvarWidthOffsetVectorAccessor(VectorAccessor varWidthAccessor)
-
Constructor Details
-
VectorAccessors
public VectorAccessors()
-
-
Method Details
-
arrayOffsetVectorAccessor
-
arrayDataAccessor
-
varWidthOffsetVectorAccessor
-
nullableValuesAccessor
-
nullableBitsAccessor
-
listBitsAccessor
-