-
Notifications
You must be signed in to change notification settings - Fork 6.5k
New issue
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
Binary arithmetic for IPv4 #45150
Binary arithmetic for IPv4 #45150
Conversation
@@ -1209,6 +1213,17 @@ class FunctionBinaryArithmetic : public IFunction | |||
return arguments[0]; | |||
} | |||
|
|||
/// Special case - one or both arguments are IPv4 | |||
if (isIPv4(arguments[0]) || isIPv4(arguments[1])) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needs a test, I am almost sure that it's always false.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, function isIPv4 is not connected with the template above :) It's
inline bool isIPv4(const DataTypePtr & data_type) { return WhichDataType(data_type).isIPv4(); }
so should work aifak.
Test is added, I will merge.
This looks like ready? |
It's strange that |
I guess because the bug was never released. |
* binary arithmetic for IPv4, porting ClickHouse/ClickHouse#45150 * add more test
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):
Follow-up fix for Replace domain IP types (IPv4, IPv6) with native #43221