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

data: Add NilAt method to Field and Frame #1208

Merged
merged 3 commits into from
Jan 28, 2025
Merged

data: Add NilAt method to Field and Frame #1208

merged 3 commits into from
Jan 28, 2025

Conversation

kylebrandt
Copy link
Contributor

What this PR does / why we need it:
Adds the NilAt(i int) bool method to Field.

// NilAt returns true if the element at index idx of the Field is nil.
// This is useful since the interface returned by At() will not be nil
// even if the underlying element is nil (without an type assertion).
// It will always return false if the Field is not nullable.
// It can panic if idx is out of range.
func (f *Field) NilAt(idx int) bool {
	return f.vector.NilAt(idx)
}

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

@kylebrandt kylebrandt requested a review from a team as a code owner January 28, 2025 00:11
@kylebrandt kylebrandt changed the title data: Add NilAt method to Field data: Add NilAt method to Field and Frame Jan 28, 2025
Copy link
Contributor

@gabor gabor left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@kylebrandt kylebrandt merged commit d477c83 into main Jan 28, 2025
3 checks passed
@kylebrandt kylebrandt deleted the nilAt branch January 28, 2025 12:54
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.

2 participants