提交 06aa530e 编写于 作者: R robot-clickhouse

Backport #17249 to 20.12: Fix const column in set index.

上级 34f508c1
......@@ -205,7 +205,7 @@ bool Set::insertFromBlock(const Block & block)
{
for (size_t i = 0; i < keys_size; ++i)
{
auto filtered_column = block.getByPosition(i).column->filter(filter->getData(), rows);
auto filtered_column = key_columns[i]->filter(filter->getData(), rows);
if (set_elements[i]->empty())
set_elements[i] = filtered_column;
else
......
drop table if exists insub;
create table insub (i int, j int) engine MergeTree order by i settings index_granularity = 1;
insert into insub select number a, a + 2 from numbers(10);
SET max_rows_to_read = 2;
select * from insub where i in (select toInt32(3) from numbers(10));
drop table if exists insub;
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册