mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-26 09:32:01 +00:00
Remove unnecessary repetition
This commit is contained in:
parent
5718375131
commit
6cd8bec3fc
@ -1324,10 +1324,13 @@ public:
|
||||
{
|
||||
return res;
|
||||
}
|
||||
else if (((left_is_ipv6 && right_is_fixed_string) || (right_is_ipv6 && left_is_fixed_string)) && fixed_string_size == IPV6_BINARY_LENGTH)
|
||||
else if (
|
||||
(((left_is_ipv6 && right_is_fixed_string) || (right_is_ipv6 && left_is_fixed_string)) && fixed_string_size == IPV6_BINARY_LENGTH)
|
||||
|| ((left_is_ipv4 || left_is_ipv6) && (right_is_ipv4 || right_is_ipv6))
|
||||
)
|
||||
{
|
||||
/// Special treatment for FixedString(16) as a binary representation of IPv6 -
|
||||
/// CAST is customized for this case
|
||||
/// Special treatment for FixedString(16) as a binary representation of IPv6 & for comparing IPv4 & IPv6 values -
|
||||
/// CAST is customized for this cases
|
||||
ColumnPtr left_column = left_is_ipv6 ?
|
||||
col_with_type_and_name_left.column : castColumn(col_with_type_and_name_left, right_type);
|
||||
ColumnPtr right_column = right_is_ipv6 ?
|
||||
@ -1335,15 +1338,6 @@ public:
|
||||
|
||||
return executeGenericIdenticalTypes(left_column.get(), right_column.get());
|
||||
}
|
||||
else if ((left_is_ipv4 || left_is_ipv6) && (right_is_ipv4 || right_is_ipv6))
|
||||
{
|
||||
ColumnPtr left_column = left_is_ipv6 ?
|
||||
col_with_type_and_name_left.column : castColumn(col_with_type_and_name_left, right_type);
|
||||
ColumnPtr right_column = right_is_ipv6 ?
|
||||
col_with_type_and_name_right.column : castColumn(col_with_type_and_name_right, left_type);
|
||||
|
||||
return executeGenericIdenticalTypes(left_column.get(), right_column.get());
|
||||
}
|
||||
else if ((isColumnedAsDecimal(left_type) || isColumnedAsDecimal(right_type)))
|
||||
{
|
||||
// Comparing Date/Date32 and DateTime64 requires implicit conversion,
|
||||
|
Loading…
Reference in New Issue
Block a user