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

Rename: NullsView to BoolView #5496

Merged
merged 1 commit into from
Nov 22, 2024
Merged

Rename: NullsView to BoolView #5496

merged 1 commit into from
Nov 22, 2024

Conversation

mattnibs
Copy link
Collaborator

Rename NullsView to BoolView since this can be used for creating views of Bool vectors as well. In addition have all an false value views of a boolean vector return a non-nil vector. When dealing with boolean values there's a difference between a false values and a nil vector.

Also have NewView of a boolean vector create a new boolean vector.

@mattnibs mattnibs requested a review from a team November 22, 2024 16:27
@mattnibs mattnibs force-pushed the vam-bool-view branch 2 times, most recently from 8bb2159 to 1ed5be8 Compare November 22, 2024 16:29
@@ -71,7 +71,6 @@ func genFunc(name, op, typ string, lhs, rhs vector.Form) string {
s := fmt.Sprintf("func %s(lhs, rhs vector.Any) vector.Any {\n", name)
s += genVarInit("l", typ, lhs)
s += genVarInit("r", typ, rhs)
s += "nulls := vector.Or(l.Nulls, r.Nulls)\n"
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This was incorrect when getting nulls of a view.

@mattnibs mattnibs force-pushed the vam-bool-view branch 2 times, most recently from 6d9344f to 8f796b0 Compare November 22, 2024 16:33
vector/view.go Outdated Show resolved Hide resolved
Rename NullsView to BoolView since this can be used for creating views
of Bool vectors as well. In addition have all an false value views of
a boolean vector return a non-nil vector. When dealing with boolean values
there's a difference between a false values and a nil vector.

Also have NewView of a boolean vector create a new boolean vector.
@mattnibs mattnibs merged commit c6e0c73 into main Nov 22, 2024
3 checks passed
@mattnibs mattnibs deleted the vam-bool-view branch November 22, 2024 17:31
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