This is an automated email from the ASF dual-hosted git repository. kxiao pushed a commit to branch branch-2.0 in repository https://gitbox.apache.org/repos/asf/doris.git
commit eb33c87a1dcf9abf4cd717e35484ce478b35b18c Author: zclllyybb <zhaochan...@selectdb.com> AuthorDate: Fri Aug 25 11:47:39 2023 +0800 fix compile of master (#23467) --- be/src/vec/functions/function_cast.h | 4 ++-- be/src/vec/io/io_helper.h | 18 ++++++++++-------- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/be/src/vec/functions/function_cast.h b/be/src/vec/functions/function_cast.h index e0e7f8d0fe..b64d5ba9fd 100644 --- a/be/src/vec/functions/function_cast.h +++ b/be/src/vec/functions/function_cast.h @@ -856,11 +856,11 @@ bool try_parse_impl(typename DataType::FieldType& x, ReadBuffer& rb, std::shared_mutex& cache_lock, Additions additions [[maybe_unused]] = Additions()) { if constexpr (IsDateTimeType<DataType>) { - return try_read_datetime_text(x, rb, local_time_zone, time_zone_cache); + return try_read_datetime_text(x, rb, local_time_zone, time_zone_cache, cache_lock); } if constexpr (IsDateType<DataType>) { - return try_read_date_text(x, rb, local_time_zone, time_zone_cache); + return try_read_date_text(x, rb, local_time_zone, time_zone_cache, cache_lock); } if constexpr (IsDateV2Type<DataType>) { diff --git a/be/src/vec/io/io_helper.h b/be/src/vec/io/io_helper.h index 547277bcc4..c8bc6d7c7c 100644 --- a/be/src/vec/io/io_helper.h +++ b/be/src/vec/io/io_helper.h @@ -285,10 +285,11 @@ bool read_date_text_impl(T& x, ReadBuffer& buf) { template <typename T> bool read_date_text_impl(T& x, ReadBuffer& buf, const cctz::time_zone& local_time_zone, - ZoneList& time_zone_cache) { + ZoneList& time_zone_cache, std::shared_mutex& cache_lock) { static_assert(std::is_same_v<Int64, T>); auto dv = binary_cast<Int64, VecDateTimeValue>(x); - auto ans = dv.from_date_str(buf.position(), buf.count(), local_time_zone, time_zone_cache); + auto ans = dv.from_date_str(buf.position(), buf.count(), local_time_zone, time_zone_cache, + &cache_lock); dv.cast_to_date(); // only to match the is_all_read() check to prevent return null @@ -312,10 +313,11 @@ bool read_datetime_text_impl(T& x, ReadBuffer& buf) { template <typename T> bool read_datetime_text_impl(T& x, ReadBuffer& buf, const cctz::time_zone& local_time_zone, - ZoneList& time_zone_cache) { + ZoneList& time_zone_cache, std::shared_mutex& cache_lock) { static_assert(std::is_same_v<Int64, T>); auto dv = binary_cast<Int64, VecDateTimeValue>(x); - auto ans = dv.from_date_str(buf.position(), buf.count(), local_time_zone, time_zone_cache); + auto ans = dv.from_date_str(buf.position(), buf.count(), local_time_zone, time_zone_cache, + &cache_lock); dv.to_datetime(); // only to match the is_all_read() check to prevent return null @@ -454,14 +456,14 @@ bool try_read_decimal_text(T& x, ReadBuffer& in, UInt32 precision, UInt32 scale) template <typename T> bool try_read_datetime_text(T& x, ReadBuffer& in, const cctz::time_zone& local_time_zone, - ZoneList& time_zone_cache) { - return read_datetime_text_impl<T>(x, in, local_time_zone, time_zone_cache); + ZoneList& time_zone_cache, std::shared_mutex& cache_lock) { + return read_datetime_text_impl<T>(x, in, local_time_zone, time_zone_cache, cache_lock); } template <typename T> bool try_read_date_text(T& x, ReadBuffer& in, const cctz::time_zone& local_time_zone, - ZoneList& time_zone_cache) { - return read_date_text_impl<T>(x, in, local_time_zone, time_zone_cache); + ZoneList& time_zone_cache, std::shared_mutex& cache_lock) { + return read_date_text_impl<T>(x, in, local_time_zone, time_zone_cache, cache_lock); } template <typename T> --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org