Expand description
Builders for Vortex arrays.
Every logical type in Vortex has a canonical (uncompressed) in-memory encoding. This module provides pre-allocated builders to construct new canonical arrays.
§Example:
use vortex_array::builders::{builder_with_capacity, ArrayBuilder};
use vortex_dtype::{DType, Nullability};
// Create a new builder for string data.
let mut builder = builder_with_capacity(&DType::Utf8(Nullability::NonNullable), 4);
builder.append_scalar(&"a".into()).unwrap();
builder.append_scalar(&"b".into()).unwrap();
builder.append_scalar(&"c".into()).unwrap();
builder.append_scalar(&"d".into()).unwrap();
let strings = builder.finish();
assert_eq!(strings.scalar_at(0), "a".into());
assert_eq!(strings.scalar_at(1), "b".into());
assert_eq!(strings.scalar_at(2), "c".into());
assert_eq!(strings.scalar_at(3), "d".into());
Structs§
- Bool
Builder - Decimal
Builder - The builder for building a
DecimalArray
. - Extension
Builder - The builder for building a
ExtensionArray
. - Fixed
Size List Builder - The builder for building a
FixedSizeListArray
. - List
Builder - The builder for building a
ListArray
, parametrized by thePType
of the offsets buffer. - Null
Builder - The builder for building a
NullArray
. - Primitive
Builder - The builder for building a
PrimitiveArray
, parametrized by thePType
. - Struct
Builder - The builder for building a
StructArray
. - Uninit
Range - A range of uninitialized values in the primitive builder that can be filled.
- VarBin
View Builder - The builder for building a
VarBinViewArray
.
Constants§
- DEFAULT_
BUILDER_ CAPACITY - The default capacity for builders.
Traits§
Functions§
- builder_
with_ capacity - Construct a new canonical builder for the given
DType
.