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

Fix logical type issues in the Parquet writer #14322

Merged

Conversation

vuule
Copy link
Contributor

@vuule vuule commented Oct 24, 2023

Description

Closes #14315
Closes #14326

Parquet writer writes time and timestamp types with logical type with isAdjustedToUTC as false. However, timestamps in libcudf tables are implicitly in UTC and don't need to be adjusted.
This PR changes the isAdjustedToUTC to true.

Also added a writer option to write timestamps as local, as this is the expected behavior on the Python side.

Also changed the way logical type is handled for UNKNOWN type columns in merge_row_group_metadata - the logical type is excluded from merged metadata because of issues with type inference.

Checklist

  • I am familiar with the Contributing Guidelines.
  • New or existing tests cover these changes.
  • The documentation is up to date with these changes.

@vuule vuule added bug Something isn't working cuIO cuIO issue non-breaking Non-breaking change labels Oct 24, 2023
@vuule vuule self-assigned this Oct 24, 2023
@github-actions github-actions bot added the libcudf Affects libcudf (C++/CUDA) code. label Oct 24, 2023
@vuule vuule mentioned this pull request Oct 24, 2023
3 tasks
@vuule
Copy link
Contributor Author

vuule commented Oct 24, 2023

CC @galipremsagar @rjzamora for impact on the Python side
We have failing tests because pandas sets AdjustedToUTC to false by default so we get type mismatch.

Copy link
Member

@jlowe jlowe left a comment

Choose a reason for hiding this comment

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

Built a new libcudf with this change and verified the failing Spark Parquet predicate pushdown tests for timestamps are passing again.

@github-actions github-actions bot added the Python Affects Python cuDF API. label Oct 25, 2023
@vuule vuule changed the title Parquet writer - fix logical type for timestamp columns Fix logical type issues in the Parquet writer Oct 25, 2023
@vuule
Copy link
Contributor Author

vuule commented Oct 25, 2023

Thank you @etseidl for the merge_row_group_metadata patch!

@vuule vuule marked this pull request as ready for review October 27, 2023 15:40
@vuule vuule requested review from a team as code owners October 27, 2023 15:40
Copy link
Contributor

@galipremsagar galipremsagar left a comment

Choose a reason for hiding this comment

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

@vuule vuule requested a review from a team as a code owner October 27, 2023 16:49
Copy link
Contributor

@galipremsagar galipremsagar left a comment

Choose a reason for hiding this comment

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

Thank you both so much for tackling this @vuule @etseidl !

@vuule
Copy link
Contributor Author

vuule commented Oct 31, 2023

/merge

@rapids-bot rapids-bot bot merged commit f4c95aa into rapidsai:branch-23.12 Oct 31, 2023
56 of 57 checks passed
@vuule vuule deleted the bug-write_parquet-adjusted-to-utc branch October 31, 2023 15:55
@rjzamora
Copy link
Member

Thanks so much @vuule and @etseidl !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working cuIO cuIO issue libcudf Affects libcudf (C++/CUDA) code. non-breaking Non-breaking change Python Affects Python cuDF API.
Projects
Archived in project
7 participants