[Improvement](join) optimize join probing phase (#13357)
This commit is contained in:
@ -402,8 +402,9 @@ ColumnPtr ColumnString::replicate(const Offsets& replicate_offsets) const {
|
||||
return res;
|
||||
}
|
||||
|
||||
void ColumnString::replicate(const uint32_t* counts, size_t target_size, IColumn& column) const {
|
||||
size_t col_size = size();
|
||||
void ColumnString::replicate(const uint32_t* counts, size_t target_size, IColumn& column,
|
||||
size_t begin, int count_sz) const {
|
||||
size_t col_size = count_sz < 0 ? size() : count_sz;
|
||||
if (0 == col_size) {
|
||||
return;
|
||||
}
|
||||
@ -415,10 +416,12 @@ void ColumnString::replicate(const uint32_t* counts, size_t target_size, IColumn
|
||||
res_chars.reserve(chars.size() / col_size * target_size);
|
||||
res_offsets.reserve(target_size);
|
||||
|
||||
Offset prev_string_offset = 0;
|
||||
size_t base = begin > 0 ? offsets[begin - 1] : 0;
|
||||
Offset prev_string_offset = 0 + base;
|
||||
Offset current_new_offset = 0;
|
||||
|
||||
for (size_t i = 0; i < col_size; ++i) {
|
||||
size_t end = begin + col_size;
|
||||
for (size_t i = begin; i < end; ++i) {
|
||||
size_t size_to_replicate = counts[i];
|
||||
size_t string_size = offsets[i] - prev_string_offset;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user