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 JNI for extract_quarter, add_calendrical_months, and is_leap_year #8863

Merged
merged 4 commits into from
Jul 28, 2021

Conversation

revans2
Copy link
Contributor

@revans2 revans2 commented Jul 27, 2021

A number of new APIs have been added to cudf c++ date time processing. This wraps them with corresponding java APIs and adds a few tests.

@revans2 revans2 added 3 - Ready for Review Ready for review by team Java Affects Java cuDF API. 4 - Needs cuDF (Java) Reviewer non-breaking Non-breaking change labels Jul 27, 2021
@revans2 revans2 self-assigned this Jul 27, 2021
@revans2 revans2 requested a review from a team as a code owner July 27, 2021 16:21
@revans2 revans2 added the improvement Improvement / enhancement to an existing function label Jul 27, 2021
@revans2
Copy link
Contributor Author

revans2 commented Jul 27, 2021

This is not really a high priority for Spark.

We already support quarter of the year by getting the month and doing a bit of math with it. This should hopefully speed that up, but we have not seen it as slow in any actual queries.

add_calendrical_months should allow us to support adding months to dates and timestamps, but Spark supports INT32 instead of INT16 for the type and we currently only support scalar values to add, which this does not. It is still a good step.

Spark has no SQL API for leap year detection so that is not going to help much yet.

I just thought it would be good to keep the APIs up to date.

@revans2
Copy link
Contributor Author

revans2 commented Jul 27, 2021

rerun tests

@revans2
Copy link
Contributor Author

revans2 commented Jul 28, 2021

rerun tests

@codecov
Copy link

codecov bot commented Jul 28, 2021

Codecov Report

Merging #8863 (9a8c7bc) into branch-21.10 (18f7c01) will decrease coverage by 0.08%.
The diff coverage is n/a.

❗ Current head 9a8c7bc differs from pull request most recent head 22b9d6d. Consider uploading reports for the commit 22b9d6d to get more accurate results
Impacted file tree graph

@@               Coverage Diff                @@
##           branch-21.10    #8863      +/-   ##
================================================
- Coverage         10.67%   10.59%   -0.09%     
================================================
  Files               110      116       +6     
  Lines             18271    19037     +766     
================================================
+ Hits               1951     2017      +66     
- Misses            16320    17020     +700     
Impacted Files Coverage Δ
python/cudf/cudf/__init__.py 0.00% <ø> (ø)
python/cudf/cudf/core/__init__.py 0.00% <ø> (ø)
python/cudf/cudf/core/column/categorical.py 0.00% <ø> (ø)
python/cudf/cudf/core/column/column.py 0.00% <ø> (ø)
python/cudf/cudf/core/column/lists.py 0.00% <ø> (ø)
python/cudf/cudf/core/column/numerical.py 0.00% <ø> (ø)
python/cudf/cudf/core/column/string.py 0.00% <ø> (ø)
python/cudf/cudf/core/column/struct.py 0.00% <ø> (ø)
python/cudf/cudf/core/dataframe.py 0.00% <ø> (ø)
python/cudf/cudf/core/frame.py 0.00% <ø> (ø)
... and 75 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 5d5bb2c...22b9d6d. Read the comment docs.

@revans2
Copy link
Contributor Author

revans2 commented Jul 28, 2021

@gpucibot merge

@rapids-bot rapids-bot bot merged commit 013897d into rapidsai:branch-21.10 Jul 28, 2021
@revans2 revans2 deleted the jni_datetime_update branch July 28, 2021 20:22
@vyasr vyasr added 4 - Needs Review Waiting for reviewer to review or respond and removed 4 - Needs cuDF (Java) Reviewer labels Feb 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3 - Ready for Review Ready for review by team 4 - Needs Review Waiting for reviewer to review or respond improvement Improvement / enhancement to an existing function Java Affects Java cuDF API. non-breaking Non-breaking change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants