Fix splitting into buckets

This commit is contained in:
Dmitry Novik 2023-09-22 14:44:40 +00:00
parent bb6952317c
commit 3b0579b339

View File

@ -115,11 +115,7 @@ void ScatterByPartitionTransform::generateOutputChunks()
IColumn::Selector selector(num_rows); IColumn::Selector selector(num_rows);
for (size_t row = 0; row < num_rows; ++row) for (size_t row = 0; row < num_rows; ++row)
{ selector[row] = hash_data[row] % output_size;
selector[row] = hash_data[row]; /// [0, 2^32)
selector[row] *= output_size; /// [0, output_size * 2^32), selector stores 64 bit values.
selector[row] >>= 32u; /// [0, output_size)
}
output_chunks.resize(output_size); output_chunks.resize(output_size);
for (const auto & column : columns) for (const auto & column : columns)