mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-23 16:12:01 +00:00
Fix.
This commit is contained in:
parent
2223ae4ddc
commit
6e10d28c78
@ -389,13 +389,13 @@ public:
|
|||||||
block_with_partition_by_expr.setColumns(columns);
|
block_with_partition_by_expr.setColumns(columns);
|
||||||
partition_by_expr->execute(block_with_partition_by_expr);
|
partition_by_expr->execute(block_with_partition_by_expr);
|
||||||
|
|
||||||
const auto * key_column = checkAndGetColumn<ColumnString>(block_with_partition_by_expr.getByName(partition_by_column_name).column.get());
|
const auto * column = block_with_partition_by_expr.getByName(partition_by_column_name).column.get();
|
||||||
|
|
||||||
std::unordered_map<String, size_t> sub_chunks_indices;
|
std::unordered_map<String, size_t> sub_chunks_indices;
|
||||||
IColumn::Selector selector;
|
IColumn::Selector selector;
|
||||||
for (size_t row = 0; row < chunk.getNumRows(); ++row)
|
for (size_t row = 0; row < chunk.getNumRows(); ++row)
|
||||||
{
|
{
|
||||||
auto value = key_column->getDataAt(row);
|
auto value = column->getDataAt(row);
|
||||||
validatePartitionKey(value);
|
validatePartitionKey(value);
|
||||||
auto [it, inserted] = sub_chunks_indices.emplace(value, sub_chunks_indices.size());
|
auto [it, inserted] = sub_chunks_indices.emplace(value, sub_chunks_indices.size());
|
||||||
selector.push_back(it->second);
|
selector.push_back(it->second);
|
||||||
|
Loading…
Reference in New Issue
Block a user