-
Notifications
You must be signed in to change notification settings - Fork 28.3k
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
[SPARK-18939][SQL] Timezone support in partition values. #17053
Conversation
Test build #73406 has started for PR 17053 at commit |
@@ -251,7 +251,8 @@ abstract class ExternalCatalog { | |||
def listPartitionsByFilter( | |||
db: String, | |||
table: String, | |||
predicates: Seq[Expression]): Seq[CatalogTablePartition] | |||
predicates: Seq[Expression], | |||
defaultTimeZoneId: String): Seq[CatalogTablePartition] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we need to document what a timezone id is here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, I'll add it.
Test build #73409 has started for PR 17053 at commit |
Jenkins, retest this please. |
Test build #73413 has finished for PR 17053 at commit
|
Jenkins, retest this please. |
Test build #73418 has finished for PR 17053 at commit
|
Test build #73635 has finished for PR 17053 at commit
|
retest this please |
LGTM, pending tests |
Test build #73862 has finished for PR 17053 at commit
|
thanks, merging to master! |
What changes were proposed in this pull request?
This is a follow-up pr of #16308 and #16750.
This pr enables timezone support in partition values.
We should use
timeZone
option introduced at #16750 to parse/format partition values of theTimestampType
.For example, if you have timestamp
"2016-01-01 00:00:00"
inGMT
which will be used for partition values, the values written by the default timezone option, which is"GMT"
because the session local timezone is"GMT"
here, are:whereas setting the option to
"PST"
, they are:We can properly read the partition values if the session local timezone and the timezone of the partition values are the same:
And even if the timezones are different, we can properly read the values with setting corrent timezone option:
How was this patch tested?
Existing tests and added some tests.