This is an automated email from the ASF dual-hosted git repository. panxiaolei pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push: new 84792d0886 fix compile of master (#23467) 84792d0886 is described below commit 84792d08866c4d1e20564b263bfa793f7a8a559e 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 d3221590a3..4d9c6b0311 100644 --- a/be/src/vec/functions/function_cast.h +++ b/be/src/vec/functions/function_cast.h @@ -857,11 +857,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 1eb324c477..3565cc67d7 100644 --- a/be/src/vec/io/io_helper.h +++ b/be/src/vec/io/io_helper.h @@ -284,10 +284,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 @@ -311,10 +312,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 @@ -453,14 +455,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