-
Notifications
You must be signed in to change notification settings - Fork 867
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
Use take for dictionary like comparisons #3313
Conversation
@@ -214,7 +215,10 @@ pub fn like_utf8_scalar_dyn( | |||
DataType::Dictionary(_, _) => { | |||
downcast_dictionary_array!( | |||
left => { | |||
like_dict_scalar(left, right) | |||
let dict_comparison = like_utf8_scalar_dyn(left.values().as_ref(), right)?; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The duplication is slightly unfortunate, but will hopefully get cleaned up as part of #3296
arrow-string/Cargo.toml
Outdated
@@ -42,6 +42,7 @@ arrow-buffer = { version = "28.0.0", path = "../arrow-buffer" } | |||
arrow-data = { version = "28.0.0", path = "../arrow-data" } | |||
arrow-schema = { version = "28.0.0", path = "../arrow-schema" } | |||
arrow-array = { version = "28.0.0", path = "../arrow-array" } | |||
arrow-select = { version = "28.0.0", path = "../arrow-select" } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is somewhat unfortunate, but arrow-select is fairly foundational so I'm not too worried
/// [`StringArray`]/[`LargeStringArray`] and a scalar. | ||
/// | ||
/// See the documentation on [`like_utf8`] for more details. | ||
fn like_dict_scalar<K: ArrowPrimitiveType>( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
5699cfb
to
dc292c7
Compare
dc292c7
to
9ec64ac
Compare
Which issue does this PR close?
Closes #.
Rationale for this change
Other comparison kernels perform an operation on the underlying child array, before taking the result based on the dictionary indexes. Especially for more expensive operations like those involving strings, this can yield significant returns. As an added bonus it results in less codegen
What changes are included in this PR?
Are there any user-facing changes?