revert some changes

This commit is contained in:
Yakov Olkhovskiy 2024-11-15 06:17:30 +00:00
parent cf460844e9
commit 098c5c6a0b
2 changed files with 3 additions and 14 deletions

View File

@ -58,18 +58,7 @@ public:
{
Field out;
constant_value.getColumn()->get(0, out);
const IDataType & to_type = *constant_value.getType();
if (out.isNull() && !canContainNull(to_type))
return out;
Field converted = tryConvertFieldToType(out, *constant_value.getType());
if (!out.isNull() && converted.isNull())
return out;
return converted;
return out;
}
/// Get constant value string representation

View File

@ -121,8 +121,8 @@ bool isBooleanConstant(const QueryTreeNodePtr & node, bool expected_value)
if (!constant_node || !constant_node->getResultType()->equals(DataTypeUInt8()))
return false;
bool constant_value;
return (constant_node->getValue().tryGet<bool>(constant_value) && constant_value == expected_value);
UInt64 constant_value;
return (constant_node->getValue().tryGet<UInt64>(constant_value) && constant_value == expected_value);
}
/// Returns true if expression consists of only conjunctions of functions with the specified name or true constants