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 2b5f95f08a [Bug](function) remove datev2 signature of hour_ceil/hour_floor #16168 2b5f95f08a is described below commit 2b5f95f08a20e6c3df72fb4627540a97437e3a2c Author: Pxl <pxl...@qq.com> AuthorDate: Sun Jan 29 11:27:56 2023 +0800 [Bug](function) remove datev2 signature of hour_ceil/hour_floor #16168 --- be/src/exec/exec_node.cpp | 2 -- be/src/vec/columns/column_vector.cpp | 3 +-- .../vec/functions/function_datetime_floor_ceil.cpp | 1 - .../expressions/functions/scalar/HourCeil.java | 9 +------- .../expressions/functions/scalar/HourFloor.java | 9 +------- gensrc/script/doris_builtins_functions.py | 24 ---------------------- 6 files changed, 3 insertions(+), 45 deletions(-) diff --git a/be/src/exec/exec_node.cpp b/be/src/exec/exec_node.cpp index 08d7986c52..71fdf829fd 100644 --- a/be/src/exec/exec_node.cpp +++ b/be/src/exec/exec_node.cpp @@ -28,7 +28,6 @@ #include "common/object_pool.h" #include "common/status.h" #include "runtime/descriptors.h" -#include "runtime/exec_env.h" #include "runtime/memory/mem_tracker.h" #include "runtime/runtime_state.h" #include "util/debug_util.h" @@ -48,7 +47,6 @@ #include "vec/exec/vdata_gen_scan_node.h" #include "vec/exec/vempty_set_node.h" #include "vec/exec/vexchange_node.h" -#include "vec/exec/vmysql_scan_node.h" #include "vec/exec/vrepeat_node.h" #include "vec/exec/vschema_scan_node.h" #include "vec/exec/vselect_node.h" diff --git a/be/src/vec/columns/column_vector.cpp b/be/src/vec/columns/column_vector.cpp index 0ca8bbdecb..8e4bcfb5df 100644 --- a/be/src/vec/columns/column_vector.cpp +++ b/be/src/vec/columns/column_vector.cpp @@ -345,8 +345,7 @@ Float64 ColumnVector<T>::get_float64(size_t n) const { template <typename T> void ColumnVector<T>::insert_range_from(const IColumn& src, size_t start, size_t length) { - const ColumnVector& src_vec = dynamic_cast<const ColumnVector&>(src); - + const ColumnVector& src_vec = assert_cast<const ColumnVector&>(src); if (start + length > src_vec.data.size()) { LOG(FATAL) << fmt::format( "Parameters start = {}, length = {}, are out of bound in " diff --git a/be/src/vec/functions/function_datetime_floor_ceil.cpp b/be/src/vec/functions/function_datetime_floor_ceil.cpp index 72da82928b..8555aa8986 100644 --- a/be/src/vec/functions/function_datetime_floor_ceil.cpp +++ b/be/src/vec/functions/function_datetime_floor_ceil.cpp @@ -426,7 +426,6 @@ struct TimeRound { bool is_neg = step < 0; TimeInterval interval(Impl::Unit, is_neg ? -step : step, is_neg); is_null = !ts1.template date_add_interval<Impl::Unit>(interval); - return; } template <typename NativeType, typename DateValueType> diff --git a/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/expressions/functions/scalar/HourCeil.java b/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/expressions/functions/scalar/HourCeil.java index 1480e14565..44416df744 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/expressions/functions/scalar/HourCeil.java +++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/expressions/functions/scalar/HourCeil.java @@ -24,7 +24,6 @@ import org.apache.doris.nereids.trees.expressions.functions.ExplicitlyCastableSi import org.apache.doris.nereids.trees.expressions.visitor.ExpressionVisitor; import org.apache.doris.nereids.types.DateTimeType; import org.apache.doris.nereids.types.DateTimeV2Type; -import org.apache.doris.nereids.types.DateV2Type; import org.apache.doris.nereids.types.IntegerType; import com.google.common.base.Preconditions; @@ -41,22 +40,16 @@ public class HourCeil extends ScalarFunction public static final List<FunctionSignature> SIGNATURES = ImmutableList.of( FunctionSignature.ret(DateTimeType.INSTANCE).args(DateTimeType.INSTANCE), FunctionSignature.ret(DateTimeV2Type.SYSTEM_DEFAULT).args(DateTimeV2Type.SYSTEM_DEFAULT), - FunctionSignature.ret(DateTimeV2Type.SYSTEM_DEFAULT).args(DateV2Type.INSTANCE), FunctionSignature.ret(DateTimeType.INSTANCE).args(DateTimeType.INSTANCE, DateTimeType.INSTANCE), FunctionSignature.ret(DateTimeType.INSTANCE).args(DateTimeType.INSTANCE, IntegerType.INSTANCE), FunctionSignature.ret(DateTimeV2Type.SYSTEM_DEFAULT) .args(DateTimeV2Type.SYSTEM_DEFAULT, DateTimeV2Type.SYSTEM_DEFAULT), FunctionSignature.ret(DateTimeV2Type.SYSTEM_DEFAULT) .args(DateTimeV2Type.SYSTEM_DEFAULT, IntegerType.INSTANCE), - FunctionSignature.ret(DateTimeV2Type.SYSTEM_DEFAULT).args(DateV2Type.INSTANCE, DateV2Type.INSTANCE), - FunctionSignature.ret(DateTimeV2Type.SYSTEM_DEFAULT).args(DateV2Type.INSTANCE, IntegerType.INSTANCE), FunctionSignature.ret(DateTimeType.INSTANCE) .args(DateTimeType.INSTANCE, IntegerType.INSTANCE, DateTimeType.INSTANCE), FunctionSignature.ret(DateTimeV2Type.SYSTEM_DEFAULT) - .args(DateTimeV2Type.SYSTEM_DEFAULT, IntegerType.INSTANCE, DateTimeV2Type.SYSTEM_DEFAULT), - FunctionSignature.ret(DateTimeV2Type.SYSTEM_DEFAULT) - .args(DateV2Type.INSTANCE, IntegerType.INSTANCE, DateV2Type.INSTANCE) - ); + .args(DateTimeV2Type.SYSTEM_DEFAULT, IntegerType.INSTANCE, DateTimeV2Type.SYSTEM_DEFAULT)); /** * constructor with 1 argument. diff --git a/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/expressions/functions/scalar/HourFloor.java b/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/expressions/functions/scalar/HourFloor.java index b5bf9d810d..8a42ccdeab 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/expressions/functions/scalar/HourFloor.java +++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/expressions/functions/scalar/HourFloor.java @@ -24,7 +24,6 @@ import org.apache.doris.nereids.trees.expressions.functions.ExplicitlyCastableSi import org.apache.doris.nereids.trees.expressions.visitor.ExpressionVisitor; import org.apache.doris.nereids.types.DateTimeType; import org.apache.doris.nereids.types.DateTimeV2Type; -import org.apache.doris.nereids.types.DateV2Type; import org.apache.doris.nereids.types.IntegerType; import com.google.common.base.Preconditions; @@ -41,22 +40,16 @@ public class HourFloor extends ScalarFunction public static final List<FunctionSignature> SIGNATURES = ImmutableList.of( FunctionSignature.ret(DateTimeType.INSTANCE).args(DateTimeType.INSTANCE), FunctionSignature.ret(DateTimeV2Type.SYSTEM_DEFAULT).args(DateTimeV2Type.SYSTEM_DEFAULT), - FunctionSignature.ret(DateTimeV2Type.SYSTEM_DEFAULT).args(DateV2Type.INSTANCE), FunctionSignature.ret(DateTimeType.INSTANCE).args(DateTimeType.INSTANCE, DateTimeType.INSTANCE), FunctionSignature.ret(DateTimeType.INSTANCE).args(DateTimeType.INSTANCE, IntegerType.INSTANCE), FunctionSignature.ret(DateTimeV2Type.SYSTEM_DEFAULT) .args(DateTimeV2Type.SYSTEM_DEFAULT, DateTimeV2Type.SYSTEM_DEFAULT), FunctionSignature.ret(DateTimeV2Type.SYSTEM_DEFAULT) .args(DateTimeV2Type.SYSTEM_DEFAULT, IntegerType.INSTANCE), - FunctionSignature.ret(DateTimeV2Type.SYSTEM_DEFAULT).args(DateV2Type.INSTANCE, DateV2Type.INSTANCE), - FunctionSignature.ret(DateTimeV2Type.SYSTEM_DEFAULT).args(DateV2Type.INSTANCE, IntegerType.INSTANCE), FunctionSignature.ret(DateTimeType.INSTANCE) .args(DateTimeType.INSTANCE, IntegerType.INSTANCE, DateTimeType.INSTANCE), FunctionSignature.ret(DateTimeV2Type.SYSTEM_DEFAULT) - .args(DateTimeV2Type.SYSTEM_DEFAULT, IntegerType.INSTANCE, DateTimeV2Type.SYSTEM_DEFAULT), - FunctionSignature.ret(DateTimeV2Type.SYSTEM_DEFAULT) - .args(DateV2Type.INSTANCE, IntegerType.INSTANCE, DateV2Type.INSTANCE) - ); + .args(DateTimeV2Type.SYSTEM_DEFAULT, IntegerType.INSTANCE, DateTimeV2Type.SYSTEM_DEFAULT)); /** * constructor with 1 argument. diff --git a/gensrc/script/doris_builtins_functions.py b/gensrc/script/doris_builtins_functions.py index e353e44a5b..a6f5c47252 100755 --- a/gensrc/script/doris_builtins_functions.py +++ b/gensrc/script/doris_builtins_functions.py @@ -1700,30 +1700,6 @@ visible_functions = [ [['day_ceil'], 'DATEV2', ['DATEV2', 'INT', 'DATEV2'], '_ZN5doris18TimestampFunctions8day_ceilEPN9doris_udf15FunctionContextERKNS1_11DateTimeV2ValERKNS1_6IntValES6_', '', '', 'vec', 'ALWAYS_NULLABLE'], - [['hour_floor'], 'DATETIMEV2', ['DATEV2'], - '_ZN5doris18TimestampFunctions10hour_floorEPN9doris_udf15FunctionContextERKNS1_11DateTimeV2ValE', - '', '', 'vec', 'ALWAYS_NULLABLE'], - [['hour_floor'], 'DATETIMEV2', ['DATEV2', 'DATEV2'], - '_ZN5doris18TimestampFunctions10hour_floorEPN9doris_udf15FunctionContextERKNS1_11DateTimeV2ValES6_', - '', '', 'vec', 'ALWAYS_NULLABLE'], - [['hour_floor'], 'DATETIMEV2', ['DATEV2', 'INT'], - '_ZN5doris18TimestampFunctions10hour_floorEPN9doris_udf15FunctionContextERKNS1_11DateTimeV2ValERKNS1_6IntValE', - '', '', 'vec', 'ALWAYS_NULLABLE'], - [['hour_floor'], 'DATETIMEV2', ['DATEV2', 'INT', 'DATEV2'], - '_ZN5doris18TimestampFunctions10hour_floorEPN9doris_udf15FunctionContextERKNS1_11DateTimeV2ValERKNS1_6IntValES6_', - '', '', 'vec', 'ALWAYS_NULLABLE'], - [['hour_ceil'], 'DATETIMEV2', ['DATEV2'], - '_ZN5doris18TimestampFunctions9hour_ceilEPN9doris_udf15FunctionContextERKNS1_11DateTimeV2ValE', - '', '', 'vec', 'ALWAYS_NULLABLE'], - [['hour_ceil'], 'DATETIMEV2', ['DATEV2', 'DATEV2'], - '_ZN5doris18TimestampFunctions9hour_ceilEPN9doris_udf15FunctionContextERKNS1_11DateTimeV2ValES6_', - '', '', 'vec', 'ALWAYS_NULLABLE'], - [['hour_ceil'], 'DATETIMEV2', ['DATEV2', 'INT'], - '_ZN5doris18TimestampFunctions9hour_ceilEPN9doris_udf15FunctionContextERKNS1_11DateTimeV2ValERKNS1_6IntValE', - '', '', 'vec', 'ALWAYS_NULLABLE'], - [['hour_ceil'], 'DATETIMEV2', ['DATEV2', 'INT', 'DATEV2'], - '_ZN5doris18TimestampFunctions9hour_ceilEPN9doris_udf15FunctionContextERKNS1_11DateTimeV2ValERKNS1_6IntValES6_', - '', '', 'vec', 'ALWAYS_NULLABLE'], [['minute_floor'], 'DATETIMEV2', ['DATEV2'], '_ZN5doris18TimestampFunctions12minute_floorEPN9doris_udf15FunctionContextERKNS1_11DateTimeV2ValE', '', '', 'vec', 'ALWAYS_NULLABLE'], --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org