From ca7141203a0ac4fe113d85c56a489d71d56c50b5 Mon Sep 17 00:00:00 2001 From: NEUpanning Date: Sat, 21 Sep 2024 23:39:14 +0800 Subject: [PATCH] fix ci --- velox/functions/sparksql/DateTimeFunctions.h | 32 ++++++++++---------- velox/functions/sparksql/Split.h | 2 +- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/velox/functions/sparksql/DateTimeFunctions.h b/velox/functions/sparksql/DateTimeFunctions.h index ba4a8f520a67..2908f5d62826 100644 --- a/velox/functions/sparksql/DateTimeFunctions.h +++ b/velox/functions/sparksql/DateTimeFunctions.h @@ -224,13 +224,13 @@ struct UnixTimestampParseWithFormatFunction const core::QueryConfig& config, const arg_type* /*input*/, const arg_type* format) { - legacyDateFormatter_ = config.sparkLegacyDateFormatter(); + legacyFormatter_ = config.sparkLegacyDateFormatter(); if (format != nullptr) { try { this->format_ = detail::getDateTimeFormatter( std::string_view(format->data(), format->size()), - legacyDateFormatter_ ? DateTimeFormatterType::STRICT_SIMPLE - : DateTimeFormatterType::JODA); + legacyFormatter_ ? DateTimeFormatterType::STRICT_SIMPLE + : DateTimeFormatterType::JODA); } catch (const VeloxUserError&) { invalidFormat_ = true; } @@ -252,8 +252,8 @@ struct UnixTimestampParseWithFormatFunction if (!isConstFormat_) { this->format_ = detail::getDateTimeFormatter( std::string_view(format.data(), format.size()), - legacyDateFormatter_ ? DateTimeFormatterType::STRICT_SIMPLE - : DateTimeFormatterType::JODA); + legacyFormatter_ ? DateTimeFormatterType::STRICT_SIMPLE + : DateTimeFormatterType::JODA); } } catch (const VeloxUserError&) { return false; @@ -272,7 +272,7 @@ struct UnixTimestampParseWithFormatFunction private: bool isConstFormat_{false}; bool invalidFormat_{false}; - bool legacyDateFormatter_{false}; + bool legacyFormatter_{false}; }; // Parses unix time in seconds to a formatted string. @@ -285,7 +285,7 @@ struct FromUnixtimeFunction { const core::QueryConfig& config, const arg_type* /*unixtime*/, const arg_type* format) { - legacyDateFormatter_ = config.sparkLegacyDateFormatter(); + legacyFormatter_ = config.sparkLegacyDateFormatter(); sessionTimeZone_ = getTimeZoneFromConfig(config); if (format != nullptr) { setFormatter(*format); @@ -312,8 +312,8 @@ struct FromUnixtimeFunction { FOLLY_ALWAYS_INLINE void setFormatter(const arg_type& format) { formatter_ = detail::getDateTimeFormatter( std::string_view(format.data(), format.size()), - legacyDateFormatter_ ? DateTimeFormatterType::STRICT_SIMPLE - : DateTimeFormatterType::JODA); + legacyFormatter_ ? DateTimeFormatterType::STRICT_SIMPLE + : DateTimeFormatterType::JODA); maxResultSize_ = formatter_->maxResultSize(sessionTimeZone_); } @@ -321,7 +321,7 @@ struct FromUnixtimeFunction { std::shared_ptr formatter_; uint32_t maxResultSize_; bool isConstantTimeFormat_{false}; - bool legacyDateFormatter_{false}; + bool legacyFormatter_{false}; }; template @@ -395,7 +395,7 @@ struct GetTimestampFunction { const core::QueryConfig& config, const arg_type* /*input*/, const arg_type* format) { - legacyDateFormatter_ = config.sparkLegacyDateFormatter(); + legacyFormatter_ = config.sparkLegacyDateFormatter(); auto sessionTimezoneName = config.sessionTimezone(); if (!sessionTimezoneName.empty()) { sessionTimeZone_ = tz::locateZone(sessionTimezoneName); @@ -403,8 +403,8 @@ struct GetTimestampFunction { if (format != nullptr) { formatter_ = detail::getDateTimeFormatter( std::string_view(*format), - legacyDateFormatter_ ? DateTimeFormatterType::STRICT_SIMPLE - : DateTimeFormatterType::JODA); + legacyFormatter_ ? DateTimeFormatterType::STRICT_SIMPLE + : DateTimeFormatterType::JODA); isConstantTimeFormat_ = true; } } @@ -416,8 +416,8 @@ struct GetTimestampFunction { if (!isConstantTimeFormat_) { formatter_ = detail::getDateTimeFormatter( std::string_view(format), - legacyDateFormatter_ ? DateTimeFormatterType::STRICT_SIMPLE - : DateTimeFormatterType::JODA); + legacyFormatter_ ? DateTimeFormatterType::STRICT_SIMPLE + : DateTimeFormatterType::JODA); } auto dateTimeResult = formatter_->parse(std::string_view(input)); // Null as result for parsing error. @@ -440,7 +440,7 @@ struct GetTimestampFunction { std::shared_ptr formatter_{nullptr}; bool isConstantTimeFormat_{false}; const tz::TimeZone* sessionTimeZone_{tz::locateZone(0)}; // default to GMT. - bool legacyDateFormatter_{false}; + bool legacyFormatter_{false}; }; template diff --git a/velox/functions/sparksql/Split.h b/velox/functions/sparksql/Split.h index 86fdde503ced..2cee345f77b2 100644 --- a/velox/functions/sparksql/Split.h +++ b/velox/functions/sparksql/Split.h @@ -165,6 +165,6 @@ struct Split { result.add_item().setNoCopy(StringView(start + pos, end - pos)); } - mutable detail::ReCache cache_; + mutable facebook::velox::functions::detail::ReCache cache_; }; } // namespace facebook::velox::functions::sparksql