mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-23 08:02:02 +00:00
revert some changes
This commit is contained in:
parent
cf460844e9
commit
098c5c6a0b
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user