Skip to content

Commit

Permalink
remove hard-coded list of timezones
Browse files Browse the repository at this point in the history
  • Loading branch information
andygrove committed Nov 29, 2023
1 parent c4440ed commit 13eb70c
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,6 @@ object GpuOverrides extends Logging {
"the Unicode version used by cuDF and the JVM may differ, resulting in some " +
"corner-case characters not changing case correctly."
val UTC_TIMEZONE_ID = ZoneId.of("UTC").normalized()
val SUPPORTED_TIMEZONE_IDS = Seq("UTC", "Etc/UTC").map(ZoneId.of)
// Based on https://docs.oracle.com/javase/8/docs/api/java/util/regex/Pattern.html
private[this] lazy val regexList: Seq[String] = Seq("\\", "\u0000", "\\x", "\t", "\n", "\r",
"\f", "\\a", "\\e", "\\cx", "[", "]", "^", "&", ".", "*", "\\d", "\\D", "\\h", "\\H", "\\s",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ class GpuStructsToJsonMeta(
// tracking issue is https://github.com/NVIDIA/spark-rapids/issues/9602
willNotWorkOnGpu(s"Unsupported timestampFormat '$timestampFormat' in to_json")
}
if (!GpuOverrides.SUPPORTED_TIMEZONE_IDS.contains(options.zoneId)) {
if (options.zoneId.normalized() != GpuOverrides.UTC_TIMEZONE_ID) {
// we hard-code the timezone `Z` in GpuCast.castTimestampToJson
// so we need to fall back if expr different timeZone is specified
willNotWorkOnGpu(s"Unsupported timeZone '${options.zoneId}' in to_json")
Expand Down

0 comments on commit 13eb70c

Please sign in to comment.