93630 {
93631 using CONSTANTS = RadixPartitioningConstants<radix_bits>;
93632 if (!append_sel.IsSet() || hashes.GetVectorType() == VectorType::CONSTANT_VECTOR) {
93633 UnaryExecutor::Execute<hash_t, hash_t>(hashes, partition_indices, append_count,
93634 [&](
hash_t hash) {
return CONSTANTS::ApplyMask(hash); });
93635 } else {
93636 partition_indices.SetVectorType(VectorType::FLAT_VECTOR);
93637
93638
93639
93640 UnifiedVectorFormat
format;
93641 hashes.ToUnifiedFormat(original_count,
format);
93642 const auto source_data = UnifiedVectorFormat::GetData<hash_t>(
format);
93643 const auto &source_sel = *
format.sel;
93644
93645 partition_indices.SetVectorType(VectorType::FLAT_VECTOR);
93646 const auto target = FlatVector::GetData<hash_t>(partition_indices);
93647
93648 if (source_sel.IsSet()) {
93649 for (
idx_t i = 0; i < append_count; i++) {
93650 const auto source_idx = source_sel.get_index(append_sel[i]);
93651 target[i] = CONSTANTS::ApplyMask(source_data[source_idx]);
93652 }
93653 } else {
93654 for (
idx_t i = 0; i < append_count; i++) {
93655 const auto source_idx = append_sel[i];
93656 target[i] = CONSTANTS::ApplyMask(source_data[source_idx]);
93657 }
93658 }
93659 }
93660 }
std::basic_string< Char > format(const S &format_str, Args &&... args)
Definition duckdb.cpp:16295
uint64_t hash_t
The type used for hashes.
Definition duckdb.hpp:243
uint64_t idx_t
a saner size_t for loop indices etc
Definition duckdb.hpp:237