We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
<=>
We recently added support of <=> operator for null-safe comparison on JOIN ON section. However, it's not implemented in SELECT list. To do that we need to implement https://github.com/ClickHouse/ClickHouse/blob/61f0683f1cfe21566f363703221fa17e80902b87/src/Functions/isNotDistinctFrom.h function.
SELECT
There're several options:
Implement support inside https://github.com/ClickHouse/ClickHouse/blob/61f0683f1cfe21566f363703221fa17e80902b87/src/Functions/FunctionsComparison.h . Pass some flag to the class implementing equals to support null-safe version as well. This option is preferred unless too many changes inside FunctionsComparison are required.
equals
FunctionsComparison
Or implement it separately in isNotDistinctFrom.cpp. We may reuse the existing equals function and handle the result null mask additionally. Overload for tuples may be required because both(NULL, 1) = (NULL, NULL) and (NULL, 1) = (NULL, 1) returns NULL, but `<=> should handle them differently checking values inside NULL. See https://github.com/ClickHouse/ClickHouse/blob/61f0683f1cfe21566f363703221fa17e80902b87/src/Functions/equals.cpp
isNotDistinctFrom.cpp
(NULL, 1) = (NULL, NULL)
(NULL, 1) = (NULL, 1)
NULL
The text was updated successfully, but these errors were encountered:
Can I take this?
Sorry, something went wrong.
@irenjj
Sure, it'll be really appreciated. If you have any questions during implementation, feel free to reach out.
vdimir
irenjj
No branches or pull requests
We recently added support of
<=>
operator for null-safe comparison on JOIN ON section. However, it's not implemented inSELECT
list.To do that we need to implement https://github.com/ClickHouse/ClickHouse/blob/61f0683f1cfe21566f363703221fa17e80902b87/src/Functions/isNotDistinctFrom.h function.
There're several options:
Implement support inside https://github.com/ClickHouse/ClickHouse/blob/61f0683f1cfe21566f363703221fa17e80902b87/src/Functions/FunctionsComparison.h . Pass some flag to the class implementing
equals
to support null-safe version as well. This option is preferred unless too many changes insideFunctionsComparison
are required.Or implement it separately in
isNotDistinctFrom.cpp
. We may reuse the existingequals
function and handle the result null mask additionally. Overload for tuples may be required because both(NULL, 1) = (NULL, NULL)
and(NULL, 1) = (NULL, 1)
returnsNULL
, but `<=> should handle them differently checking values inside NULL. See https://github.com/ClickHouse/ClickHouse/blob/61f0683f1cfe21566f363703221fa17e80902b87/src/Functions/equals.cppThe text was updated successfully, but these errors were encountered: