Decompresses an FSST_VECTOR into a FLAT_VECTOR. Note: validity is not copied.
138055 {
138056 D_ASSERT(src.GetVectorType() == VectorType::FSST_VECTOR);
138057 D_ASSERT(dst.GetVectorType() == VectorType::FLAT_VECTOR);
138058 auto dst_mask = FlatVector::Validity(dst);
138059 auto ldata = FSSTVector::GetCompressedData<string_t>(src);
138060 auto tdata = FlatVector::GetData<string_t>(dst);
138062 for (
idx_t i = 0; i < copy_count; i++) {
138063 auto source_idx = sel->get_index(src_offset + i);
138064 auto target_idx = dst_offset + i;
138065 string_t compressed_string = ldata[source_idx];
138066 if (dst_mask.RowIsValid(target_idx) && compressed_string.GetSize() > 0) {
138067 auto decoder = FSSTVector::GetDecoder(src);
138068 tdata[target_idx] = FSSTPrimitives::DecompressValue(decoder, str_buffer, compressed_string.GetData(),
138069 compressed_string.GetSize());
138070 } else {
138071 tdata[target_idx] = string_t(nullptr, 0);
138072 }
138073 }
138074}
uint64_t idx_t
a saner size_t for loop indices etc
Definition duckdb.hpp:237
static DUCKDB_API VectorStringBuffer & GetStringBuffer(Vector &vector)
Returns a reference to the underlying VectorStringBuffer - throws an error if vector is not of type V...
Definition duckdb.cpp:137905