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 scalar_at_unchecked #666

Merged
merged 8 commits into from
Aug 21, 2024
Merged

Add scalar_at_unchecked #666

merged 8 commits into from
Aug 21, 2024

Conversation

AdamGS
Copy link
Contributor

@AdamGS AdamGS commented Aug 21, 2024

This PR serves two pieces of future work:

  1. Iterator API for encodings that don't require some batched decompressing
  2. Allowing users/other parts of the system to just get values as cheaply as possible, eventually as primitive types without the Scalar wrapper.

} else {
return Ok(Scalar::null(self.dtype().clone()));
}
Ok(self.scalar_at_unchecked(index))
Copy link
Contributor

Choose a reason for hiding this comment

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

will this still return Scalar::null?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The top-level function will do that check, if someone tries to access a logically null value they will probably get 0 but its undefined territory IMO

@AdamGS AdamGS force-pushed the adamg/unchecked-scalar branch from 1469c0a to 35e4517 Compare August 21, 2024 13:25
@AdamGS AdamGS enabled auto-merge (squash) August 21, 2024 14:49
@AdamGS AdamGS merged commit d42c013 into develop Aug 21, 2024
4 checks passed
@AdamGS AdamGS deleted the adamg/unchecked-scalar branch August 21, 2024 14:57
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.

3 participants