Skip to content

Commit

Permalink
[GLUTEN-2306][VL] Pass spark session timezone to velox's config (apac…
Browse files Browse the repository at this point in the history
  • Loading branch information
PHILO-HE authored Jul 14, 2023
1 parent b3b80d5 commit f51c6a1
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 2 additions & 0 deletions cpp/core/config/GlutenConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ const std::string kGlutenSaveDir = "spark.gluten.saveDir";

const std::string kCaseSensitive = "spark.sql.caseSensitive";

const std::string kSessionTimezone = "spark.sql.session.timeZone";

const std::string kSparkOffHeapMemory = "spark.gluten.memory.offHeap.size.in.bytes";

const std::string kSparkTaskOffHeapMemory = "spark.gluten.memory.task.offHeap.size.in.bytes";
Expand Down
1 change: 1 addition & 0 deletions cpp/velox/compute/WholeStageResultIterator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,7 @@ std::unordered_map<std::string, std::string> WholeStageResultIterator::getQueryC
configs[velox::core::QueryConfig::kCastToIntByTruncate] = std::to_string(true);
// To align with Spark's behavior, allow decimal in casting string to int.
configs[velox::core::QueryConfig::kCastIntAllowDecimal] = std::to_string(true);
configs[velox::core::QueryConfig::kSessionTimezone] = getConfigValue(kSessionTimezone, "");

// Set the max memory of partial aggregation as 3/4 of offheap size.
auto maxMemory =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ object GlutenConfig {
// unit: SECONDS, default 1 day
val GLUTEN_RESOURCE_RELATION_EXPIRED_TIME_DEFAULT: Int = 86400

// Supported hive/pthon/scala udf names
// Supported hive/python/scala udf names
val GLUTEN_SUPPORTED_HIVE_UDFS = "spark.gluten.supported.hive.udfs"
val GLUTEN_SUPPORTED_PYTHON_UDFS = "spark.gluten.supported.python.udfs"
val GLUTEN_SUPPORTED_SCALA_UDFS = "spark.gluten.supported.scala.udfs"
Expand Down Expand Up @@ -359,7 +359,8 @@ object GlutenConfig {
val keys = ImmutableList.of(
GLUTEN_SAVE_DIR,
GLUTEN_TASK_OFFHEAP_SIZE_IN_BYTES_KEY,
GLUTEN_MAX_BATCH_SIZE_KEY
GLUTEN_MAX_BATCH_SIZE_KEY,
SQLConf.SESSION_LOCAL_TIMEZONE.key
)
keys.forEach(
k => {
Expand Down

0 comments on commit f51c6a1

Please sign in to comment.