This is an automated email from the ASF dual-hosted git repository.
yiguolei 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 7571263ed7 [Bug][Vectorized] fix timestamp(datetime) not regist right
(#10525)
7571263ed7 is described below
commit 7571263ed767a017eb115a22993138667c5fa5b4
Author: Pxl <[email protected]>
AuthorDate: Fri Jul 1 07:37:44 2022 +0800
[Bug][Vectorized] fix timestamp(datetime) not regist right (#10525)
---
be/src/vec/functions/date_time_transforms.h | 10 ++++------
be/src/vec/functions/simple_function_factory.h | 1 +
be/src/vec/functions/to_time_function.cpp | 3 ---
3 files changed, 5 insertions(+), 9 deletions(-)
diff --git a/be/src/vec/functions/date_time_transforms.h
b/be/src/vec/functions/date_time_transforms.h
index 93a0876aeb..5942d72de1 100644
--- a/be/src/vec/functions/date_time_transforms.h
+++ b/be/src/vec/functions/date_time_transforms.h
@@ -137,7 +137,6 @@ struct TimeStampImpl {
template <typename DateValueType, typename ArgType>
struct DayNameImpl {
using ARG_TYPE = ArgType;
- using DATE_TYPE = DateValueType;
static constexpr auto name = "dayname";
static constexpr auto max_size = MAX_DAY_NAME_LEN;
@@ -158,7 +157,7 @@ struct DayNameImpl {
}
static DataTypes get_variadic_argument_types() {
- if constexpr (std::is_same_v<DATE_TYPE, VecDateTimeValue>) {
+ if constexpr (std::is_same_v<DateValueType, VecDateTimeValue>) {
return {std::make_shared<DataTypeDateTime>()};
} else {
return {std::make_shared<DataTypeDateV2>()};
@@ -169,12 +168,11 @@ struct DayNameImpl {
template <typename DateValueType, typename ArgType>
struct MonthNameImpl {
using ARG_TYPE = ArgType;
- using DATE_TYPE = DateValueType;
static constexpr auto name = "monthname";
static constexpr auto max_size = MAX_MONTH_NAME_LEN;
- static inline auto execute(const DATE_TYPE& dt, ColumnString::Chars&
res_data, size_t& offset,
- bool& is_null) {
+ static inline auto execute(const DateValueType& dt, ColumnString::Chars&
res_data,
+ size_t& offset, bool& is_null) {
const auto* month_name = dt.month_name();
is_null = !dt.is_valid_date();
if (month_name == nullptr || is_null) {
@@ -190,7 +188,7 @@ struct MonthNameImpl {
}
static DataTypes get_variadic_argument_types() {
- if constexpr (std::is_same_v<DATE_TYPE, VecDateTimeValue>) {
+ if constexpr (std::is_same_v<DateValueType, VecDateTimeValue>) {
return {std::make_shared<DataTypeDateTime>()};
} else {
return {std::make_shared<DataTypeDateV2>()};
diff --git a/be/src/vec/functions/simple_function_factory.h
b/be/src/vec/functions/simple_function_factory.h
index 32042095ff..a30fe275b0 100644
--- a/be/src/vec/functions/simple_function_factory.h
+++ b/be/src/vec/functions/simple_function_factory.h
@@ -145,6 +145,7 @@ public:
return iter->second()->build(arguments, return_type);
}
+ LOG(WARNING) << fmt::format("Function signature {} is not founded",
key_str);
return nullptr;
}
diff --git a/be/src/vec/functions/to_time_function.cpp
b/be/src/vec/functions/to_time_function.cpp
index 3a7c6dba78..812e16fbad 100644
--- a/be/src/vec/functions/to_time_function.cpp
+++ b/be/src/vec/functions/to_time_function.cpp
@@ -68,8 +68,6 @@ using FunctionDate =
using FunctionDateV2 =
FunctionDateOrDateTimeToSomething<DataTypeDateV2,
DateImpl<DateV2Value, UInt32>>;
using FunctionTimeStamp = FunctionDateOrDateTimeToSomething<DataTypeDateTime,
TimeStampImpl<Int64>>;
-using FunctionTimeStampV2 =
- FunctionDateOrDateTimeToSomething<DataTypeDateV2,
TimeStampImpl<UInt32>>;
void register_function_to_time_function(SimpleFunctionFactory& factory) {
factory.register_function<FunctionSecond>();
@@ -95,7 +93,6 @@ void
register_function_to_time_function(SimpleFunctionFactory& factory) {
factory.register_function<FunctionToDaysV2>();
factory.register_function<FunctionToDateV2>();
factory.register_function<FunctionDateV2>();
- factory.register_function<FunctionTimeStampV2>();
}
} // namespace doris::vectorized
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]