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 unary_cmp #1991

Merged
merged 5 commits into from Jul 4, 2022
Merged

Add unary_cmp #1991

merged 5 commits into from Jul 4, 2022

Conversation

viirya
Copy link
Member

@viirya viirya commented Jul 2, 2022

Which issue does this PR close?

Closes #1987.

Rationale for this change

What changes are included in this PR?

Are there any user-facing changes?

@github-actions github-actions bot added the arrow Changes to the arrow crate label Jul 2, 2022
@codecov-commenter
Copy link

codecov-commenter commented Jul 2, 2022

Codecov Report

Merging #1991 (1793862) into master (ccddaa8) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master    #1991   +/-   ##
=======================================
  Coverage   83.57%   83.57%           
=======================================
  Files         221      222    +1     
  Lines       57482    57550   +68     
=======================================
+ Hits        48043    48100   +57     
- Misses       9439     9450   +11     
Impacted Files Coverage Δ
arrow/src/compute/kernels/comparison.rs 92.59% <100.00%> (+0.03%) ⬆️
arrow/src/array/array_map.rs 83.07% <0.00%> (-1.74%) ⬇️
arrow/src/array/array_union.rs 90.14% <0.00%> (-0.78%) ⬇️
...row/src/array/builder/string_dictionary_builder.rs 91.36% <0.00%> (-0.37%) ⬇️
parquet/src/encodings/encoding.rs 93.43% <0.00%> (-0.20%) ⬇️
arrow/src/array/array.rs 92.05% <0.00%> (-0.16%) ⬇️
arrow/src/array/mod.rs 100.00% <0.00%> (ø)
arrow/src/json/reader.rs 84.58% <0.00%> (ø)
arrow/src/array/array_decimal.rs 92.88% <0.00%> (ø)
arrow/src/array/array_primitive.rs 95.81% <0.00%> (+0.03%) ⬆️
... and 11 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ccddaa8...1793862. Read the comment docs.

@viirya
Copy link
Member Author

viirya commented Jul 2, 2022

Unrelated error:

/usr/bin/ld: final link failed: No space left on device

Copy link
Contributor

@tustvold tustvold left a comment

Choose a reason for hiding this comment

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

Perhaps we could inline the macro in unary_op and make the other functions use it 🤔. Less macros is always good imo

@viirya
Copy link
Member Author

viirya commented Jul 4, 2022

Perhaps we could inline the macro in unary_op and make the other functions use it 🤔. Less macros is always good imo

Good idea!

I just tried it. However, compare_op_scalar as a macro is applied on not only PrimitiveArray, but also others like GenericStringArray. But unary_cmp API as a function is bound to PrimitiveArray only.

@viirya viirya merged commit 932ffc5 into apache:master Jul 4, 2022
return compare_op_scalar!(left, |a| a == right);
}

/// Applies an unary and infallible comparison function to a primitive array.
Copy link
Contributor

Choose a reason for hiding this comment

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

❤️ thank you @viirya

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
arrow Changes to the arrow crate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add kernel to quickly compute comparisons on Arrays
4 participants