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

[ISSUE 21] Adding timezone support #130

Closed
wants to merge 1 commit into from

Conversation

soojinj
Copy link
Contributor

@soojinj soojinj commented Mar 24, 2020

Issue #, if available:
#21

Description of changes:
SDK side of changes to support timezone

@soojinj soojinj requested review from avirtuos and atennak1 and removed request for avirtuos March 24, 2020 19:44
Copy link
Contributor

@atennak1 atennak1 left a comment

Choose a reason for hiding this comment

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

in a follow-up PR, we should create the associated extractors/fieldwriters/holders to make TIMESTAMPMILLI work with the extractor framework (and update the example connector to test it).

* Class for representing timezone to be used in encoding datetime value and timezone value to a single long
* a copy from Presto TimeZoneKey
*/
public final class TimeZoneKey
Copy link
Contributor

Choose a reason for hiding this comment

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

is it possible to unpack/pack only on the Athena side? We may be leaking too much Athena-specific nuance here.


/**
* Class for representing timezone to be used in encoding datetime value and timezone value to a single long
* a copy from Presto TimeZoneKey
Copy link
Contributor

Choose a reason for hiding this comment

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

if this is an exact copy you might need to copy attribution too. Do we really need it to be an exact copy?

Also, we need to be careful about what apache arrow type we are using for this. If a customer actually wants to use TIMESTAMPMILLI that seems to no longer be possible because we are now defining timestampmilli as something else.

Comment on lines +2 to +9
# DO NOT REMOVE OR MODIFY EXISTING ENTRIES
#
# This file contain the fixed numeric id of every supported time zone id.
# Every zone id in this file must be supported by java.util.TimeZone and the
# Joda time library. This is because Presto uses both java.util.TimeZone and
# the Joda time## for during execution.
#
# suppress inspection "UnusedProperty" for whole file
Copy link
Contributor

Choose a reason for hiding this comment

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

This file makes me super nervous. Can't we get this from Java runtime somehow? what happens if we country changes its offset?


/**
* Class for testing timezone to be used in encoding datetime value and timezone value to a single long
* a copy from Presto TimeZoneKeyTest
Copy link
Contributor

Choose a reason for hiding this comment

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

please ensure we are putting proper attribution to presto for any code that we reuse.

@soojinj soojinj closed this Apr 14, 2020
@soojinj soojinj deleted the soojin_time branch April 14, 2020 22:30
abhishekpradeepmishra pushed a commit to abhishekpradeepmishra/aws-athena-query-federation that referenced this pull request Nov 1, 2021
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.

3 participants