Skip to content

Commit

Permalink
Address comments
Browse files Browse the repository at this point in the history
  • Loading branch information
weixiuli committed Jan 22, 2025
1 parent a84c127 commit e7079e6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions cpp/velox/compute/WholeStageResultIterator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -554,8 +554,9 @@ std::unordered_map<std::string, std::string> WholeStageResultIterator::getQueryC
// Enable Spark legacy date formatter if spark.sql.legacy.timeParserPolicy is set to 'LEGACY'
// or 'legacy'.
auto sparkPolicy = veloxCfg_->get<std::string>(kSparkLegacyTimeParserPolicy, "");
std::transform(
sparkPolicy.begin(), sparkPolicy.end(), sparkPolicy.begin(), [](unsigned char c) { return std::toupper(c); });
for (auto& c : sparkPolicy) {
c = std::toupper(static_cast<unsigned char>(c));
}
if (sparkPolicy == "LEGACY") {
configs[velox::core::QueryConfig::kSparkLegacyDateFormatter] = "true";
} else {
Expand Down

0 comments on commit e7079e6

Please sign in to comment.