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

Implement TimeStampXXXTZVector for parquet isAdjustedToUTC #926 #576 #577 #927

Draft
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

laurentperez
Copy link

@laurentperez laurentperez commented Oct 17, 2024

@laurentperez
Copy link
Author

@fb64 might interest you ;)

@laurentperez laurentperez changed the title Implement TimeStampMicroTZVector for parquet isAdjustedToUTC timestam… Implement TimeStampMicroTZVector for parquet isAdjustedToUTC #926 Oct 17, 2024
@laurentperez laurentperez changed the title Implement TimeStampMicroTZVector for parquet isAdjustedToUTC #926 Implement TimeStampMicroTZVector for parquet isAdjustedToUTC #926 #576 #577 Oct 17, 2024
@fb64
Copy link
Contributor

fb64 commented Oct 18, 2024

@fb64 might interest you ;)

Yes, it's part of missing mapping for some Arrow Types.
It would be nice to extend it to the others missing TimeStamp*TZVector Types : TimeStampSecTZVector, TimeStampNanoVector, TimeStampMilliTZVector

Also you can add those types to this test

@laurentperez laurentperez marked this pull request as draft October 18, 2024 14:43
@laurentperez laurentperez changed the title Implement TimeStampMicroTZVector for parquet isAdjustedToUTC #926 #576 #577 Implement TimeStampXXXTZVector for parquet isAdjustedToUTC #926 #576 #577 Oct 18, 2024
@laurentperez laurentperez marked this pull request as ready for review October 18, 2024 20:40
if (isNull(i)) {
null
} else {
DateUtility.getLocalDateTimeFromEpochMilli(TimeUnit.SECONDS.toMillis(getObject(it)), this.timeZone)
Copy link
Author

Choose a reason for hiding this comment

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

at second glance I'm not so sure about this one.
Parquet does not have seconds precision and my PR is for Parquet, but pyarrow feather can .floor('S') its datetimes.

I'm not sure what's going to be present in its .feather file, either seconds or milliseconds.

I need to test this against a .feather file together with seconds precision and timezone awareness, perhaps one from https://github.com/Kotlin/dataframe/tree/master/dataframe-arrow/src/test/resources

Copy link
Contributor

Choose a reason for hiding this comment

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

Your pull request focuses on Parquet, but it would be beneficial to incorporate upgrades for all Arrow TimeStamp types as well, because Parquet reading (in my PR) relies totally on Arrow.
The test testTimeStamp covers both cases for IPC format and Feather format (by using ArrowStreamWriter and ArrowFileWriter), so you only should add TimeStampNanoTZVector,TimeStampMicroVector and TimeStampSecTZVector to the writeArrowTimestamp method and to the expected DataFrame in testTimeStamp as you did for TimeStampMicroTZVector.
Finally as your PR improves Arrow types compatibility it could be merge independently of #577 (IMHO) 😃

@laurentperez laurentperez marked this pull request as draft October 20, 2024 19:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants