mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-29 19:12:03 +00:00
Remove unnecessary repetition
This commit is contained in:
parent
5718375131
commit
6cd8bec3fc
@ -1324,19 +1324,13 @@ public:
|
|||||||
{
|
{
|
||||||
return res;
|
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)
|
||||||
/// Special treatment for FixedString(16) as a binary representation of IPv6 -
|
|| ((left_is_ipv4 || left_is_ipv6) && (right_is_ipv4 || right_is_ipv6))
|
||||||
/// CAST is customized for this case
|
)
|
||||||
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 ((left_is_ipv4 || left_is_ipv6) && (right_is_ipv4 || right_is_ipv6))
|
|
||||||
{
|
{
|
||||||
|
/// 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 ?
|
ColumnPtr left_column = left_is_ipv6 ?
|
||||||
col_with_type_and_name_left.column : castColumn(col_with_type_and_name_left, right_type);
|
col_with_type_and_name_left.column : castColumn(col_with_type_and_name_left, right_type);
|
||||||
ColumnPtr right_column = right_is_ipv6 ?
|
ColumnPtr right_column = right_is_ipv6 ?
|
||||||
|
Loading…
Reference in New Issue
Block a user