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

Feature: Add IPv6 Match Function #15212

Merged
merged 36 commits into from Dec 8, 2023

Conversation

sb89594
Copy link
Contributor

@sb89594 sb89594 commented Oct 19, 2023

Fixes #10817.

Description

Added a SQL function to match IPv6 addresses to a given subnet. This was based off the existing IPv4_MATCH function. I initially considered changing the existing IPv4_MATCH function to be a more generic (e.g. IP_MATCH). However, given this has been a function for some time I thought it best to keep the existing function for existing queries and make an IPv6 specific implementation. Like the existing IPv4 implementation, this relies on the Java inet.ipaddr library

Release note

Added IPv6_MATCH SQL function for matching IPv6 addresses in a subnet

Key added classes in this PR
  • IPv6AddressExprUtils
  • IPv6AddressMatchExprMacro

This PR has:

  • been self-reviewed.
  • added documentation for new or modified features or behaviors.
  • a release note entry in the PR description.
  • added Javadocs for most classes and all non-trivial methods. Linked related entities via Javadoc links.
  • added unit tests or modified existing tests to cover new code paths, ensuring the threshold for code coverage is met.
  • been tested in a test Druid cluster.

@zargarf
Copy link

zargarf commented Nov 27, 2023

Hi - is there an approx ETA for a release containing this change?

@sb89594
Copy link
Contributor Author

sb89594 commented Nov 27, 2023

Hi - is there an approx ETA for a release containing this change?

It will depend when this PR gets reviewed. I've been keeping an eye on it but unfortunately I don't have any way of asking maintainers to have a look. Doesn't look like this will get in prior to the 28.0 milestone but hopefully it will be in the one afterwards (reviews dependent!)

@sb89594
Copy link
Contributor Author

sb89594 commented Nov 30, 2023

@LakshSingla, @abhishekagarwal87 Sorry to bother you both but would it be possible to get a PR review on this please? Just been open a while and I would welcome your feedback!

Copy link
Member

@clintropolis clintropolis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

overall lgtm

@sb89594
Copy link
Contributor Author

sb89594 commented Dec 6, 2023

Made suggested changes, ready for another review :)

@clintropolis clintropolis merged commit 5fda861 into apache:master Dec 8, 2023
83 checks passed
@sb89594 sb89594 deleted the feature-addIpv6MatchFunction branch December 21, 2023 08:43
@LakshSingla LakshSingla added this to the 29.0.0 milestone Jan 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add IPv6 SQL Functions
4 participants