zclllyybb commented on code in PR #56807:
URL: https://github.com/apache/doris/pull/56807#discussion_r2488660042
##########
be/src/vec/functions/function_date_or_datetime_computation.h:
##########
@@ -797,7 +797,7 @@ class FunctionCurrentDateOrDateTime : public IFunction {
template <typename FunctionName, bool WithPrecision>
struct CurrentDateTimeImpl {
static constexpr auto name = FunctionName::name;
- static constexpr PrimitiveType ReturnType = WithPrecision ?
TYPE_DATETIMEV2 : TYPE_DATETIME;
Review Comment:
这个地方是不是本来就应该都是v2?
##########
be/src/vec/functions/array/function_array_index.h:
##########
@@ -456,6 +446,18 @@ class FunctionArrayIndex : public IFunction {
offsets, nested_null_map, *nested_column,
*right_column,
right_nested_null_map, array_null_map);
}
+ } else if (left_element_type->get_primitive_type() == TYPE_DATEV2) {
Review Comment:
where are these before?
##########
be/src/vec/functions/function_date_or_datetime_computation_v2.cpp:
##########
Review Comment:
have you removed the v1.cpp file?
##########
be/src/vec/functions/function_unary_arithmetic.h:
##########
@@ -105,19 +122,18 @@ class FunctionUnaryArithmetic : public IFunction {
bool valid =
cast_type(block.get_by_position(arguments[0]).type.get(),
[&](const auto& type) {
using DataType = std::decay_t<decltype(type)>;
- using T0 = typename DataType::FieldType;
if constexpr (IsDataTypeDecimal<DataType>) {
- if constexpr (allow_decimal) {
+ if (allow_decimal) {
Review Comment:
constexpr
##########
regression-test/suites/correctness_p0/test_function_signature_all_types.groovy:
##########
@@ -0,0 +1,1033 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements. See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership. The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied. See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+suite("test_function_signature_all_types", 'nonConcurrent') {
+ // Save and set config to allow DATE V1 creation
+ def configResult = sql "SHOW FRONTEND CONFIG LIKE 'disable_datev1'"
+ logger.info("configResult: ${configResult}")
+ assert configResult.size() == 1
+
+ def originDisableDatev1 = configResult[0][1]
+ logger.info("disable_datev1: $originDisableDatev1")
+
+ sql "ADMIN SET FRONTEND CONFIG ('disable_datev1' = 'false')"
Review Comment:
also dsiable `enable_date_conversion` before test
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]