Skip to content
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

Merged
merged 2 commits into from
Jan 24, 2023
Merged

Binary arithmetic for IPv4 #45150

merged 2 commits into from
Jan 24, 2023

Conversation

yakov-olkhovskiy
Copy link
Member

Changelog category (leave one):

  • Bug Fix (user-visible misbehavior in official stable or prestable release)

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

@robot-ch-test-poll1 robot-ch-test-poll1 added the pr-bugfix Pull request with bugfix, not backported by default label Jan 11, 2023
@novikd novikd self-assigned this Jan 11, 2023
@@ -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]))
Copy link
Member

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.

Copy link
Member

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.

@azat
Copy link
Collaborator

azat commented Jan 23, 2023

This looks like ready?
Just want to make sure that it will be included into 23.1 (since it is not far off).

@KochetovNicolai
Copy link
Member

It's strange that Bugfix validate check failed. The query files to me with Illegal types IPv4 and UInt64 of arguments of function modulo on master

@KochetovNicolai KochetovNicolai merged commit e4c0608 into master Jan 24, 2023
@KochetovNicolai KochetovNicolai deleted the fix-ip-function-mod branch January 24, 2023 12:11
@azat
Copy link
Collaborator

azat commented Jan 24, 2023

It's strange that Bugfix validate check failed

I guess because the bug was never released.

lizhou1111 added a commit to timeplus-io/proton that referenced this pull request Dec 12, 2023
yl-lisen pushed a commit to timeplus-io/proton that referenced this pull request Dec 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr-bugfix Pull request with bugfix, not backported by default
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants