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

Implement vector cidr_match() function #5592

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Implement vector cidr_match() function #5592

wants to merge 1 commit into from

Conversation

nwt
Copy link
Member

@nwt nwt commented Jan 21, 2025

No description provided.

@nwt nwt requested a review from a team January 21, 2025 13:45
Comment on lines +31 to +44
out := vector.NewBoolEmpty(netVec.Len(), nil)
for i := range netVec.Len() {
net, null := vector.NetValue(netVec, i)
if null {
continue
}
ip, null := vector.IPValue(ipVec, i)
if null {
continue
}
if net.Contains(ip) {
out.Set(i)
}
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

In order for this to be consistent with other boolean logic I think we need to have this return null(bool) when nulls are encountered.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants