From 7adfc52353c102cd402e184ab4fdaed16e9eac3a Mon Sep 17 00:00:00 2001 From: Yakov Olkhovskiy Date: Mon, 16 Dec 2024 13:21:32 +0000 Subject: [PATCH] fix --- src/Analyzer/ConstantNode.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Analyzer/ConstantNode.cpp b/src/Analyzer/ConstantNode.cpp index f0363aaa6ff..fc854d6b5bf 100644 --- a/src/Analyzer/ConstantNode.cpp +++ b/src/Analyzer/ConstantNode.cpp @@ -104,6 +104,10 @@ bool ConstantNode::requiresCastCall(Field::Types::Which type, const DataTypePtr bool ConstantNode::requiresCastCall(const DataTypePtr & field_type, const DataTypePtr & data_type) { + WhichDataType which_field_type(field_type); + if (which_field_type.isNullable() || which_field_type.isArray()) + return true; + return field_type->getTypeId() != data_type->getTypeId(); }