Skip to content

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

Merged
tustvold merged 5 commits into
apache:mainfrom
tustvold:deprecate-scalar-value-bit-kernels
Aug 21, 2023
Merged

tustvold merged 5 commits into
apache:mainfrom
tustvold:deprecate-scalar-value-bit-kernels

Conversation

@tustvold

Copy link
Copy Markdown
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 Changes to the physical-expr crates label Aug 21, 2023
Some(distinct_values),
self.data_type.clone(),
)]
.map(|x| ScalarValue::new_primitive::<T>(Some(*x), &T::DATA_TYPE))

Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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

@alamb alamb left a comment

Copy link
Copy Markdown
Contributor

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

physical-expr Changes to the physical-expr crates

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants