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

Deprecate ScalarValue bitor, bitand, and bitxor (#6842) #7351

Merged
merged 5 commits into from
Aug 21, 2023

Conversation

tustvold
Copy link
Contributor

Which issue does this PR close?

Part of #6842

Rationale for this change

What changes are included in this PR?

Are these changes tested?

Are there any user-facing changes?

@tustvold tustvold added the api change Changes the API exposed to users of the crate label Aug 21, 2023
@github-actions github-actions bot added the physical-expr Physical Expressions label Aug 21, 2023
Some(distinct_values),
self.data_type.clone(),
)]
.map(|x| ScalarValue::new_primitive::<T>(Some(*x), &T::DATA_TYPE))
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is pretty gross, it occurs to me that ScalarValue not storing ArrayRef is pretty strange

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Created #7352

Copy link
Contributor

Choose a reason for hiding this comment

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

👍 I think this came up in a discussion before (distinct count I think).

/// # Panics
///
/// Panics if d is not compatible with T
pub fn new_primitive<T: ArrowPrimitiveType>(
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is the sort of thing that becomes so much simpler with #7353

@tustvold tustvold removed the api change Changes the API exposed to users of the crate label Aug 21, 2023
Copy link
Contributor

@alamb alamb left a comment

Choose a reason for hiding this comment

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

LGTM -- thank you @tustvold

I also think this likely will make the various bit aggregates substantially faster as well now that they have type specialized implementations rather than dynamic dispatch

cc @izveigor

@tustvold tustvold merged commit 835553e into apache:main Aug 21, 2023
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
physical-expr Physical Expressions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants