Skip to content

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 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
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
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