This is an automated email from the ASF dual-hosted git repository.
changchen pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-gluten.git
The following commit(s) were added to refs/heads/main by this push:
new 7a036dd6e [GLUTEN-5939][CH] Support java timezone id named 'GMT+8' or
'GMT+08:00' (#5940)
7a036dd6e is described below
commit 7a036dd6e1e386f49650aebece12860996eda12d
Author: Shuai li <[email protected]>
AuthorDate: Mon Jun 3 09:57:36 2024 +0800
[GLUTEN-5939][CH] Support java timezone id named 'GMT+8' or 'GMT+08:00'
(#5940)
* support java timezone
* update ch
---
.../gluten/execution/GlutenClickHouseDatetimeExpressionSuite.scala | 3 ++-
cpp-ch/clickhouse.version | 2 +-
cpp-ch/local-engine/Common/CHUtil.cpp | 7 ++++---
3 files changed, 7 insertions(+), 5 deletions(-)
diff --git
a/backends-clickhouse/src/test/scala/org/apache/gluten/execution/GlutenClickHouseDatetimeExpressionSuite.scala
b/backends-clickhouse/src/test/scala/org/apache/gluten/execution/GlutenClickHouseDatetimeExpressionSuite.scala
index 295ad4f25..534166075 100644
---
a/backends-clickhouse/src/test/scala/org/apache/gluten/execution/GlutenClickHouseDatetimeExpressionSuite.scala
+++
b/backends-clickhouse/src/test/scala/org/apache/gluten/execution/GlutenClickHouseDatetimeExpressionSuite.scala
@@ -41,6 +41,7 @@ class GlutenClickHouseDatetimeExpressionSuite
.set("spark.sql.shuffle.partitions", "5")
.set("spark.sql.autoBroadcastJoinThreshold", "10MB")
.set("spark.sql.adaptive.enabled", "true")
+ .set("spark.sql.session.timeZone", "GMT+08:00")
}
override protected def createTPCHNotNullTables(): Unit = {
@@ -143,7 +144,7 @@ class GlutenClickHouseDatetimeExpressionSuite
| date_trunc('month', t) c
|from date_trunc_tmp1
|""".stripMargin
- compareResultsAgainstVanillaSpark(sql2, true, { _ => }, false)
+ compareResultsAgainstVanillaSpark(sql2, true, { _ => })
}
}
diff --git a/cpp-ch/clickhouse.version b/cpp-ch/clickhouse.version
index 5125aabe5..97e9df5a7 100644
--- a/cpp-ch/clickhouse.version
+++ b/cpp-ch/clickhouse.version
@@ -1,3 +1,3 @@
CH_ORG=Kyligence
CH_BRANCH=rebase_ch/20240527
-CH_COMMIT=55b10ba376274f2a61a4c1daf1a2fb744155bd32
+CH_COMMIT=7ebb938593259aeb09952289ef7553b045ce4c15
diff --git a/cpp-ch/local-engine/Common/CHUtil.cpp
b/cpp-ch/local-engine/Common/CHUtil.cpp
index 42787172a..e37114756 100644
--- a/cpp-ch/local-engine/Common/CHUtil.cpp
+++ b/cpp-ch/local-engine/Common/CHUtil.cpp
@@ -585,12 +585,13 @@ void
BackendInitializerUtil::initEnvs(DB::Context::ConfigurationPtr config)
/// Set environment variable TZ if possible
if (config->has("timezone"))
{
- const String timezone_name = config->getString("timezone");
- if (0 != setenv("TZ", timezone_name.data(), 1)) /// NOLINT
+ const std::string config_timezone = config->getString("timezone");
+ const String mapped_timezone =
DateLUT::mappingForJavaTimezone(config_timezone);
+ if (0 != setenv("TZ", mapped_timezone.data(), 1)) //
NOLINT(concurrency-mt-unsafe) // ok if not called concurrently with other
setenv/getenv
throw Poco::Exception("Cannot setenv TZ variable");
tzset();
- DateLUT::setDefaultTimezone(timezone_name);
+ DateLUT::setDefaultTimezone(mapped_timezone);
}
/// Set environment variable LIBHDFS3_CONF if possible
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]