◆ VectorListBuffer() [1/2]
| duckdb::VectorListBuffer::VectorListBuffer |
( |
unique_ptr< Vector > | vector, |
|
|
idx_t | initial_capacity = STANDARD_VECTOR_SIZE ) |
|
explicit |
138761 : VectorBuffer(VectorBufferType::LIST_BUFFER),
child(std::move(vector)), capacity(initial_capacity) {
138762}
unique_ptr< Vector > child
child vectors used for nested data
Definition duckdb.hpp:10255
◆ VectorListBuffer() [2/2]
| duckdb::VectorListBuffer::VectorListBuffer |
( |
const LogicalType & | list_type, |
|
|
idx_t | initial_capacity = STANDARD_VECTOR_SIZE ) |
|
explicit |
138765 : VectorBuffer(VectorBufferType::LIST_BUFFER),
138766 child(make_uniq<Vector>(ListType::GetChildType(list_type), initial_capacity)), capacity(initial_capacity) {
138767}
◆ ~VectorListBuffer()
| duckdb::VectorListBuffer::~VectorListBuffer |
( |
| ) |
|
|
override |
◆ GetChild()
| Vector & duckdb::VectorListBuffer::GetChild |
( |
| ) |
|
|
inline |
◆ Reserve()
| void duckdb::VectorListBuffer::Reserve |
( |
idx_t | to_reserve | ) |
|
138769 {
138770 if (to_reserve > capacity) {
138772
138773 throw OutOfRangeException("Cannot resize vector to %d rows: maximum allowed vector size is %s", to_reserve,
138775 }
138776 idx_t new_capacity = NextPowerOfTwo(to_reserve);
138777 D_ASSERT(new_capacity >= to_reserve);
138778 child->Resize(capacity, new_capacity);
138779 capacity = new_capacity;
138780 }
138781}
static DUCKDB_API string BytesToHumanReadableString(idx_t bytes, idx_t multiplier=1024)
Return a string that formats the give number of bytes.
Definition duckdb.cpp:109517
uint64_t idx_t
a saner size_t for loop indices etc
Definition duckdb.hpp:237
static constexpr const idx_t MAX_VECTOR_SIZE
The total maximum vector size (128GB).
Definition duckdb.hpp:1119
◆ Append() [1/2]
| void duckdb::VectorListBuffer::Append |
( |
const Vector & | to_append, |
|
|
idx_t | to_append_size, |
|
|
idx_t | source_offset = 0 ) |
138783 {
138784 Reserve(size + to_append_size - source_offset);
138785 VectorOperations::Copy(to_append, *
child, to_append_size, source_offset, size);
138786 size += to_append_size - source_offset;
138787}
◆ Append() [2/2]
138790 {
138791 Reserve(size + to_append_size - source_offset);
138792 VectorOperations::Copy(to_append, *
child, sel, to_append_size, source_offset, size);
138793 size += to_append_size - source_offset;
138794}
◆ PushBack()
| void duckdb::VectorListBuffer::PushBack |
( |
const Value & | insert | ) |
|
138796 {
138797 while (size + 1 > capacity) {
138798 child->Resize(capacity, capacity * 2);
138799 capacity *= 2;
138800 }
138801 child->SetValue(size++, insert);
138802}
◆ GetSize()
| idx_t duckdb::VectorListBuffer::GetSize |
( |
| ) |
|
|
inline |
10242 {
10243 return size;
10244 }
◆ GetCapacity()
| idx_t duckdb::VectorListBuffer::GetCapacity |
( |
| ) |
|
|
inline |
10246 {
10247 return capacity;
10248 }
◆ SetCapacity()
| void duckdb::VectorListBuffer::SetCapacity |
( |
idx_t | new_capacity | ) |
|
138804 {
138805 this->capacity = new_capacity;
138806}
◆ SetSize()
| void duckdb::VectorListBuffer::SetSize |
( |
idx_t | new_size | ) |
|
138808 {
138809 this->size = new_size;
138810}
The documentation for this class was generated from the following files: