You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@gluten.apache.org by "jackylee-ch (via GitHub)" <gi...@apache.org> on 2025/01/22 06:37:49 UTC
Re: [PR] [GLUTEN-8581][VL] Fix Spark legacy date formatter under case insensitive configuration [incubator-gluten]
jackylee-ch commented on code in PR #8583:
URL: https://github.com/apache/incubator-gluten/pull/8583#discussion_r1924769682
##########
cpp/velox/compute/WholeStageResultIterator.cc:
##########
@@ -551,8 +551,13 @@ std::unordered_map<std::string, std::string> WholeStageResultIterator::getQueryC
configs[velox::core::QueryConfig::kSparkPartitionId] = std::to_string(taskInfo_.partitionId);
- // Enable Spark legacy date formatter if spark.sql.legacy.timeParserPolicy is set to 'LEGACY'.
- if (veloxCfg_->get<std::string>(kSparkLegacyTimeParserPolicy, "") == "LEGACY") {
+ // Enable Spark legacy date formatter if spark.sql.legacy.timeParserPolicy is set to 'LEGACY'
+ // or 'legacy'.
+ auto sparkPolicy = veloxCfg_->get<std::string>(kSparkLegacyTimeParserPolicy, "");
+ for (auto& c : sparkPolicy) {
+ c = std::toupper(static_cast<unsigned char>(c));
+ }
+ if (sparkPolicy == "LEGACY") {
Review Comment:
It seems this is a common issue while passing config from jvm to c++, maybe we should done this in GlutenConfig while `getNativeSessionConf`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@gluten.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@gluten.apache.org
For additional commands, e-mail: commits-help@gluten.apache.org