The VectorCache holds cached vector data. It enables re-using the same memory for different vectors.
◆ VectorCache() [1/2]
| duckdb::VectorCache::VectorCache |
( |
| ) |
|
Instantiate an empty vector cache.
138976 : buffer(nullptr) {
138977}
◆ VectorCache() [2/2]
| duckdb::VectorCache::VectorCache |
( |
Allocator & | allocator, |
|
|
const LogicalType & | type, |
|
|
const idx_t | capacity = STANDARD_VECTOR_SIZE ) |
Instantiate a vector cache with the given type and capacity.
138979 {
138980 buffer = make_buffer<VectorCacheBuffer>(allocator, type_p, capacity_p);
138981}
◆ ResetFromCache()
| void duckdb::VectorCache::ResetFromCache |
( |
Vector & | result | ) |
const |
138983 {
138984 if (!buffer) {
138985 return;
138986 }
138987 auto &vector_cache = buffer->Cast<VectorCacheBuffer>();
138988 vector_cache.ResetFromCache(result, buffer);
138989}
◆ GetType()
| const LogicalType & duckdb::VectorCache::GetType |
( |
| ) |
const |
138991 {
138992 D_ASSERT(buffer);
138993 auto &vector_cache = buffer->Cast<VectorCacheBuffer>();
138994 return vector_cache.GetType();
138995}
The documentation for this class was generated from the following file: