zhztheplayer commented on code in PR #8583:
URL: https://github.com/apache/incubator-gluten/pull/8583#discussion_r1924836994


##########
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:
   +1



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to