-
Notifications
You must be signed in to change notification settings - Fork 237
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
Support from_utc_timestamp on the GPU for non-UTC timezones (non-DST) #9810
Support from_utc_timestamp on the GPU for non-UTC timezones (non-DST) #9810
Conversation
Signed-off-by: Navin Kumar <[email protected]>
… executor, use this in tests Signed-off-by: Navin Kumar <[email protected]>
…u-timezone-non-repeating-transition
…u-timezone-non-repeating-transition
…nd hide behind a config flag when first expression using it is completed. Signed-off-by: Navin Kumar <[email protected]>
…ezone support Signed-off-by: Navin Kumar <[email protected]>
…n-DST timezones Signed-off-by: Navin Kumar <[email protected]>
inputCv, | ||
ZoneId.of(zoneStr)) | ||
withResource(createColumnVector(epochSeconds)) { inputCv => | ||
val actualRet = if (useGPU) { |
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.
No need to compare CPU TimezoneDB
result against Spark.
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.
this includes part of another PR #9739 which should be merged first after NVIDIA/spark-rapids-jni#1553 is merged
Signed-off-by: Navin Kumar <[email protected]>
…u-from-utc-timestamp
build |
1 similar comment
build |
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.
General looks good to me. A few minor comments left.
val epochDays = getEpochDays(startYear, endYear) | ||
testFromDateToTimestamp(epochDays, zoneStr) | ||
} | ||
} | ||
|
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.
nit: revert this.
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.
What did you indicate to revert?
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.
extra line 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.
Per style, we generally have a blank line at the end of every file btw.
class TimeZoneSuite extends SparkQueryCompareTestSuite with BeforeAndAfterAll { | ||
private val useGPU = true | ||
private val testAllTimezones = false | ||
private val testAllYears = false |
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.
nit: parameterized this in test cases below?
…u-from-utc-timestamp
…st proper fallback Signed-off-by: Navin Kumar <[email protected]>
Signed-off-by: Navin Kumar <[email protected]>
build |
1 similar comment
build |
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.
In general this looks good, but I really want to see us starting to run automated tests in other time zones. Have you tested the date_time_test.py changes with TZ set to a non-UTC time zone?
|
||
@pytest.mark.parametrize('time_zone', ["UTC", "Asia/Shanghai", "EST", "MST", "VST"], ids=idfn) | ||
@pytest.mark.parametrize('data_gen', [timestamp_gen], ids=idfn) | ||
@pytest.mark.xfail(condition = is_not_utc(), reason = 'xfail non-UTC time zone tests because of https://github.com/NVIDIA/spark-rapids/issues/9653') | ||
def test_from_utc_timestamp_supported_timezones(data_gen, time_zone): | ||
# Remove spark.rapids.test.CPU.timezone configuration when GPU kernel is ready to really test on GPU | ||
# TODO: Remove spark.rapids.sql.nonUTC.enabled configuration |
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.
Is there an issue for this?
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.
Created #9881 and added to timezone epic
I have tested it with other timezones. |
Automated testing of non-UTC timezones should be captured by #9855 and #9633 |
Fixes #9802 and closes #6831
This uses the GpuTimeZoneDB from spark-rapids-jni to enable from_utc_timestamp on the GPU for non-UTC timezones (currently without DST).