Skip to content

Commit e514904

Browse files
Backport ClickHouse#87040 to 25.8: Correctly cast output after splitting prewhere
1 parent 6d69d37 commit e514904

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Storages/MergeTree/MergeTreeSplitPrewhereIntoReadSteps.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ const ActionsDAG::Node & addCast(
157157
const ActionsDAG::Node & node_to_cast,
158158
const DataTypePtr & to_type)
159159
{
160-
if (!node_to_cast.result_type->equals(*to_type))
160+
if (node_to_cast.result_type->equals(*to_type))
161161
return node_to_cast; /// NOLINT(bugprone-return-const-ref-from-parameter)
162162

163163
const auto & new_node = dag->addCast(node_to_cast, to_type, {});

0 commit comments

Comments
 (0)