Also referred to as
BaseVector. An abstract base class for vector types.
The underlying Data instance for this Vector.
The number of logical Vector children. Only applicable if the DataType of the Vector is one of the nested types (List, FixedSizeList, Struct, or Map).
The DataType that describes the elements in the Vector
typeId enum value of the
Number of elements in the
Offset to the first element in the underlying data.
Stride between successive elements in the the underlying data.
The number of elements in the underlying data buffer that constitute a single logical value for the given type. The stride for all DataTypes is 1 unless noted here:
Decimaltypes, the stride is 4.
Datetypes, the stride is 1 if the
unitis DateUnit.DAY, else 2.
Timetypes, the stride is 1 if
bitWidth <= 32, else 2.
FixedSizeListtypes, the stride is the
listSizeproperty of the
FixedSizeBinarytypes, the stride is the
byteWidthproperty of the
null values in this
Vector instance (
null values require a null map to be present).
Returns the name of the Vector
Returns the constructor of the underlying typed array for the values buffer as determined by this Vector's DataType.
Returns the underlying data buffer of the Vector, if applicable.
Returns the underlying typeIds buffer, if the Vector DataType is Union.
Returns the underlying validity bitmap buffer, if applicable.
Note: Since the validity bitmap is a Uint8Array of bits, it is not sliced when you call
vector.slice(). Instead, the
vector.offset property is updated on the returned Vector. Therefore, you must factor
vector.offset into the bit position if you wish to slice or read the null positions manually. See the implementation of
BaseVector.isValid() for an example of how this is done.
Returns the underlying valueOffsets buffer, if applicable. Only the List, Utf8, Binary, and DenseUnion DataTypes will have valueOffsets.
Returns a clone of the current Vector, using the supplied Data and optional children for the new clone. Does not copy any underlying buffers.
Chunked vector that concatenates this Vector with the supplied other Vectors. Other Vectors must be the same type as this Vector.
Returns a zero-copy slice of this Vector. The begin and end arguments are handled the same way as JS'
Array.prototype.slice; they are clamped between 0 and
vector.length and wrap around when negative, e.g.
slice(-1, 5) or
Returns whether the supplied index is valid in the underlying validity bitmap.
Returns the inner Vector child if the DataType is one of the nested types (Map or Struct).
Returns a dense JS Array of the Vector values, with null sentinels in-place.