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
Modifier and TypeClassDescriptionstatic class
Vector accessor for RepeatedVector → data vectorstatic class
Vector accessor for RepeatedVector → offsets vectorstatic class
Vector accessor used by the column accessors to obtain the vector for each column value.static class
Vector accessor for ListVector → bits vectorstatic class
static class
Vector accessor for AbstractMapVector → member vectorstatic class
Vector accessor for NullableVector → bits vectorstatic class
Vector accessor for NullableVector → values vectorstatic class
static class
static class
Vector accessor for UnionVector → data vectorstatic class
Vector accessor for UnionVector → type vectorstatic class
Vector accessor for VariableWidthVector → offsets vector -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic VectorAccessor
arrayDataAccessor
(VectorAccessor repeatedAccessor) static VectorAccessor
arrayOffsetVectorAccessor
(VectorAccessor repeatedAccessor) static VectorAccessor
listBitsAccessor
(VectorAccessor nullableAccessor) static VectorAccessor
nullableBitsAccessor
(VectorAccessor nullableAccessor) static VectorAccessor
nullableValuesAccessor
(VectorAccessor nullableAccessor) static VectorAccessor
varWidthOffsetVectorAccessor
(VectorAccessor varWidthAccessor)
-
Constructor Details
-
VectorAccessors
public VectorAccessors()
-
-
Method Details
-
arrayOffsetVectorAccessor
-
arrayDataAccessor
-
varWidthOffsetVectorAccessor
-
nullableValuesAccessor
-
nullableBitsAccessor
-
listBitsAccessor
-