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

Add IPADDRESS/IPPREFIX functions #11407

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

mohsaka
Copy link
Contributor

@mohsaka mohsaka commented Nov 1, 2024

Adds the corresponding IPADDRESS/IPPREFIX functions from presto from the presto documentation.
https://prestodb.io/docs/current/functions/ip.html

Contains the changes from multiple other PRs that must be merged first.

#11209
#11309
#11378

This PRs changes are contained in
6c496f6

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Nov 1, 2024
Copy link

netlify bot commented Nov 1, 2024

Deploy Preview for meta-velox canceled.

Name Link
🔨 Latest commit 6888437
🔍 Latest deploy log https://app.netlify.com/sites/meta-velox/deploys/67251779cc5b6a0008d9d24f

@mohsaka mohsaka force-pushed the ipaddress_ipprefix_functions branch from 7de40ec to 6888437 Compare November 1, 2024 18:01
yuandagits added a commit to yuandagits/velox that referenced this pull request Nov 12, 2024
Summary:

Add ip_prefix function which takes in varchar or ipaddress along with a prefixBits. 

Use folly lib to convert the varchar or ipaddress type to folly::IPAddressV6, and then apply the mask.

We return a tuple<int128_t, int8_t> which corresponds to the ipaddress and prefix for IPAddressPrefix type.

Split from facebookincubator#11407

Differential Revision: D65802211
yuandagits added a commit to yuandagits/velox that referenced this pull request Nov 12, 2024
Summary:

Add ip_prefix function which takes in varchar or ipaddress along with a prefixBits. 

Use folly lib to convert the varchar or ipaddress type to folly::IPAddressV6, and then apply the mask.

We return a tuple<int128_t, int8_t> which corresponds to the ipaddress and prefix for IPAddressPrefix type.

Split from facebookincubator#11407

Differential Revision: D65802211
yuandagits added a commit to yuandagits/velox that referenced this pull request Nov 12, 2024
Summary:

Add ip_prefix function which takes in varchar or ipaddress along with a prefixBits. 

Use folly lib to convert the varchar or ipaddress type to folly::IPAddressV6, and then apply the mask.

We return a tuple<int128_t, int8_t> which corresponds to the ipaddress and prefix for IPAddressPrefix type.

Split from facebookincubator#11407

Differential Revision: D65802211
yuandagits added a commit to yuandagits/velox that referenced this pull request Nov 12, 2024
Summary:
Add ip_subnet and ip_subnetmax.

Split from facebookincubator#11407

Differential Revision: D65833249
yuandagits added a commit to yuandagits/velox that referenced this pull request Nov 12, 2024
Summary:

Add ip_prefix function which takes in varchar or ipaddress along with a prefixBits. 

Use folly lib to convert the varchar or ipaddress type to folly::IPAddressV6, and then apply the mask.

We return a tuple<int128_t, int8_t> which corresponds to the ipaddress and prefix for IPAddressPrefix type.

Split from facebookincubator#11407

Differential Revision: D65802211
yuandagits added a commit to yuandagits/velox that referenced this pull request Nov 12, 2024
Summary:

Add ip_subnet and ip_subnetmax.

Split from facebookincubator#11407

Differential Revision: D65833249
yuandagits added a commit to yuandagits/velox that referenced this pull request Nov 12, 2024
Summary:

Add ip_prefix function which takes in varchar or ipaddress along with a prefixBits. 

Use folly lib to convert the varchar or ipaddress type to folly::IPAddressV6, and then apply the mask.

We return a tuple<int128_t, int8_t> which corresponds to the ipaddress and prefix for IPAddressPrefix type.

Split from facebookincubator#11407

Differential Revision: D65802211
yuandagits added a commit to yuandagits/velox that referenced this pull request Nov 12, 2024
Summary:

Add ip_subnet and ip_subnetmax.

Split from facebookincubator#11407

Differential Revision: D65833249
yuandagits added a commit to yuandagits/velox that referenced this pull request Nov 12, 2024
Summary:

Add ip_subnet and ip_subnetmax.

Split from facebookincubator#11407

Differential Revision: D65833249
yuandagits added a commit to yuandagits/velox that referenced this pull request Nov 12, 2024
Summary:

Add ip_prefix function which takes in varchar or ipaddress along with a prefixBits. 

Use folly lib to convert the varchar or ipaddress type to folly::IPAddressV6, and then apply the mask.

We return a tuple<int128_t, int8_t> which corresponds to the ipaddress and prefix for IPAddressPrefix type.

Split from facebookincubator#11407

Differential Revision: D65802211
yuandagits added a commit to yuandagits/velox that referenced this pull request Nov 12, 2024
Summary:

Add ip_prefix function which takes in varchar or ipaddress along with a prefixBits. 

Use folly lib to convert the varchar or ipaddress type to folly::IPAddressV6, and then apply the mask.

We return a tuple<int128_t, int8_t> which corresponds to the ipaddress and prefix for IPAddressPrefix type.

Split from facebookincubator#11407

Differential Revision: D65802211
yuandagits added a commit to yuandagits/velox that referenced this pull request Nov 12, 2024
Summary:

Add ip_subnet and ip_subnetmax.

Split from facebookincubator#11407

Differential Revision: D65833249
yuandagits added a commit to yuandagits/velox that referenced this pull request Nov 15, 2024
Summary:

Add ip_prefix function which takes in varchar or ipaddress along with a prefixBits. 

Use folly lib to convert the varchar or ipaddress type to folly::IPAddressV6, and then apply the mask.

We return a tuple<int128_t, int8_t> which corresponds to the ipaddress and prefix for IPAddressPrefix type.

Split from facebookincubator#11407

Differential Revision: D65802211
yuandagits added a commit to yuandagits/velox that referenced this pull request Nov 15, 2024
Summary:

Add ip_subnet and ip_subnetmax.

Split from facebookincubator#11407

Differential Revision: D65833249
yuandagits added a commit to yuandagits/velox that referenced this pull request Dec 2, 2024
Summary:

Add ip_prefix function which takes in varchar or ipaddress along with a prefixBits. 

Use folly lib to convert the varchar or ipaddress type to folly::IPAddressV6, and then apply the mask.

We return a tuple<int128_t, int8_t> which corresponds to the ipaddress and prefix for IPAddressPrefix type.

Split from facebookincubator#11407

Differential Revision: D65802211
yuandagits added a commit to yuandagits/velox that referenced this pull request Dec 6, 2024
Summary:

Add ip_prefix function which takes in varchar or ipaddress along with a prefixBits. 

Use folly lib to convert the varchar or ipaddress type to folly::IPAddressV6, and then apply the mask.

We return a tuple<int128_t, int8_t> which corresponds to the ipaddress and prefix for IPAddressPrefix type.

Split from facebookincubator#11407

Differential Revision: D65802211
yuandagits added a commit to yuandagits/velox that referenced this pull request Dec 6, 2024
Summary:

Add ip_prefix function which takes in varchar or ipaddress along with a prefixBits. 

Use folly lib to convert the varchar or ipaddress type to folly::IPAddressV6, and then apply the mask.

We return a tuple<int128_t, int8_t> which corresponds to the ipaddress and prefix for IPAddressPrefix type.

Split from facebookincubator#11407

Differential Revision: D65802211
yuandagits added a commit to yuandagits/velox that referenced this pull request Dec 6, 2024
Summary:

Add ip_prefix function which takes in varchar or ipaddress along with a prefixBits. 

Use folly lib to convert the varchar or ipaddress type to folly::IPAddressV6, and then apply the mask.

We return a tuple<int128_t, int8_t> which corresponds to the ipaddress and prefix for IPAddressPrefix type.

Split from facebookincubator#11407

Differential Revision: D65802211
yuandagits added a commit to yuandagits/velox that referenced this pull request Dec 6, 2024
Summary:

Add ip_prefix function which takes in varchar or ipaddress along with a prefixBits. 

Use folly lib to convert the varchar or ipaddress type to folly::IPAddressV6, and then apply the mask.

We return a tuple<int128_t, int8_t> which corresponds to the ipaddress and prefix for IPAddressPrefix type.

Split from facebookincubator#11407

Differential Revision: D65802211
yuandagits added a commit to yuandagits/velox that referenced this pull request Dec 10, 2024
Summary:

Add ip_prefix function which takes in varchar or ipaddress along with a prefixBits. 

Use folly lib to convert the varchar or ipaddress type to folly::IPAddressV6, and then apply the mask.

We return a tuple<int128_t, int8_t> which corresponds to the ipaddress and prefix for IPAddressPrefix type.

Split from facebookincubator#11407

Differential Revision: D65802211
yuandagits added a commit to yuandagits/velox that referenced this pull request Dec 10, 2024
Summary:

Add ip_prefix function which takes in varchar or ipaddress along with a prefixBits. 

Use folly lib to convert the varchar or ipaddress type to folly::IPAddressV6, and then apply the mask.

We return a tuple<int128_t, int8_t> which corresponds to the ipaddress and prefix for IPAddressPrefix type.

Split from facebookincubator#11407

Differential Revision: D65802211
yuandagits added a commit to yuandagits/velox that referenced this pull request Dec 11, 2024
Summary:
Pull Request resolved: facebookincubator#11514

Add ip_prefix function which takes in varchar or ipaddress along with a prefixBits.

Use folly lib to convert the varchar or ipaddress type to folly::IPAddressV6, and then apply the mask.

We return a tuple<int128_t, int8_t> which corresponds to the ipaddress and prefix for IPAddressPrefix type.

Split from facebookincubator#11407

Differential Revision: D65802211
yuandagits added a commit to yuandagits/velox that referenced this pull request Dec 11, 2024
Summary:
Pull Request resolved: facebookincubator#11514

Add ip_prefix function which takes in varchar or ipaddress along with a prefixBits.

Use folly lib to convert the varchar or ipaddress type to folly::IPAddressV6, and then apply the mask.

We return a tuple<int128_t, int8_t> which corresponds to the ipaddress and prefix for IPAddressPrefix type.

Split from facebookincubator#11407

Differential Revision: D65802211
yuandagits added a commit to yuandagits/velox that referenced this pull request Dec 11, 2024
Summary:
Pull Request resolved: facebookincubator#11514

Add ip_prefix function which takes in varchar or ipaddress along with a prefixBits.

Use folly lib to convert the varchar or ipaddress type to folly::IPAddressV6, and then apply the mask.

We return a tuple<int128_t, int8_t> which corresponds to the ipaddress and prefix for IPAddressPrefix type.

Split from facebookincubator#11407

Differential Revision: D65802211
yuandagits added a commit to yuandagits/velox that referenced this pull request Dec 12, 2024
Summary:
Pull Request resolved: facebookincubator#11514

Add ip_prefix function which takes in varchar or ipaddress along with a prefixBits.

Use folly lib to convert the varchar or ipaddress type to folly::IPAddressV6, and then apply the mask.

We return a tuple<int128_t, int8_t> which corresponds to the ipaddress and prefix for IPAddressPrefix type.

Split from facebookincubator#11407

Reviewed By: spershin

Differential Revision: D65802211
yuandagits added a commit to yuandagits/velox that referenced this pull request Dec 12, 2024
Summary:
Pull Request resolved: facebookincubator#11514

Add ip_prefix function which takes in varchar or ipaddress along with a prefixBits.

Use folly lib to convert the varchar or ipaddress type to folly::IPAddressV6, and then apply the mask.

We return a tuple<int128_t, int8_t> which corresponds to the ipaddress and prefix for IPAddressPrefix type.

Split from facebookincubator#11407

Reviewed By: spershin

Differential Revision: D65802211
yuandagits added a commit to yuandagits/velox that referenced this pull request Dec 12, 2024
Summary:
Pull Request resolved: facebookincubator#11514

Add ip_prefix function which takes in varchar or ipaddress along with a prefixBits.

Use folly lib to convert the varchar or ipaddress type to folly::IPAddressV6, and then apply the mask.

We return a tuple<int128_t, int8_t> which corresponds to the ipaddress and prefix for IPAddressPrefix type.

Split from facebookincubator#11407

Reviewed By: spershin

Differential Revision: D65802211
yuandagits added a commit to yuandagits/velox that referenced this pull request Dec 12, 2024
Summary:
Pull Request resolved: facebookincubator#11514

Add ip_prefix function which takes in varchar or ipaddress along with a prefixBits.

Use folly lib to convert the varchar or ipaddress type to folly::IPAddressV6, and then apply the mask.

We return a tuple<int128_t, int8_t> which corresponds to the ipaddress and prefix for IPAddressPrefix type.

Split from facebookincubator#11407

Reviewed By: spershin

Differential Revision: D65802211
yuandagits added a commit to yuandagits/velox that referenced this pull request Dec 12, 2024
Summary:
Pull Request resolved: facebookincubator#11514

Add ip_prefix function which takes in varchar or ipaddress along with a prefixBits.

Use folly lib to convert the varchar or ipaddress type to folly::IPAddressV6, and then apply the mask.

We return a tuple<int128_t, int8_t> which corresponds to the ipaddress and prefix for IPAddressPrefix type.

Split from facebookincubator#11407

Reviewed By: spershin

Differential Revision: D65802211
yuandagits added a commit to yuandagits/velox that referenced this pull request Dec 13, 2024
Summary:
Pull Request resolved: facebookincubator#11514

Add ip_prefix function which takes in varchar or ipaddress along with a prefixBits.

Use folly lib to convert the varchar or ipaddress type to folly::IPAddressV6, and then apply the mask.

We return a tuple<int128_t, int8_t> which corresponds to the ipaddress and prefix for IPAddressPrefix type.

Split from facebookincubator#11407

Reviewed By: spershin

Differential Revision: D65802211
yuandagits added a commit to yuandagits/velox that referenced this pull request Dec 16, 2024
Summary:
Pull Request resolved: facebookincubator#11514

Add ip_prefix function which takes in varchar or ipaddress along with a prefixBits.

Use folly lib to convert the varchar or ipaddress type to folly::IPAddressV6, and then apply the mask.

We return a tuple<int128_t, int8_t> which corresponds to the ipaddress and prefix for IPAddressPrefix type.

Split from facebookincubator#11407

Reviewed By: spershin

Differential Revision: D65802211
yuandagits added a commit to yuandagits/velox that referenced this pull request Dec 16, 2024
Summary:
Pull Request resolved: facebookincubator#11514

Add ip_prefix function which takes in varchar or ipaddress along with a prefixBits.

Use folly lib to convert the varchar or ipaddress type to folly::IPAddressV6, and then apply the mask.

We return a tuple<int128_t, int8_t> which corresponds to the ipaddress and prefix for IPAddressPrefix type.

Split from facebookincubator#11407

Reviewed By: spershin

Differential Revision: D65802211
yuandagits added a commit to yuandagits/velox that referenced this pull request Dec 18, 2024
Summary:

Add ip_prefix function which takes in varchar or ipaddress along with a prefixBits. 

Use folly lib to convert the varchar or ipaddress type to folly::IPAddressV6, and then apply the mask.

We return a tuple<int128_t, int8_t> which corresponds to the ipaddress and prefix for IPAddressPrefix type.

Split from facebookincubator#11407

Reviewed By: xiaoxmeng, spershin

Differential Revision: D65802211
yuandagits added a commit to yuandagits/velox that referenced this pull request Dec 18, 2024
Summary:

Add ip_subnet and ip_subnetmax.

Split from facebookincubator#11407

Differential Revision: D65833249
yuandagits added a commit to yuandagits/velox that referenced this pull request Dec 19, 2024
Summary:

Add ip_prefix function which takes in varchar or ipaddress along with a prefixBits. 

Use folly lib to convert the varchar or ipaddress type to folly::IPAddressV6, and then apply the mask.

We return a tuple<int128_t, int8_t> which corresponds to the ipaddress and prefix for IPAddressPrefix type.

Split from facebookincubator#11407

Reviewed By: xiaoxmeng, spershin

Differential Revision: D65802211
yuandagits added a commit to yuandagits/velox that referenced this pull request Dec 20, 2024
Summary:

Add ip_prefix function which takes in varchar or ipaddress along with a prefixBits. 

Use folly lib to convert the varchar or ipaddress type to folly::IPAddressV6, and then apply the mask.

We return a tuple<int128_t, int8_t> which corresponds to the ipaddress and prefix for IPAddressPrefix type.

Split from facebookincubator#11407

Reviewed By: xiaoxmeng, spershin

Differential Revision: D65802211
facebook-github-bot pushed a commit that referenced this pull request Dec 20, 2024
Summary:
Pull Request resolved: #11514

Add ip_prefix function which takes in varchar or ipaddress along with a prefixBits.

Use folly lib to convert the varchar or ipaddress type to folly::IPAddressV6, and then apply the mask.

We return a tuple<int128_t, int8_t> which corresponds to the ipaddress and prefix for IPAddressPrefix type.

Split from #11407

Reviewed By: xiaoxmeng, spershin

Differential Revision: D65802211

fbshipit-source-id: ff0611c7c9aa8fd5057a11d84ecc50ca342ca037
yuandagits added a commit to yuandagits/velox that referenced this pull request Dec 22, 2024
Summary:

Add ip_subnet and ip_subnetmax.

Split from facebookincubator#11407

Differential Revision: D65833249
yuandagits added a commit to yuandagits/velox that referenced this pull request Dec 22, 2024
Summary:

Add ip_subnet and ip_subnetmax.

Split from facebookincubator#11407

Differential Revision: D65833249
yuandagits added a commit to yuandagits/velox that referenced this pull request Dec 22, 2024
Summary:

Add ip_subnet and ip_subnetmax.

Split from facebookincubator#11407

Differential Revision: D65833249
yuandagits added a commit to yuandagits/velox that referenced this pull request Dec 22, 2024
Summary:

Add ip_subnet and ip_subnetmax.

Split from facebookincubator#11407

Differential Revision: D65833249
yuandagits added a commit to yuandagits/velox that referenced this pull request Jan 7, 2025
Summary:

Add ip_subnet and ip_subnetmax.

Split from facebookincubator#11407

Differential Revision: D65833249
yuandagits added a commit to yuandagits/velox that referenced this pull request Jan 8, 2025
Summary:

Add ip_subnet and ip_subnetmax.

Split from facebookincubator#11407

Differential Revision: D65833249
yuandagits added a commit to yuandagits/velox that referenced this pull request Jan 8, 2025
Summary:

Add ip_subnet and ip_subnetmax.

Split from facebookincubator#11407

Differential Revision: D65833249
yuandagits added a commit to yuandagits/velox that referenced this pull request Jan 8, 2025
Summary:

Add ip_subnet and ip_subnetmax.

Split from facebookincubator#11407

Differential Revision: D65833249
yuandagits added a commit to yuandagits/velox that referenced this pull request Jan 8, 2025
Summary:

Add ip_subnet and ip_subnetmax.

Split from facebookincubator#11407

Differential Revision: D65833249
yuandagits added a commit to yuandagits/velox that referenced this pull request Jan 8, 2025
Summary:

Add ip_subnet and ip_subnetmax.

Split from facebookincubator#11407

Differential Revision: D65833249
yuandagits added a commit to yuandagits/velox that referenced this pull request Jan 9, 2025
Summary:

Add ip_subnet and ip_subnetmax.

Split from facebookincubator#11407

Differential Revision: D65833249
yuandagits added a commit to yuandagits/velox that referenced this pull request Jan 10, 2025
Summary:

Add ip_subnet and ip_subnetmax.

Split from facebookincubator#11407

Differential Revision: D65833249
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants