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 C data interface for decimal128 and timestamp #453

Merged
merged 2 commits into from
Jun 23, 2021

Conversation

alippai
Copy link
Contributor

@alippai alippai commented Jun 13, 2021

Which issue does this PR close?

Closes #413.

Rationale for this change

It's missing from the current API

What changes are included in this PR?

Handling of Decimal on the FFI is implemented

Are there any user-facing changes?

New datatype is added to a current interface

@alippai
Copy link
Contributor Author

alippai commented Jun 13, 2021

@jorgecarleitao @kszucs I assume this needs integration tests (and docs if succeeded) with the C++ implementation, but I don't know how to add it.

@codecov-commenter
Copy link

codecov-commenter commented Jun 13, 2021

Codecov Report

Merging #453 (4201ae4) into master (4c7d418) will decrease coverage by 0.04%.
The diff coverage is 54.43%.

❗ Current head 4201ae4 differs from pull request most recent head 610ff6c. Consider uploading reports for the commit 610ff6c to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##           master     #453      +/-   ##
==========================================
- Coverage   82.65%   82.61%   -0.05%     
==========================================
  Files         165      165              
  Lines       45524    45602      +78     
==========================================
+ Hits        37628    37673      +45     
- Misses       7896     7929      +33     
Impacted Files Coverage Δ
arrow/src/ffi.rs 78.71% <54.43%> (-4.15%) ⬇️
parquet/src/encodings/encoding.rs 94.85% <0.00%> (-0.20%) ⬇️
arrow/src/array/equal/mod.rs 93.93% <0.00%> (+0.34%) ⬆️

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 4c7d418...610ff6c. Read the comment docs.

@alippai alippai force-pushed the feature/c-data-decimal branch 2 times, most recently from 4c20853 to 6d9ea41 Compare June 13, 2021 19:39
@alippai
Copy link
Contributor Author

alippai commented Jun 13, 2021

I think I found it (and added a test)

@alippai alippai force-pushed the feature/c-data-decimal branch 3 times, most recently from e6a3b97 to 5540d6d Compare June 13, 2021 22:06
arrow/src/ffi.rs Outdated Show resolved Hide resolved
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.

This code looks good to me. Thank you @alippai

@jorgecarleitao could you please review this PR as I am not super familiar with the FFI bindings?

Copy link
Member

@jorgecarleitao jorgecarleitao left a comment

Choose a reason for hiding this comment

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

Thanks a alot, @alippai , looks great! I left two small comments, but the implementation is solid! 👍

arrow/src/ffi.rs Outdated Show resolved Hide resolved
arrow/src/ffi.rs Outdated Show resolved Hide resolved
@alippai alippai force-pushed the feature/c-data-decimal branch 3 times, most recently from 303b666 to 47c3c8c Compare June 19, 2021 16:03
@github-actions github-actions bot added the arrow Changes to the arrow crate label Jun 20, 2021
@alippai alippai force-pushed the feature/c-data-decimal branch 2 times, most recently from de45abe to 04c3d67 Compare June 20, 2021 17:50
@alippai
Copy link
Contributor Author

alippai commented Jun 20, 2021

If you don't mind, I added an extra date32 integration test and timestamp support as well.

@alippai alippai requested a review from alamb June 20, 2021 17:56
@alippai alippai changed the title Add C data interface for decimal128 Add C data interface for decimal128 and timestamp Jun 20, 2021
@alippai
Copy link
Contributor Author

alippai commented Jun 23, 2021

@jorgecarleitao @alamb all comments are addressed, I think this is ready now.

Copy link
Member

@jorgecarleitao jorgecarleitao left a comment

Choose a reason for hiding this comment

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

Looks great! Thanks a lot, @alippai , excellent work 👍

@jorgecarleitao jorgecarleitao merged commit 8672274 into apache:master Jun 23, 2021
alamb pushed a commit that referenced this pull request Jun 23, 2021
* Add C data interface for decimal128

* Add timestamp support to C data interface

Add extra date32 inttegration test
alamb added a commit that referenced this pull request Jun 23, 2021
* Add C data interface for decimal128

* Add timestamp support to C data interface

Add extra date32 inttegration test

Co-authored-by: Ádám Lippai <adam@rigo.sk>
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.

C data interface for decimal128, timestamp, date32 and date64
4 participants