Skip to content

Commit 6915de2

Browse files
Merge pull request ClickHouse#91950 from ClickHouse/backport/25.8/91923
Backport ClickHouse#91923 to 25.8: fix optimize_skip_unused_shards for Distributed that may lead to Serialization is not implemented for data type Set due to wrong types
2 parents 209637f + 232f3d1 commit 6915de2

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

src/Interpreters/evaluateConstantExpression.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -612,7 +612,7 @@ namespace
612612

613613
if (!type->equals(*node->result_type))
614614
{
615-
cast_col = tryCastColumn(column, value->result_type, node->result_type);
615+
cast_col = tryCastColumn(column, type, node->result_type);
616616
if (!cast_col)
617617
return {};
618618
const auto & col_nullable = assert_cast<const ColumnNullable &>(*cast_col);
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
a
2+
b
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
drop table if exists t1;
2+
3+
create table t1 (Col LowCardinality(String)) engine = MergeTree order by ();
4+
insert into t1 values ('a'), ('b'), ('c');
5+
6+
select * from remote('127.{1,2}', currentDatabase(), t1, multiIf(Col = 'a', 0, Col = 'b', 1, -1)) where Col in ('a', 'b') order by all settings optimize_skip_unused_shards=1;

0 commit comments

Comments
 (0)