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 add_scalar kernel #1151

Merged
merged 2 commits into from Jan 11, 2022
Merged

Add add_scalar kernel #1151

merged 2 commits into from Jan 11, 2022

Conversation

viirya
Copy link
Member

@viirya viirya commented Jan 10, 2022

Which issue does this PR close?

Closes #1153.

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 Jan 10, 2022
@viirya viirya force-pushed the add_scalar branch 2 times, most recently from 0a4cfb8 to c33e680 Compare January 11, 2022 01:15
+ One,
{
#[cfg(feature = "simd")]
return simd_add_scalar(&array, scalar);
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 you could reuse simd_float_unary_math_op here with a small modification, that method should work for any primitive types without the restriction on T: datatypes::ArrowFloatNumericType

Copy link
Member Author

Choose a reason for hiding this comment

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

Sounds good. Didn't find simd_float_unary_math_op there. Seems okay. Let me update.

@codecov-commenter
Copy link

codecov-commenter commented Jan 11, 2022

Codecov Report

Merging #1151 (9aec376) into master (719096b) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff            @@
##           master    #1151    +/-   ##
========================================
  Coverage   82.55%   82.56%            
========================================
  Files         169      170     +1     
  Lines       50456    50623   +167     
========================================
+ Hits        41655    41797   +142     
- Misses       8801     8826    +25     
Impacted Files Coverage Δ
arrow/src/compute/kernels/arithmetic.rs 84.64% <100.00%> (+0.50%) ⬆️
parquet/src/arrow/array_reader.rs 77.23% <0.00%> (-1.03%) ⬇️
arrow/src/datatypes/datatype.rs 66.38% <0.00%> (-0.43%) ⬇️
parquet_derive/src/parquet_field.rs 66.21% <0.00%> (-0.23%) ⬇️
arrow/src/array/transform/mod.rs 85.56% <0.00%> (-0.14%) ⬇️
arrow/src/array/builder.rs 86.49% <0.00%> (-0.01%) ⬇️
parquet/src/data_type.rs 76.84% <0.00%> (ø)
parquet/src/compression.rs 88.59% <0.00%> (ø)
parquet/src/arrow/arrow_writer.rs 98.07% <0.00%> (ø)
arrow/src/array/transform/utils.rs 100.00% <0.00%> (ø)
... and 8 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 719096b...9aec376. Read the comment docs.

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.

Looks good to me -- thank you @viirya ❤️

@alamb alamb merged commit 762685b into apache:master Jan 11, 2022
@viirya
Copy link
Member Author

viirya commented Jan 11, 2022

Thank you @alamb !

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.

Support scalar mathematics kernels for Array and scalar value
4 participants