Coverage Report

Created: 2026-03-31 21:56

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
be/src/exprs/function/cast/function_cast_date.cpp
Line
Count
Source
1
// Licensed to the Apache Software Foundation (ASF) under one
2
// or more contributor license agreements.  See the NOTICE file
3
// distributed with this work for additional information
4
// regarding copyright ownership.  The ASF licenses this file
5
// to you under the Apache License, Version 2.0 (the
6
// "License"); you may not use this file except in compliance
7
// with the License.  You may obtain a copy of the License at
8
//
9
//   http://www.apache.org/licenses/LICENSE-2.0
10
//
11
// Unless required by applicable law or agreed to in writing,
12
// software distributed under the License is distributed on an
13
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14
// KIND, either express or implied.  See the License for the
15
// specific language governing permissions and limitations
16
// under the License.
17
18
#include "core/data_type/data_type_date.h"
19
#include "core/data_type/data_type_date_or_datetime_v2.h"
20
#include "core/data_type/data_type_date_time.h"
21
#include "core/data_type/data_type_time.h"
22
#include "exprs/function/cast/cast_to_date.h"
23
24
namespace doris::CastWrapper {
25
26
template <typename ToDataType> // must datelike type
27
159
WrapperType create_datelike_wrapper(FunctionContext* context, const DataTypePtr& from_type) {
28
159
    std::shared_ptr<CastToBase> cast_to_datelike;
29
30
159
    auto make_datelike_wrapper = [&](const auto& types) -> bool {
31
159
        using Types = std::decay_t<decltype(types)>;
32
159
        using FromDataType = typename Types::LeftType;
33
        if constexpr (CastUtil::IsPureDigitType<FromDataType> || IsDatelikeTypes<FromDataType> ||
34
                      IsStringType<FromDataType> ||
35
159
                      std::is_same_v<FromDataType, DataTypeTimeStampTz>) {
36
159
            if (context->enable_strict_mode()) {
37
128
                cast_to_datelike = std::make_shared<
38
128
                        CastToImpl<CastModeType::StrictMode, FromDataType, ToDataType>>();
39
128
            } else {
40
31
                cast_to_datelike = std::make_shared<
41
31
                        CastToImpl<CastModeType::NonStrictMode, FromDataType, ToDataType>>();
42
31
            }
43
159
            return true;
44
159
        } else {
45
0
            return false;
46
0
        }
47
159
    };
Unexecuted instantiation: _ZZN5doris11CastWrapper23create_datelike_wrapperINS_12DataTypeDateEEESt8functionIFNS_6StatusEPNS_15FunctionContextERNS_5BlockERKSt6vectorIjSaIjEEjmPKhEES6_RKSt10shared_ptrIKNS_9IDataTypeEEENKUlRKT_E_clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE2EEEvEEEEbSQ_
Unexecuted instantiation: _ZZN5doris11CastWrapper23create_datelike_wrapperINS_12DataTypeDateEEESt8functionIFNS_6StatusEPNS_15FunctionContextERNS_5BlockERKSt6vectorIjSaIjEEjmPKhEES6_RKSt10shared_ptrIKNS_9IDataTypeEEENKUlRKT_E_clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE3EEEvEEEEbSQ_
Unexecuted instantiation: _ZZN5doris11CastWrapper23create_datelike_wrapperINS_12DataTypeDateEEESt8functionIFNS_6StatusEPNS_15FunctionContextERNS_5BlockERKSt6vectorIjSaIjEEjmPKhEES6_RKSt10shared_ptrIKNS_9IDataTypeEEENKUlRKT_E_clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE4EEEvEEEEbSQ_
Unexecuted instantiation: _ZZN5doris11CastWrapper23create_datelike_wrapperINS_12DataTypeDateEEESt8functionIFNS_6StatusEPNS_15FunctionContextERNS_5BlockERKSt6vectorIjSaIjEEjmPKhEES6_RKSt10shared_ptrIKNS_9IDataTypeEEENKUlRKT_E_clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE5EEEvEEEEbSQ_
Unexecuted instantiation: _ZZN5doris11CastWrapper23create_datelike_wrapperINS_12DataTypeDateEEESt8functionIFNS_6StatusEPNS_15FunctionContextERNS_5BlockERKSt6vectorIjSaIjEEjmPKhEES6_RKSt10shared_ptrIKNS_9IDataTypeEEENKUlRKT_E_clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE6EEEvEEEEbSQ_
Unexecuted instantiation: _ZZN5doris11CastWrapper23create_datelike_wrapperINS_12DataTypeDateEEESt8functionIFNS_6StatusEPNS_15FunctionContextERNS_5BlockERKSt6vectorIjSaIjEEjmPKhEES6_RKSt10shared_ptrIKNS_9IDataTypeEEENKUlRKT_E_clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE7EEEvEEEEbSQ_
Unexecuted instantiation: _ZZN5doris11CastWrapper23create_datelike_wrapperINS_12DataTypeDateEEESt8functionIFNS_6StatusEPNS_15FunctionContextERNS_5BlockERKSt6vectorIjSaIjEEjmPKhEES6_RKSt10shared_ptrIKNS_9IDataTypeEEENKUlRKT_E_clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE8EEEvEEEEbSQ_
Unexecuted instantiation: _ZZN5doris11CastWrapper23create_datelike_wrapperINS_12DataTypeDateEEESt8functionIFNS_6StatusEPNS_15FunctionContextERNS_5BlockERKSt6vectorIjSaIjEEjmPKhEES6_RKSt10shared_ptrIKNS_9IDataTypeEEENKUlRKT_E_clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE9EEEvEEEEbSQ_
Unexecuted instantiation: _ZZN5doris11CastWrapper23create_datelike_wrapperINS_12DataTypeDateEEESt8functionIFNS_6StatusEPNS_15FunctionContextERNS_5BlockERKSt6vectorIjSaIjEEjmPKhEES6_RKSt10shared_ptrIKNS_9IDataTypeEEENKUlRKT_E_clINS_8TypePairINS_15DataTypeDecimalILNS_13PrimitiveTypeE28EEEvEEEEbSQ_
Unexecuted instantiation: _ZZN5doris11CastWrapper23create_datelike_wrapperINS_12DataTypeDateEEESt8functionIFNS_6StatusEPNS_15FunctionContextERNS_5BlockERKSt6vectorIjSaIjEEjmPKhEES6_RKSt10shared_ptrIKNS_9IDataTypeEEENKUlRKT_E_clINS_8TypePairINS_15DataTypeDecimalILNS_13PrimitiveTypeE29EEEvEEEEbSQ_
Unexecuted instantiation: _ZZN5doris11CastWrapper23create_datelike_wrapperINS_12DataTypeDateEEESt8functionIFNS_6StatusEPNS_15FunctionContextERNS_5BlockERKSt6vectorIjSaIjEEjmPKhEES6_RKSt10shared_ptrIKNS_9IDataTypeEEENKUlRKT_E_clINS_8TypePairINS_15DataTypeDecimalILNS_13PrimitiveTypeE20EEEvEEEEbSQ_
Unexecuted instantiation: _ZZN5doris11CastWrapper23create_datelike_wrapperINS_12DataTypeDateEEESt8functionIFNS_6StatusEPNS_15FunctionContextERNS_5BlockERKSt6vectorIjSaIjEEjmPKhEES6_RKSt10shared_ptrIKNS_9IDataTypeEEENKUlRKT_E_clINS_8TypePairINS_15DataTypeDecimalILNS_13PrimitiveTypeE30EEEvEEEEbSQ_
Unexecuted instantiation: _ZZN5doris11CastWrapper23create_datelike_wrapperINS_12DataTypeDateEEESt8functionIFNS_6StatusEPNS_15FunctionContextERNS_5BlockERKSt6vectorIjSaIjEEjmPKhEES6_RKSt10shared_ptrIKNS_9IDataTypeEEENKUlRKT_E_clINS_8TypePairINS_15DataTypeDecimalILNS_13PrimitiveTypeE35EEEvEEEEbSQ_
Unexecuted instantiation: _ZZN5doris11CastWrapper23create_datelike_wrapperINS_12DataTypeDateEEESt8functionIFNS_6StatusEPNS_15FunctionContextERNS_5BlockERKSt6vectorIjSaIjEEjmPKhEES6_RKSt10shared_ptrIKNS_9IDataTypeEEENKUlRKT_E_clINS_8TypePairIS2_vEEEEbSQ_
Unexecuted instantiation: _ZZN5doris11CastWrapper23create_datelike_wrapperINS_12DataTypeDateEEESt8functionIFNS_6StatusEPNS_15FunctionContextERNS_5BlockERKSt6vectorIjSaIjEEjmPKhEES6_RKSt10shared_ptrIKNS_9IDataTypeEEENKUlRKT_E_clINS_8TypePairINS_14DataTypeDateV2EvEEEEbSQ_
Unexecuted instantiation: _ZZN5doris11CastWrapper23create_datelike_wrapperINS_12DataTypeDateEEESt8functionIFNS_6StatusEPNS_15FunctionContextERNS_5BlockERKSt6vectorIjSaIjEEjmPKhEES6_RKSt10shared_ptrIKNS_9IDataTypeEEENKUlRKT_E_clINS_8TypePairINS_18DataTypeDateTimeV2EvEEEEbSQ_
Unexecuted instantiation: _ZZN5doris11CastWrapper23create_datelike_wrapperINS_12DataTypeDateEEESt8functionIFNS_6StatusEPNS_15FunctionContextERNS_5BlockERKSt6vectorIjSaIjEEjmPKhEES6_RKSt10shared_ptrIKNS_9IDataTypeEEENKUlRKT_E_clINS_8TypePairINS_16DataTypeDateTimeEvEEEEbSQ_
Unexecuted instantiation: _ZZN5doris11CastWrapper23create_datelike_wrapperINS_12DataTypeDateEEESt8functionIFNS_6StatusEPNS_15FunctionContextERNS_5BlockERKSt6vectorIjSaIjEEjmPKhEES6_RKSt10shared_ptrIKNS_9IDataTypeEEENKUlRKT_E_clINS_8TypePairINS_14DataTypeTimeV2EvEEEEbSQ_
Unexecuted instantiation: _ZZN5doris11CastWrapper23create_datelike_wrapperINS_12DataTypeDateEEESt8functionIFNS_6StatusEPNS_15FunctionContextERNS_5BlockERKSt6vectorIjSaIjEEjmPKhEES6_RKSt10shared_ptrIKNS_9IDataTypeEEENKUlRKT_E_clINS_8TypePairINS_19DataTypeTimeStampTzEvEEEEbSQ_
Unexecuted instantiation: _ZZN5doris11CastWrapper23create_datelike_wrapperINS_12DataTypeDateEEESt8functionIFNS_6StatusEPNS_15FunctionContextERNS_5BlockERKSt6vectorIjSaIjEEjmPKhEES6_RKSt10shared_ptrIKNS_9IDataTypeEEENKUlRKT_E_clINS_8TypePairINS_12DataTypeIPv4EvEEEEbSQ_
Unexecuted instantiation: _ZZN5doris11CastWrapper23create_datelike_wrapperINS_12DataTypeDateEEESt8functionIFNS_6StatusEPNS_15FunctionContextERNS_5BlockERKSt6vectorIjSaIjEEjmPKhEES6_RKSt10shared_ptrIKNS_9IDataTypeEEENKUlRKT_E_clINS_8TypePairINS_12DataTypeIPv6EvEEEEbSQ_
Unexecuted instantiation: _ZZN5doris11CastWrapper23create_datelike_wrapperINS_12DataTypeDateEEESt8functionIFNS_6StatusEPNS_15FunctionContextERNS_5BlockERKSt6vectorIjSaIjEEjmPKhEES6_RKSt10shared_ptrIKNS_9IDataTypeEEENKUlRKT_E_clINS_8TypePairINS_14DataTypeStringEvEEEEbSQ_
Unexecuted instantiation: _ZZN5doris11CastWrapper23create_datelike_wrapperINS_16DataTypeDateTimeEEESt8functionIFNS_6StatusEPNS_15FunctionContextERNS_5BlockERKSt6vectorIjSaIjEEjmPKhEES6_RKSt10shared_ptrIKNS_9IDataTypeEEENKUlRKT_E_clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE2EEEvEEEEbSQ_
Unexecuted instantiation: _ZZN5doris11CastWrapper23create_datelike_wrapperINS_16DataTypeDateTimeEEESt8functionIFNS_6StatusEPNS_15FunctionContextERNS_5BlockERKSt6vectorIjSaIjEEjmPKhEES6_RKSt10shared_ptrIKNS_9IDataTypeEEENKUlRKT_E_clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE3EEEvEEEEbSQ_
Unexecuted instantiation: _ZZN5doris11CastWrapper23create_datelike_wrapperINS_16DataTypeDateTimeEEESt8functionIFNS_6StatusEPNS_15FunctionContextERNS_5BlockERKSt6vectorIjSaIjEEjmPKhEES6_RKSt10shared_ptrIKNS_9IDataTypeEEENKUlRKT_E_clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE4EEEvEEEEbSQ_
Unexecuted instantiation: _ZZN5doris11CastWrapper23create_datelike_wrapperINS_16DataTypeDateTimeEEESt8functionIFNS_6StatusEPNS_15FunctionContextERNS_5BlockERKSt6vectorIjSaIjEEjmPKhEES6_RKSt10shared_ptrIKNS_9IDataTypeEEENKUlRKT_E_clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE5EEEvEEEEbSQ_
Unexecuted instantiation: _ZZN5doris11CastWrapper23create_datelike_wrapperINS_16DataTypeDateTimeEEESt8functionIFNS_6StatusEPNS_15FunctionContextERNS_5BlockERKSt6vectorIjSaIjEEjmPKhEES6_RKSt10shared_ptrIKNS_9IDataTypeEEENKUlRKT_E_clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE6EEEvEEEEbSQ_
Unexecuted instantiation: _ZZN5doris11CastWrapper23create_datelike_wrapperINS_16DataTypeDateTimeEEESt8functionIFNS_6StatusEPNS_15FunctionContextERNS_5BlockERKSt6vectorIjSaIjEEjmPKhEES6_RKSt10shared_ptrIKNS_9IDataTypeEEENKUlRKT_E_clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE7EEEvEEEEbSQ_
Unexecuted instantiation: _ZZN5doris11CastWrapper23create_datelike_wrapperINS_16DataTypeDateTimeEEESt8functionIFNS_6StatusEPNS_15FunctionContextERNS_5BlockERKSt6vectorIjSaIjEEjmPKhEES6_RKSt10shared_ptrIKNS_9IDataTypeEEENKUlRKT_E_clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE8EEEvEEEEbSQ_
Unexecuted instantiation: _ZZN5doris11CastWrapper23create_datelike_wrapperINS_16DataTypeDateTimeEEESt8functionIFNS_6StatusEPNS_15FunctionContextERNS_5BlockERKSt6vectorIjSaIjEEjmPKhEES6_RKSt10shared_ptrIKNS_9IDataTypeEEENKUlRKT_E_clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE9EEEvEEEEbSQ_
Unexecuted instantiation: _ZZN5doris11CastWrapper23create_datelike_wrapperINS_16DataTypeDateTimeEEESt8functionIFNS_6StatusEPNS_15FunctionContextERNS_5BlockERKSt6vectorIjSaIjEEjmPKhEES6_RKSt10shared_ptrIKNS_9IDataTypeEEENKUlRKT_E_clINS_8TypePairINS_15DataTypeDecimalILNS_13PrimitiveTypeE28EEEvEEEEbSQ_
Unexecuted instantiation: _ZZN5doris11CastWrapper23create_datelike_wrapperINS_16DataTypeDateTimeEEESt8functionIFNS_6StatusEPNS_15FunctionContextERNS_5BlockERKSt6vectorIjSaIjEEjmPKhEES6_RKSt10shared_ptrIKNS_9IDataTypeEEENKUlRKT_E_clINS_8TypePairINS_15DataTypeDecimalILNS_13PrimitiveTypeE29EEEvEEEEbSQ_
Unexecuted instantiation: _ZZN5doris11CastWrapper23create_datelike_wrapperINS_16DataTypeDateTimeEEESt8functionIFNS_6StatusEPNS_15FunctionContextERNS_5BlockERKSt6vectorIjSaIjEEjmPKhEES6_RKSt10shared_ptrIKNS_9IDataTypeEEENKUlRKT_E_clINS_8TypePairINS_15DataTypeDecimalILNS_13PrimitiveTypeE20EEEvEEEEbSQ_
Unexecuted instantiation: _ZZN5doris11CastWrapper23create_datelike_wrapperINS_16DataTypeDateTimeEEESt8functionIFNS_6StatusEPNS_15FunctionContextERNS_5BlockERKSt6vectorIjSaIjEEjmPKhEES6_RKSt10shared_ptrIKNS_9IDataTypeEEENKUlRKT_E_clINS_8TypePairINS_15DataTypeDecimalILNS_13PrimitiveTypeE30EEEvEEEEbSQ_
Unexecuted instantiation: _ZZN5doris11CastWrapper23create_datelike_wrapperINS_16DataTypeDateTimeEEESt8functionIFNS_6StatusEPNS_15FunctionContextERNS_5BlockERKSt6vectorIjSaIjEEjmPKhEES6_RKSt10shared_ptrIKNS_9IDataTypeEEENKUlRKT_E_clINS_8TypePairINS_15DataTypeDecimalILNS_13PrimitiveTypeE35EEEvEEEEbSQ_
Unexecuted instantiation: _ZZN5doris11CastWrapper23create_datelike_wrapperINS_16DataTypeDateTimeEEESt8functionIFNS_6StatusEPNS_15FunctionContextERNS_5BlockERKSt6vectorIjSaIjEEjmPKhEES6_RKSt10shared_ptrIKNS_9IDataTypeEEENKUlRKT_E_clINS_8TypePairINS_12DataTypeDateEvEEEEbSQ_
Unexecuted instantiation: _ZZN5doris11CastWrapper23create_datelike_wrapperINS_16DataTypeDateTimeEEESt8functionIFNS_6StatusEPNS_15FunctionContextERNS_5BlockERKSt6vectorIjSaIjEEjmPKhEES6_RKSt10shared_ptrIKNS_9IDataTypeEEENKUlRKT_E_clINS_8TypePairINS_14DataTypeDateV2EvEEEEbSQ_
Unexecuted instantiation: _ZZN5doris11CastWrapper23create_datelike_wrapperINS_16DataTypeDateTimeEEESt8functionIFNS_6StatusEPNS_15FunctionContextERNS_5BlockERKSt6vectorIjSaIjEEjmPKhEES6_RKSt10shared_ptrIKNS_9IDataTypeEEENKUlRKT_E_clINS_8TypePairINS_18DataTypeDateTimeV2EvEEEEbSQ_
Unexecuted instantiation: _ZZN5doris11CastWrapper23create_datelike_wrapperINS_16DataTypeDateTimeEEESt8functionIFNS_6StatusEPNS_15FunctionContextERNS_5BlockERKSt6vectorIjSaIjEEjmPKhEES6_RKSt10shared_ptrIKNS_9IDataTypeEEENKUlRKT_E_clINS_8TypePairIS2_vEEEEbSQ_
Unexecuted instantiation: _ZZN5doris11CastWrapper23create_datelike_wrapperINS_16DataTypeDateTimeEEESt8functionIFNS_6StatusEPNS_15FunctionContextERNS_5BlockERKSt6vectorIjSaIjEEjmPKhEES6_RKSt10shared_ptrIKNS_9IDataTypeEEENKUlRKT_E_clINS_8TypePairINS_14DataTypeTimeV2EvEEEEbSQ_
Unexecuted instantiation: _ZZN5doris11CastWrapper23create_datelike_wrapperINS_16DataTypeDateTimeEEESt8functionIFNS_6StatusEPNS_15FunctionContextERNS_5BlockERKSt6vectorIjSaIjEEjmPKhEES6_RKSt10shared_ptrIKNS_9IDataTypeEEENKUlRKT_E_clINS_8TypePairINS_19DataTypeTimeStampTzEvEEEEbSQ_
Unexecuted instantiation: _ZZN5doris11CastWrapper23create_datelike_wrapperINS_16DataTypeDateTimeEEESt8functionIFNS_6StatusEPNS_15FunctionContextERNS_5BlockERKSt6vectorIjSaIjEEjmPKhEES6_RKSt10shared_ptrIKNS_9IDataTypeEEENKUlRKT_E_clINS_8TypePairINS_12DataTypeIPv4EvEEEEbSQ_
Unexecuted instantiation: _ZZN5doris11CastWrapper23create_datelike_wrapperINS_16DataTypeDateTimeEEESt8functionIFNS_6StatusEPNS_15FunctionContextERNS_5BlockERKSt6vectorIjSaIjEEjmPKhEES6_RKSt10shared_ptrIKNS_9IDataTypeEEENKUlRKT_E_clINS_8TypePairINS_12DataTypeIPv6EvEEEEbSQ_
Unexecuted instantiation: _ZZN5doris11CastWrapper23create_datelike_wrapperINS_16DataTypeDateTimeEEESt8functionIFNS_6StatusEPNS_15FunctionContextERNS_5BlockERKSt6vectorIjSaIjEEjmPKhEES6_RKSt10shared_ptrIKNS_9IDataTypeEEENKUlRKT_E_clINS_8TypePairINS_14DataTypeStringEvEEEEbSQ_
Unexecuted instantiation: _ZZN5doris11CastWrapper23create_datelike_wrapperINS_14DataTypeDateV2EEESt8functionIFNS_6StatusEPNS_15FunctionContextERNS_5BlockERKSt6vectorIjSaIjEEjmPKhEES6_RKSt10shared_ptrIKNS_9IDataTypeEEENKUlRKT_E_clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE2EEEvEEEEbSQ_
Unexecuted instantiation: _ZZN5doris11CastWrapper23create_datelike_wrapperINS_14DataTypeDateV2EEESt8functionIFNS_6StatusEPNS_15FunctionContextERNS_5BlockERKSt6vectorIjSaIjEEjmPKhEES6_RKSt10shared_ptrIKNS_9IDataTypeEEENKUlRKT_E_clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE3EEEvEEEEbSQ_
Unexecuted instantiation: _ZZN5doris11CastWrapper23create_datelike_wrapperINS_14DataTypeDateV2EEESt8functionIFNS_6StatusEPNS_15FunctionContextERNS_5BlockERKSt6vectorIjSaIjEEjmPKhEES6_RKSt10shared_ptrIKNS_9IDataTypeEEENKUlRKT_E_clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE4EEEvEEEEbSQ_
Unexecuted instantiation: _ZZN5doris11CastWrapper23create_datelike_wrapperINS_14DataTypeDateV2EEESt8functionIFNS_6StatusEPNS_15FunctionContextERNS_5BlockERKSt6vectorIjSaIjEEjmPKhEES6_RKSt10shared_ptrIKNS_9IDataTypeEEENKUlRKT_E_clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE5EEEvEEEEbSQ_
_ZZN5doris11CastWrapper23create_datelike_wrapperINS_14DataTypeDateV2EEESt8functionIFNS_6StatusEPNS_15FunctionContextERNS_5BlockERKSt6vectorIjSaIjEEjmPKhEES6_RKSt10shared_ptrIKNS_9IDataTypeEEENKUlRKT_E_clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE6EEEvEEEEbSQ_
Line
Count
Source
30
7
    auto make_datelike_wrapper = [&](const auto& types) -> bool {
31
7
        using Types = std::decay_t<decltype(types)>;
32
7
        using FromDataType = typename Types::LeftType;
33
        if constexpr (CastUtil::IsPureDigitType<FromDataType> || IsDatelikeTypes<FromDataType> ||
34
                      IsStringType<FromDataType> ||
35
7
                      std::is_same_v<FromDataType, DataTypeTimeStampTz>) {
36
7
            if (context->enable_strict_mode()) {
37
5
                cast_to_datelike = std::make_shared<
38
5
                        CastToImpl<CastModeType::StrictMode, FromDataType, ToDataType>>();
39
5
            } else {
40
2
                cast_to_datelike = std::make_shared<
41
2
                        CastToImpl<CastModeType::NonStrictMode, FromDataType, ToDataType>>();
42
2
            }
43
7
            return true;
44
        } else {
45
            return false;
46
        }
47
7
    };
Unexecuted instantiation: _ZZN5doris11CastWrapper23create_datelike_wrapperINS_14DataTypeDateV2EEESt8functionIFNS_6StatusEPNS_15FunctionContextERNS_5BlockERKSt6vectorIjSaIjEEjmPKhEES6_RKSt10shared_ptrIKNS_9IDataTypeEEENKUlRKT_E_clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE7EEEvEEEEbSQ_
Unexecuted instantiation: _ZZN5doris11CastWrapper23create_datelike_wrapperINS_14DataTypeDateV2EEESt8functionIFNS_6StatusEPNS_15FunctionContextERNS_5BlockERKSt6vectorIjSaIjEEjmPKhEES6_RKSt10shared_ptrIKNS_9IDataTypeEEENKUlRKT_E_clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE8EEEvEEEEbSQ_
_ZZN5doris11CastWrapper23create_datelike_wrapperINS_14DataTypeDateV2EEESt8functionIFNS_6StatusEPNS_15FunctionContextERNS_5BlockERKSt6vectorIjSaIjEEjmPKhEES6_RKSt10shared_ptrIKNS_9IDataTypeEEENKUlRKT_E_clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE9EEEvEEEEbSQ_
Line
Count
Source
30
7
    auto make_datelike_wrapper = [&](const auto& types) -> bool {
31
7
        using Types = std::decay_t<decltype(types)>;
32
7
        using FromDataType = typename Types::LeftType;
33
        if constexpr (CastUtil::IsPureDigitType<FromDataType> || IsDatelikeTypes<FromDataType> ||
34
                      IsStringType<FromDataType> ||
35
7
                      std::is_same_v<FromDataType, DataTypeTimeStampTz>) {
36
7
            if (context->enable_strict_mode()) {
37
5
                cast_to_datelike = std::make_shared<
38
5
                        CastToImpl<CastModeType::StrictMode, FromDataType, ToDataType>>();
39
5
            } else {
40
2
                cast_to_datelike = std::make_shared<
41
2
                        CastToImpl<CastModeType::NonStrictMode, FromDataType, ToDataType>>();
42
2
            }
43
7
            return true;
44
        } else {
45
            return false;
46
        }
47
7
    };
Unexecuted instantiation: _ZZN5doris11CastWrapper23create_datelike_wrapperINS_14DataTypeDateV2EEESt8functionIFNS_6StatusEPNS_15FunctionContextERNS_5BlockERKSt6vectorIjSaIjEEjmPKhEES6_RKSt10shared_ptrIKNS_9IDataTypeEEENKUlRKT_E_clINS_8TypePairINS_15DataTypeDecimalILNS_13PrimitiveTypeE28EEEvEEEEbSQ_
_ZZN5doris11CastWrapper23create_datelike_wrapperINS_14DataTypeDateV2EEESt8functionIFNS_6StatusEPNS_15FunctionContextERNS_5BlockERKSt6vectorIjSaIjEEjmPKhEES6_RKSt10shared_ptrIKNS_9IDataTypeEEENKUlRKT_E_clINS_8TypePairINS_15DataTypeDecimalILNS_13PrimitiveTypeE29EEEvEEEEbSQ_
Line
Count
Source
30
2
    auto make_datelike_wrapper = [&](const auto& types) -> bool {
31
2
        using Types = std::decay_t<decltype(types)>;
32
2
        using FromDataType = typename Types::LeftType;
33
        if constexpr (CastUtil::IsPureDigitType<FromDataType> || IsDatelikeTypes<FromDataType> ||
34
                      IsStringType<FromDataType> ||
35
2
                      std::is_same_v<FromDataType, DataTypeTimeStampTz>) {
36
2
            if (context->enable_strict_mode()) {
37
0
                cast_to_datelike = std::make_shared<
38
0
                        CastToImpl<CastModeType::StrictMode, FromDataType, ToDataType>>();
39
2
            } else {
40
2
                cast_to_datelike = std::make_shared<
41
2
                        CastToImpl<CastModeType::NonStrictMode, FromDataType, ToDataType>>();
42
2
            }
43
2
            return true;
44
        } else {
45
            return false;
46
        }
47
2
    };
Unexecuted instantiation: _ZZN5doris11CastWrapper23create_datelike_wrapperINS_14DataTypeDateV2EEESt8functionIFNS_6StatusEPNS_15FunctionContextERNS_5BlockERKSt6vectorIjSaIjEEjmPKhEES6_RKSt10shared_ptrIKNS_9IDataTypeEEENKUlRKT_E_clINS_8TypePairINS_15DataTypeDecimalILNS_13PrimitiveTypeE20EEEvEEEEbSQ_
Unexecuted instantiation: _ZZN5doris11CastWrapper23create_datelike_wrapperINS_14DataTypeDateV2EEESt8functionIFNS_6StatusEPNS_15FunctionContextERNS_5BlockERKSt6vectorIjSaIjEEjmPKhEES6_RKSt10shared_ptrIKNS_9IDataTypeEEENKUlRKT_E_clINS_8TypePairINS_15DataTypeDecimalILNS_13PrimitiveTypeE30EEEvEEEEbSQ_
Unexecuted instantiation: _ZZN5doris11CastWrapper23create_datelike_wrapperINS_14DataTypeDateV2EEESt8functionIFNS_6StatusEPNS_15FunctionContextERNS_5BlockERKSt6vectorIjSaIjEEjmPKhEES6_RKSt10shared_ptrIKNS_9IDataTypeEEENKUlRKT_E_clINS_8TypePairINS_15DataTypeDecimalILNS_13PrimitiveTypeE35EEEvEEEEbSQ_
Unexecuted instantiation: _ZZN5doris11CastWrapper23create_datelike_wrapperINS_14DataTypeDateV2EEESt8functionIFNS_6StatusEPNS_15FunctionContextERNS_5BlockERKSt6vectorIjSaIjEEjmPKhEES6_RKSt10shared_ptrIKNS_9IDataTypeEEENKUlRKT_E_clINS_8TypePairINS_12DataTypeDateEvEEEEbSQ_
Unexecuted instantiation: _ZZN5doris11CastWrapper23create_datelike_wrapperINS_14DataTypeDateV2EEESt8functionIFNS_6StatusEPNS_15FunctionContextERNS_5BlockERKSt6vectorIjSaIjEEjmPKhEES6_RKSt10shared_ptrIKNS_9IDataTypeEEENKUlRKT_E_clINS_8TypePairIS2_vEEEEbSQ_
_ZZN5doris11CastWrapper23create_datelike_wrapperINS_14DataTypeDateV2EEESt8functionIFNS_6StatusEPNS_15FunctionContextERNS_5BlockERKSt6vectorIjSaIjEEjmPKhEES6_RKSt10shared_ptrIKNS_9IDataTypeEEENKUlRKT_E_clINS_8TypePairINS_18DataTypeDateTimeV2EvEEEEbSQ_
Line
Count
Source
30
2
    auto make_datelike_wrapper = [&](const auto& types) -> bool {
31
2
        using Types = std::decay_t<decltype(types)>;
32
2
        using FromDataType = typename Types::LeftType;
33
        if constexpr (CastUtil::IsPureDigitType<FromDataType> || IsDatelikeTypes<FromDataType> ||
34
                      IsStringType<FromDataType> ||
35
2
                      std::is_same_v<FromDataType, DataTypeTimeStampTz>) {
36
2
            if (context->enable_strict_mode()) {
37
0
                cast_to_datelike = std::make_shared<
38
0
                        CastToImpl<CastModeType::StrictMode, FromDataType, ToDataType>>();
39
2
            } else {
40
2
                cast_to_datelike = std::make_shared<
41
2
                        CastToImpl<CastModeType::NonStrictMode, FromDataType, ToDataType>>();
42
2
            }
43
2
            return true;
44
        } else {
45
            return false;
46
        }
47
2
    };
Unexecuted instantiation: _ZZN5doris11CastWrapper23create_datelike_wrapperINS_14DataTypeDateV2EEESt8functionIFNS_6StatusEPNS_15FunctionContextERNS_5BlockERKSt6vectorIjSaIjEEjmPKhEES6_RKSt10shared_ptrIKNS_9IDataTypeEEENKUlRKT_E_clINS_8TypePairINS_16DataTypeDateTimeEvEEEEbSQ_
_ZZN5doris11CastWrapper23create_datelike_wrapperINS_14DataTypeDateV2EEESt8functionIFNS_6StatusEPNS_15FunctionContextERNS_5BlockERKSt6vectorIjSaIjEEjmPKhEES6_RKSt10shared_ptrIKNS_9IDataTypeEEENKUlRKT_E_clINS_8TypePairINS_14DataTypeTimeV2EvEEEEbSQ_
Line
Count
Source
30
2
    auto make_datelike_wrapper = [&](const auto& types) -> bool {
31
2
        using Types = std::decay_t<decltype(types)>;
32
2
        using FromDataType = typename Types::LeftType;
33
        if constexpr (CastUtil::IsPureDigitType<FromDataType> || IsDatelikeTypes<FromDataType> ||
34
                      IsStringType<FromDataType> ||
35
2
                      std::is_same_v<FromDataType, DataTypeTimeStampTz>) {
36
2
            if (context->enable_strict_mode()) {
37
0
                cast_to_datelike = std::make_shared<
38
0
                        CastToImpl<CastModeType::StrictMode, FromDataType, ToDataType>>();
39
2
            } else {
40
2
                cast_to_datelike = std::make_shared<
41
2
                        CastToImpl<CastModeType::NonStrictMode, FromDataType, ToDataType>>();
42
2
            }
43
2
            return true;
44
        } else {
45
            return false;
46
        }
47
2
    };
Unexecuted instantiation: _ZZN5doris11CastWrapper23create_datelike_wrapperINS_14DataTypeDateV2EEESt8functionIFNS_6StatusEPNS_15FunctionContextERNS_5BlockERKSt6vectorIjSaIjEEjmPKhEES6_RKSt10shared_ptrIKNS_9IDataTypeEEENKUlRKT_E_clINS_8TypePairINS_19DataTypeTimeStampTzEvEEEEbSQ_
Unexecuted instantiation: _ZZN5doris11CastWrapper23create_datelike_wrapperINS_14DataTypeDateV2EEESt8functionIFNS_6StatusEPNS_15FunctionContextERNS_5BlockERKSt6vectorIjSaIjEEjmPKhEES6_RKSt10shared_ptrIKNS_9IDataTypeEEENKUlRKT_E_clINS_8TypePairINS_12DataTypeIPv4EvEEEEbSQ_
Unexecuted instantiation: _ZZN5doris11CastWrapper23create_datelike_wrapperINS_14DataTypeDateV2EEESt8functionIFNS_6StatusEPNS_15FunctionContextERNS_5BlockERKSt6vectorIjSaIjEEjmPKhEES6_RKSt10shared_ptrIKNS_9IDataTypeEEENKUlRKT_E_clINS_8TypePairINS_12DataTypeIPv6EvEEEEbSQ_
_ZZN5doris11CastWrapper23create_datelike_wrapperINS_14DataTypeDateV2EEESt8functionIFNS_6StatusEPNS_15FunctionContextERNS_5BlockERKSt6vectorIjSaIjEEjmPKhEES6_RKSt10shared_ptrIKNS_9IDataTypeEEENKUlRKT_E_clINS_8TypePairINS_14DataTypeStringEvEEEEbSQ_
Line
Count
Source
30
51
    auto make_datelike_wrapper = [&](const auto& types) -> bool {
31
51
        using Types = std::decay_t<decltype(types)>;
32
51
        using FromDataType = typename Types::LeftType;
33
        if constexpr (CastUtil::IsPureDigitType<FromDataType> || IsDatelikeTypes<FromDataType> ||
34
                      IsStringType<FromDataType> ||
35
51
                      std::is_same_v<FromDataType, DataTypeTimeStampTz>) {
36
51
            if (context->enable_strict_mode()) {
37
48
                cast_to_datelike = std::make_shared<
38
48
                        CastToImpl<CastModeType::StrictMode, FromDataType, ToDataType>>();
39
48
            } else {
40
3
                cast_to_datelike = std::make_shared<
41
3
                        CastToImpl<CastModeType::NonStrictMode, FromDataType, ToDataType>>();
42
3
            }
43
51
            return true;
44
        } else {
45
            return false;
46
        }
47
51
    };
Unexecuted instantiation: _ZZN5doris11CastWrapper23create_datelike_wrapperINS_18DataTypeDateTimeV2EEESt8functionIFNS_6StatusEPNS_15FunctionContextERNS_5BlockERKSt6vectorIjSaIjEEjmPKhEES6_RKSt10shared_ptrIKNS_9IDataTypeEEENKUlRKT_E_clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE2EEEvEEEEbSQ_
Unexecuted instantiation: _ZZN5doris11CastWrapper23create_datelike_wrapperINS_18DataTypeDateTimeV2EEESt8functionIFNS_6StatusEPNS_15FunctionContextERNS_5BlockERKSt6vectorIjSaIjEEjmPKhEES6_RKSt10shared_ptrIKNS_9IDataTypeEEENKUlRKT_E_clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE3EEEvEEEEbSQ_
Unexecuted instantiation: _ZZN5doris11CastWrapper23create_datelike_wrapperINS_18DataTypeDateTimeV2EEESt8functionIFNS_6StatusEPNS_15FunctionContextERNS_5BlockERKSt6vectorIjSaIjEEjmPKhEES6_RKSt10shared_ptrIKNS_9IDataTypeEEENKUlRKT_E_clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE4EEEvEEEEbSQ_
Unexecuted instantiation: _ZZN5doris11CastWrapper23create_datelike_wrapperINS_18DataTypeDateTimeV2EEESt8functionIFNS_6StatusEPNS_15FunctionContextERNS_5BlockERKSt6vectorIjSaIjEEjmPKhEES6_RKSt10shared_ptrIKNS_9IDataTypeEEENKUlRKT_E_clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE5EEEvEEEEbSQ_
_ZZN5doris11CastWrapper23create_datelike_wrapperINS_18DataTypeDateTimeV2EEESt8functionIFNS_6StatusEPNS_15FunctionContextERNS_5BlockERKSt6vectorIjSaIjEEjmPKhEES6_RKSt10shared_ptrIKNS_9IDataTypeEEENKUlRKT_E_clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE6EEEvEEEEbSQ_
Line
Count
Source
30
7
    auto make_datelike_wrapper = [&](const auto& types) -> bool {
31
7
        using Types = std::decay_t<decltype(types)>;
32
7
        using FromDataType = typename Types::LeftType;
33
        if constexpr (CastUtil::IsPureDigitType<FromDataType> || IsDatelikeTypes<FromDataType> ||
34
                      IsStringType<FromDataType> ||
35
7
                      std::is_same_v<FromDataType, DataTypeTimeStampTz>) {
36
7
            if (context->enable_strict_mode()) {
37
5
                cast_to_datelike = std::make_shared<
38
5
                        CastToImpl<CastModeType::StrictMode, FromDataType, ToDataType>>();
39
5
            } else {
40
2
                cast_to_datelike = std::make_shared<
41
2
                        CastToImpl<CastModeType::NonStrictMode, FromDataType, ToDataType>>();
42
2
            }
43
7
            return true;
44
        } else {
45
            return false;
46
        }
47
7
    };
Unexecuted instantiation: _ZZN5doris11CastWrapper23create_datelike_wrapperINS_18DataTypeDateTimeV2EEESt8functionIFNS_6StatusEPNS_15FunctionContextERNS_5BlockERKSt6vectorIjSaIjEEjmPKhEES6_RKSt10shared_ptrIKNS_9IDataTypeEEENKUlRKT_E_clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE7EEEvEEEEbSQ_
Unexecuted instantiation: _ZZN5doris11CastWrapper23create_datelike_wrapperINS_18DataTypeDateTimeV2EEESt8functionIFNS_6StatusEPNS_15FunctionContextERNS_5BlockERKSt6vectorIjSaIjEEjmPKhEES6_RKSt10shared_ptrIKNS_9IDataTypeEEENKUlRKT_E_clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE8EEEvEEEEbSQ_
_ZZN5doris11CastWrapper23create_datelike_wrapperINS_18DataTypeDateTimeV2EEESt8functionIFNS_6StatusEPNS_15FunctionContextERNS_5BlockERKSt6vectorIjSaIjEEjmPKhEES6_RKSt10shared_ptrIKNS_9IDataTypeEEENKUlRKT_E_clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE9EEEvEEEEbSQ_
Line
Count
Source
30
7
    auto make_datelike_wrapper = [&](const auto& types) -> bool {
31
7
        using Types = std::decay_t<decltype(types)>;
32
7
        using FromDataType = typename Types::LeftType;
33
        if constexpr (CastUtil::IsPureDigitType<FromDataType> || IsDatelikeTypes<FromDataType> ||
34
                      IsStringType<FromDataType> ||
35
7
                      std::is_same_v<FromDataType, DataTypeTimeStampTz>) {
36
7
            if (context->enable_strict_mode()) {
37
5
                cast_to_datelike = std::make_shared<
38
5
                        CastToImpl<CastModeType::StrictMode, FromDataType, ToDataType>>();
39
5
            } else {
40
2
                cast_to_datelike = std::make_shared<
41
2
                        CastToImpl<CastModeType::NonStrictMode, FromDataType, ToDataType>>();
42
2
            }
43
7
            return true;
44
        } else {
45
            return false;
46
        }
47
7
    };
Unexecuted instantiation: _ZZN5doris11CastWrapper23create_datelike_wrapperINS_18DataTypeDateTimeV2EEESt8functionIFNS_6StatusEPNS_15FunctionContextERNS_5BlockERKSt6vectorIjSaIjEEjmPKhEES6_RKSt10shared_ptrIKNS_9IDataTypeEEENKUlRKT_E_clINS_8TypePairINS_15DataTypeDecimalILNS_13PrimitiveTypeE28EEEvEEEEbSQ_
_ZZN5doris11CastWrapper23create_datelike_wrapperINS_18DataTypeDateTimeV2EEESt8functionIFNS_6StatusEPNS_15FunctionContextERNS_5BlockERKSt6vectorIjSaIjEEjmPKhEES6_RKSt10shared_ptrIKNS_9IDataTypeEEENKUlRKT_E_clINS_8TypePairINS_15DataTypeDecimalILNS_13PrimitiveTypeE29EEEvEEEEbSQ_
Line
Count
Source
30
4
    auto make_datelike_wrapper = [&](const auto& types) -> bool {
31
4
        using Types = std::decay_t<decltype(types)>;
32
4
        using FromDataType = typename Types::LeftType;
33
        if constexpr (CastUtil::IsPureDigitType<FromDataType> || IsDatelikeTypes<FromDataType> ||
34
                      IsStringType<FromDataType> ||
35
4
                      std::is_same_v<FromDataType, DataTypeTimeStampTz>) {
36
4
            if (context->enable_strict_mode()) {
37
1
                cast_to_datelike = std::make_shared<
38
1
                        CastToImpl<CastModeType::StrictMode, FromDataType, ToDataType>>();
39
3
            } else {
40
3
                cast_to_datelike = std::make_shared<
41
3
                        CastToImpl<CastModeType::NonStrictMode, FromDataType, ToDataType>>();
42
3
            }
43
4
            return true;
44
        } else {
45
            return false;
46
        }
47
4
    };
Unexecuted instantiation: _ZZN5doris11CastWrapper23create_datelike_wrapperINS_18DataTypeDateTimeV2EEESt8functionIFNS_6StatusEPNS_15FunctionContextERNS_5BlockERKSt6vectorIjSaIjEEjmPKhEES6_RKSt10shared_ptrIKNS_9IDataTypeEEENKUlRKT_E_clINS_8TypePairINS_15DataTypeDecimalILNS_13PrimitiveTypeE20EEEvEEEEbSQ_
Unexecuted instantiation: _ZZN5doris11CastWrapper23create_datelike_wrapperINS_18DataTypeDateTimeV2EEESt8functionIFNS_6StatusEPNS_15FunctionContextERNS_5BlockERKSt6vectorIjSaIjEEjmPKhEES6_RKSt10shared_ptrIKNS_9IDataTypeEEENKUlRKT_E_clINS_8TypePairINS_15DataTypeDecimalILNS_13PrimitiveTypeE30EEEvEEEEbSQ_
Unexecuted instantiation: _ZZN5doris11CastWrapper23create_datelike_wrapperINS_18DataTypeDateTimeV2EEESt8functionIFNS_6StatusEPNS_15FunctionContextERNS_5BlockERKSt6vectorIjSaIjEEjmPKhEES6_RKSt10shared_ptrIKNS_9IDataTypeEEENKUlRKT_E_clINS_8TypePairINS_15DataTypeDecimalILNS_13PrimitiveTypeE35EEEvEEEEbSQ_
Unexecuted instantiation: _ZZN5doris11CastWrapper23create_datelike_wrapperINS_18DataTypeDateTimeV2EEESt8functionIFNS_6StatusEPNS_15FunctionContextERNS_5BlockERKSt6vectorIjSaIjEEjmPKhEES6_RKSt10shared_ptrIKNS_9IDataTypeEEENKUlRKT_E_clINS_8TypePairINS_12DataTypeDateEvEEEEbSQ_
_ZZN5doris11CastWrapper23create_datelike_wrapperINS_18DataTypeDateTimeV2EEESt8functionIFNS_6StatusEPNS_15FunctionContextERNS_5BlockERKSt6vectorIjSaIjEEjmPKhEES6_RKSt10shared_ptrIKNS_9IDataTypeEEENKUlRKT_E_clINS_8TypePairINS_14DataTypeDateV2EvEEEEbSQ_
Line
Count
Source
30
2
    auto make_datelike_wrapper = [&](const auto& types) -> bool {
31
2
        using Types = std::decay_t<decltype(types)>;
32
2
        using FromDataType = typename Types::LeftType;
33
        if constexpr (CastUtil::IsPureDigitType<FromDataType> || IsDatelikeTypes<FromDataType> ||
34
                      IsStringType<FromDataType> ||
35
2
                      std::is_same_v<FromDataType, DataTypeTimeStampTz>) {
36
2
            if (context->enable_strict_mode()) {
37
0
                cast_to_datelike = std::make_shared<
38
0
                        CastToImpl<CastModeType::StrictMode, FromDataType, ToDataType>>();
39
2
            } else {
40
2
                cast_to_datelike = std::make_shared<
41
2
                        CastToImpl<CastModeType::NonStrictMode, FromDataType, ToDataType>>();
42
2
            }
43
2
            return true;
44
        } else {
45
            return false;
46
        }
47
2
    };
Unexecuted instantiation: _ZZN5doris11CastWrapper23create_datelike_wrapperINS_18DataTypeDateTimeV2EEESt8functionIFNS_6StatusEPNS_15FunctionContextERNS_5BlockERKSt6vectorIjSaIjEEjmPKhEES6_RKSt10shared_ptrIKNS_9IDataTypeEEENKUlRKT_E_clINS_8TypePairIS2_vEEEEbSQ_
Unexecuted instantiation: _ZZN5doris11CastWrapper23create_datelike_wrapperINS_18DataTypeDateTimeV2EEESt8functionIFNS_6StatusEPNS_15FunctionContextERNS_5BlockERKSt6vectorIjSaIjEEjmPKhEES6_RKSt10shared_ptrIKNS_9IDataTypeEEENKUlRKT_E_clINS_8TypePairINS_16DataTypeDateTimeEvEEEEbSQ_
_ZZN5doris11CastWrapper23create_datelike_wrapperINS_18DataTypeDateTimeV2EEESt8functionIFNS_6StatusEPNS_15FunctionContextERNS_5BlockERKSt6vectorIjSaIjEEjmPKhEES6_RKSt10shared_ptrIKNS_9IDataTypeEEENKUlRKT_E_clINS_8TypePairINS_14DataTypeTimeV2EvEEEEbSQ_
Line
Count
Source
30
2
    auto make_datelike_wrapper = [&](const auto& types) -> bool {
31
2
        using Types = std::decay_t<decltype(types)>;
32
2
        using FromDataType = typename Types::LeftType;
33
        if constexpr (CastUtil::IsPureDigitType<FromDataType> || IsDatelikeTypes<FromDataType> ||
34
                      IsStringType<FromDataType> ||
35
2
                      std::is_same_v<FromDataType, DataTypeTimeStampTz>) {
36
2
            if (context->enable_strict_mode()) {
37
0
                cast_to_datelike = std::make_shared<
38
0
                        CastToImpl<CastModeType::StrictMode, FromDataType, ToDataType>>();
39
2
            } else {
40
2
                cast_to_datelike = std::make_shared<
41
2
                        CastToImpl<CastModeType::NonStrictMode, FromDataType, ToDataType>>();
42
2
            }
43
2
            return true;
44
        } else {
45
            return false;
46
        }
47
2
    };
Unexecuted instantiation: _ZZN5doris11CastWrapper23create_datelike_wrapperINS_18DataTypeDateTimeV2EEESt8functionIFNS_6StatusEPNS_15FunctionContextERNS_5BlockERKSt6vectorIjSaIjEEjmPKhEES6_RKSt10shared_ptrIKNS_9IDataTypeEEENKUlRKT_E_clINS_8TypePairINS_19DataTypeTimeStampTzEvEEEEbSQ_
Unexecuted instantiation: _ZZN5doris11CastWrapper23create_datelike_wrapperINS_18DataTypeDateTimeV2EEESt8functionIFNS_6StatusEPNS_15FunctionContextERNS_5BlockERKSt6vectorIjSaIjEEjmPKhEES6_RKSt10shared_ptrIKNS_9IDataTypeEEENKUlRKT_E_clINS_8TypePairINS_12DataTypeIPv4EvEEEEbSQ_
Unexecuted instantiation: _ZZN5doris11CastWrapper23create_datelike_wrapperINS_18DataTypeDateTimeV2EEESt8functionIFNS_6StatusEPNS_15FunctionContextERNS_5BlockERKSt6vectorIjSaIjEEjmPKhEES6_RKSt10shared_ptrIKNS_9IDataTypeEEENKUlRKT_E_clINS_8TypePairINS_12DataTypeIPv6EvEEEEbSQ_
_ZZN5doris11CastWrapper23create_datelike_wrapperINS_18DataTypeDateTimeV2EEESt8functionIFNS_6StatusEPNS_15FunctionContextERNS_5BlockERKSt6vectorIjSaIjEEjmPKhEES6_RKSt10shared_ptrIKNS_9IDataTypeEEENKUlRKT_E_clINS_8TypePairINS_14DataTypeStringEvEEEEbSQ_
Line
Count
Source
30
50
    auto make_datelike_wrapper = [&](const auto& types) -> bool {
31
50
        using Types = std::decay_t<decltype(types)>;
32
50
        using FromDataType = typename Types::LeftType;
33
        if constexpr (CastUtil::IsPureDigitType<FromDataType> || IsDatelikeTypes<FromDataType> ||
34
                      IsStringType<FromDataType> ||
35
50
                      std::is_same_v<FromDataType, DataTypeTimeStampTz>) {
36
50
            if (context->enable_strict_mode()) {
37
48
                cast_to_datelike = std::make_shared<
38
48
                        CastToImpl<CastModeType::StrictMode, FromDataType, ToDataType>>();
39
48
            } else {
40
2
                cast_to_datelike = std::make_shared<
41
2
                        CastToImpl<CastModeType::NonStrictMode, FromDataType, ToDataType>>();
42
2
            }
43
50
            return true;
44
        } else {
45
            return false;
46
        }
47
50
    };
Unexecuted instantiation: _ZZN5doris11CastWrapper23create_datelike_wrapperINS_14DataTypeTimeV2EEESt8functionIFNS_6StatusEPNS_15FunctionContextERNS_5BlockERKSt6vectorIjSaIjEEjmPKhEES6_RKSt10shared_ptrIKNS_9IDataTypeEEENKUlRKT_E_clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE2EEEvEEEEbSQ_
Unexecuted instantiation: _ZZN5doris11CastWrapper23create_datelike_wrapperINS_14DataTypeTimeV2EEESt8functionIFNS_6StatusEPNS_15FunctionContextERNS_5BlockERKSt6vectorIjSaIjEEjmPKhEES6_RKSt10shared_ptrIKNS_9IDataTypeEEENKUlRKT_E_clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE3EEEvEEEEbSQ_
Unexecuted instantiation: _ZZN5doris11CastWrapper23create_datelike_wrapperINS_14DataTypeTimeV2EEESt8functionIFNS_6StatusEPNS_15FunctionContextERNS_5BlockERKSt6vectorIjSaIjEEjmPKhEES6_RKSt10shared_ptrIKNS_9IDataTypeEEENKUlRKT_E_clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE4EEEvEEEEbSQ_
Unexecuted instantiation: _ZZN5doris11CastWrapper23create_datelike_wrapperINS_14DataTypeTimeV2EEESt8functionIFNS_6StatusEPNS_15FunctionContextERNS_5BlockERKSt6vectorIjSaIjEEjmPKhEES6_RKSt10shared_ptrIKNS_9IDataTypeEEENKUlRKT_E_clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE5EEEvEEEEbSQ_
_ZZN5doris11CastWrapper23create_datelike_wrapperINS_14DataTypeTimeV2EEESt8functionIFNS_6StatusEPNS_15FunctionContextERNS_5BlockERKSt6vectorIjSaIjEEjmPKhEES6_RKSt10shared_ptrIKNS_9IDataTypeEEENKUlRKT_E_clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE6EEEvEEEEbSQ_
Line
Count
Source
30
1
    auto make_datelike_wrapper = [&](const auto& types) -> bool {
31
1
        using Types = std::decay_t<decltype(types)>;
32
1
        using FromDataType = typename Types::LeftType;
33
        if constexpr (CastUtil::IsPureDigitType<FromDataType> || IsDatelikeTypes<FromDataType> ||
34
                      IsStringType<FromDataType> ||
35
1
                      std::is_same_v<FromDataType, DataTypeTimeStampTz>) {
36
1
            if (context->enable_strict_mode()) {
37
0
                cast_to_datelike = std::make_shared<
38
0
                        CastToImpl<CastModeType::StrictMode, FromDataType, ToDataType>>();
39
1
            } else {
40
1
                cast_to_datelike = std::make_shared<
41
1
                        CastToImpl<CastModeType::NonStrictMode, FromDataType, ToDataType>>();
42
1
            }
43
1
            return true;
44
        } else {
45
            return false;
46
        }
47
1
    };
Unexecuted instantiation: _ZZN5doris11CastWrapper23create_datelike_wrapperINS_14DataTypeTimeV2EEESt8functionIFNS_6StatusEPNS_15FunctionContextERNS_5BlockERKSt6vectorIjSaIjEEjmPKhEES6_RKSt10shared_ptrIKNS_9IDataTypeEEENKUlRKT_E_clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE7EEEvEEEEbSQ_
Unexecuted instantiation: _ZZN5doris11CastWrapper23create_datelike_wrapperINS_14DataTypeTimeV2EEESt8functionIFNS_6StatusEPNS_15FunctionContextERNS_5BlockERKSt6vectorIjSaIjEEjmPKhEES6_RKSt10shared_ptrIKNS_9IDataTypeEEENKUlRKT_E_clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE8EEEvEEEEbSQ_
_ZZN5doris11CastWrapper23create_datelike_wrapperINS_14DataTypeTimeV2EEESt8functionIFNS_6StatusEPNS_15FunctionContextERNS_5BlockERKSt6vectorIjSaIjEEjmPKhEES6_RKSt10shared_ptrIKNS_9IDataTypeEEENKUlRKT_E_clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE9EEEvEEEEbSQ_
Line
Count
Source
30
1
    auto make_datelike_wrapper = [&](const auto& types) -> bool {
31
1
        using Types = std::decay_t<decltype(types)>;
32
1
        using FromDataType = typename Types::LeftType;
33
        if constexpr (CastUtil::IsPureDigitType<FromDataType> || IsDatelikeTypes<FromDataType> ||
34
                      IsStringType<FromDataType> ||
35
1
                      std::is_same_v<FromDataType, DataTypeTimeStampTz>) {
36
1
            if (context->enable_strict_mode()) {
37
0
                cast_to_datelike = std::make_shared<
38
0
                        CastToImpl<CastModeType::StrictMode, FromDataType, ToDataType>>();
39
1
            } else {
40
1
                cast_to_datelike = std::make_shared<
41
1
                        CastToImpl<CastModeType::NonStrictMode, FromDataType, ToDataType>>();
42
1
            }
43
1
            return true;
44
        } else {
45
            return false;
46
        }
47
1
    };
Unexecuted instantiation: _ZZN5doris11CastWrapper23create_datelike_wrapperINS_14DataTypeTimeV2EEESt8functionIFNS_6StatusEPNS_15FunctionContextERNS_5BlockERKSt6vectorIjSaIjEEjmPKhEES6_RKSt10shared_ptrIKNS_9IDataTypeEEENKUlRKT_E_clINS_8TypePairINS_15DataTypeDecimalILNS_13PrimitiveTypeE28EEEvEEEEbSQ_
_ZZN5doris11CastWrapper23create_datelike_wrapperINS_14DataTypeTimeV2EEESt8functionIFNS_6StatusEPNS_15FunctionContextERNS_5BlockERKSt6vectorIjSaIjEEjmPKhEES6_RKSt10shared_ptrIKNS_9IDataTypeEEENKUlRKT_E_clINS_8TypePairINS_15DataTypeDecimalILNS_13PrimitiveTypeE29EEEvEEEEbSQ_
Line
Count
Source
30
1
    auto make_datelike_wrapper = [&](const auto& types) -> bool {
31
1
        using Types = std::decay_t<decltype(types)>;
32
1
        using FromDataType = typename Types::LeftType;
33
        if constexpr (CastUtil::IsPureDigitType<FromDataType> || IsDatelikeTypes<FromDataType> ||
34
                      IsStringType<FromDataType> ||
35
1
                      std::is_same_v<FromDataType, DataTypeTimeStampTz>) {
36
1
            if (context->enable_strict_mode()) {
37
0
                cast_to_datelike = std::make_shared<
38
0
                        CastToImpl<CastModeType::StrictMode, FromDataType, ToDataType>>();
39
1
            } else {
40
1
                cast_to_datelike = std::make_shared<
41
1
                        CastToImpl<CastModeType::NonStrictMode, FromDataType, ToDataType>>();
42
1
            }
43
1
            return true;
44
        } else {
45
            return false;
46
        }
47
1
    };
Unexecuted instantiation: _ZZN5doris11CastWrapper23create_datelike_wrapperINS_14DataTypeTimeV2EEESt8functionIFNS_6StatusEPNS_15FunctionContextERNS_5BlockERKSt6vectorIjSaIjEEjmPKhEES6_RKSt10shared_ptrIKNS_9IDataTypeEEENKUlRKT_E_clINS_8TypePairINS_15DataTypeDecimalILNS_13PrimitiveTypeE20EEEvEEEEbSQ_
Unexecuted instantiation: _ZZN5doris11CastWrapper23create_datelike_wrapperINS_14DataTypeTimeV2EEESt8functionIFNS_6StatusEPNS_15FunctionContextERNS_5BlockERKSt6vectorIjSaIjEEjmPKhEES6_RKSt10shared_ptrIKNS_9IDataTypeEEENKUlRKT_E_clINS_8TypePairINS_15DataTypeDecimalILNS_13PrimitiveTypeE30EEEvEEEEbSQ_
Unexecuted instantiation: _ZZN5doris11CastWrapper23create_datelike_wrapperINS_14DataTypeTimeV2EEESt8functionIFNS_6StatusEPNS_15FunctionContextERNS_5BlockERKSt6vectorIjSaIjEEjmPKhEES6_RKSt10shared_ptrIKNS_9IDataTypeEEENKUlRKT_E_clINS_8TypePairINS_15DataTypeDecimalILNS_13PrimitiveTypeE35EEEvEEEEbSQ_
Unexecuted instantiation: _ZZN5doris11CastWrapper23create_datelike_wrapperINS_14DataTypeTimeV2EEESt8functionIFNS_6StatusEPNS_15FunctionContextERNS_5BlockERKSt6vectorIjSaIjEEjmPKhEES6_RKSt10shared_ptrIKNS_9IDataTypeEEENKUlRKT_E_clINS_8TypePairINS_12DataTypeDateEvEEEEbSQ_
Unexecuted instantiation: _ZZN5doris11CastWrapper23create_datelike_wrapperINS_14DataTypeTimeV2EEESt8functionIFNS_6StatusEPNS_15FunctionContextERNS_5BlockERKSt6vectorIjSaIjEEjmPKhEES6_RKSt10shared_ptrIKNS_9IDataTypeEEENKUlRKT_E_clINS_8TypePairINS_14DataTypeDateV2EvEEEEbSQ_
_ZZN5doris11CastWrapper23create_datelike_wrapperINS_14DataTypeTimeV2EEESt8functionIFNS_6StatusEPNS_15FunctionContextERNS_5BlockERKSt6vectorIjSaIjEEjmPKhEES6_RKSt10shared_ptrIKNS_9IDataTypeEEENKUlRKT_E_clINS_8TypePairINS_18DataTypeDateTimeV2EvEEEEbSQ_
Line
Count
Source
30
1
    auto make_datelike_wrapper = [&](const auto& types) -> bool {
31
1
        using Types = std::decay_t<decltype(types)>;
32
1
        using FromDataType = typename Types::LeftType;
33
        if constexpr (CastUtil::IsPureDigitType<FromDataType> || IsDatelikeTypes<FromDataType> ||
34
                      IsStringType<FromDataType> ||
35
1
                      std::is_same_v<FromDataType, DataTypeTimeStampTz>) {
36
1
            if (context->enable_strict_mode()) {
37
0
                cast_to_datelike = std::make_shared<
38
0
                        CastToImpl<CastModeType::StrictMode, FromDataType, ToDataType>>();
39
1
            } else {
40
1
                cast_to_datelike = std::make_shared<
41
1
                        CastToImpl<CastModeType::NonStrictMode, FromDataType, ToDataType>>();
42
1
            }
43
1
            return true;
44
        } else {
45
            return false;
46
        }
47
1
    };
Unexecuted instantiation: _ZZN5doris11CastWrapper23create_datelike_wrapperINS_14DataTypeTimeV2EEESt8functionIFNS_6StatusEPNS_15FunctionContextERNS_5BlockERKSt6vectorIjSaIjEEjmPKhEES6_RKSt10shared_ptrIKNS_9IDataTypeEEENKUlRKT_E_clINS_8TypePairINS_16DataTypeDateTimeEvEEEEbSQ_
Unexecuted instantiation: _ZZN5doris11CastWrapper23create_datelike_wrapperINS_14DataTypeTimeV2EEESt8functionIFNS_6StatusEPNS_15FunctionContextERNS_5BlockERKSt6vectorIjSaIjEEjmPKhEES6_RKSt10shared_ptrIKNS_9IDataTypeEEENKUlRKT_E_clINS_8TypePairIS2_vEEEEbSQ_
Unexecuted instantiation: _ZZN5doris11CastWrapper23create_datelike_wrapperINS_14DataTypeTimeV2EEESt8functionIFNS_6StatusEPNS_15FunctionContextERNS_5BlockERKSt6vectorIjSaIjEEjmPKhEES6_RKSt10shared_ptrIKNS_9IDataTypeEEENKUlRKT_E_clINS_8TypePairINS_19DataTypeTimeStampTzEvEEEEbSQ_
Unexecuted instantiation: _ZZN5doris11CastWrapper23create_datelike_wrapperINS_14DataTypeTimeV2EEESt8functionIFNS_6StatusEPNS_15FunctionContextERNS_5BlockERKSt6vectorIjSaIjEEjmPKhEES6_RKSt10shared_ptrIKNS_9IDataTypeEEENKUlRKT_E_clINS_8TypePairINS_12DataTypeIPv4EvEEEEbSQ_
Unexecuted instantiation: _ZZN5doris11CastWrapper23create_datelike_wrapperINS_14DataTypeTimeV2EEESt8functionIFNS_6StatusEPNS_15FunctionContextERNS_5BlockERKSt6vectorIjSaIjEEjmPKhEES6_RKSt10shared_ptrIKNS_9IDataTypeEEENKUlRKT_E_clINS_8TypePairINS_12DataTypeIPv6EvEEEEbSQ_
_ZZN5doris11CastWrapper23create_datelike_wrapperINS_14DataTypeTimeV2EEESt8functionIFNS_6StatusEPNS_15FunctionContextERNS_5BlockERKSt6vectorIjSaIjEEjmPKhEES6_RKSt10shared_ptrIKNS_9IDataTypeEEENKUlRKT_E_clINS_8TypePairINS_14DataTypeStringEvEEEEbSQ_
Line
Count
Source
30
12
    auto make_datelike_wrapper = [&](const auto& types) -> bool {
31
12
        using Types = std::decay_t<decltype(types)>;
32
12
        using FromDataType = typename Types::LeftType;
33
        if constexpr (CastUtil::IsPureDigitType<FromDataType> || IsDatelikeTypes<FromDataType> ||
34
                      IsStringType<FromDataType> ||
35
12
                      std::is_same_v<FromDataType, DataTypeTimeStampTz>) {
36
12
            if (context->enable_strict_mode()) {
37
11
                cast_to_datelike = std::make_shared<
38
11
                        CastToImpl<CastModeType::StrictMode, FromDataType, ToDataType>>();
39
11
            } else {
40
1
                cast_to_datelike = std::make_shared<
41
1
                        CastToImpl<CastModeType::NonStrictMode, FromDataType, ToDataType>>();
42
1
            }
43
12
            return true;
44
        } else {
45
            return false;
46
        }
47
12
    };
48
49
159
    if (!call_on_index_and_data_type<void>(from_type->get_primitive_type(),
50
159
                                           make_datelike_wrapper)) {
51
0
        return create_unsupport_wrapper(fmt::format(
52
0
                "CAST AS {} not supported {}", ToDataType {}.get_name(), from_type->get_name()));
53
0
    }
54
55
159
    return [cast_to_datelike](FunctionContext* context, Block& block,
56
159
                              const ColumnNumbers& arguments, const uint32_t result,
57
159
                              size_t input_rows_count,
58
159
                              const NullMap::value_type* null_map = nullptr) {
59
159
        return cast_to_datelike->execute_impl(context, block, arguments, result, input_rows_count,
60
159
                                              null_map);
61
159
    };
Unexecuted instantiation: _ZZN5doris11CastWrapper23create_datelike_wrapperINS_12DataTypeDateEEESt8functionIFNS_6StatusEPNS_15FunctionContextERNS_5BlockERKSt6vectorIjSaIjEEjmPKhEES6_RKSt10shared_ptrIKNS_9IDataTypeEEENKUlS6_S8_SD_jmSF_E_clES6_S8_SD_jmSF_
Unexecuted instantiation: _ZZN5doris11CastWrapper23create_datelike_wrapperINS_16DataTypeDateTimeEEESt8functionIFNS_6StatusEPNS_15FunctionContextERNS_5BlockERKSt6vectorIjSaIjEEjmPKhEES6_RKSt10shared_ptrIKNS_9IDataTypeEEENKUlS6_S8_SD_jmSF_E_clES6_S8_SD_jmSF_
_ZZN5doris11CastWrapper23create_datelike_wrapperINS_14DataTypeDateV2EEESt8functionIFNS_6StatusEPNS_15FunctionContextERNS_5BlockERKSt6vectorIjSaIjEEjmPKhEES6_RKSt10shared_ptrIKNS_9IDataTypeEEENKUlS6_S8_SD_jmSF_E_clES6_S8_SD_jmSF_
Line
Count
Source
58
71
                              const NullMap::value_type* null_map = nullptr) {
59
71
        return cast_to_datelike->execute_impl(context, block, arguments, result, input_rows_count,
60
71
                                              null_map);
61
71
    };
_ZZN5doris11CastWrapper23create_datelike_wrapperINS_18DataTypeDateTimeV2EEESt8functionIFNS_6StatusEPNS_15FunctionContextERNS_5BlockERKSt6vectorIjSaIjEEjmPKhEES6_RKSt10shared_ptrIKNS_9IDataTypeEEENKUlS6_S8_SD_jmSF_E_clES6_S8_SD_jmSF_
Line
Count
Source
58
72
                              const NullMap::value_type* null_map = nullptr) {
59
72
        return cast_to_datelike->execute_impl(context, block, arguments, result, input_rows_count,
60
72
                                              null_map);
61
72
    };
_ZZN5doris11CastWrapper23create_datelike_wrapperINS_14DataTypeTimeV2EEESt8functionIFNS_6StatusEPNS_15FunctionContextERNS_5BlockERKSt6vectorIjSaIjEEjmPKhEES6_RKSt10shared_ptrIKNS_9IDataTypeEEENKUlS6_S8_SD_jmSF_E_clES6_S8_SD_jmSF_
Line
Count
Source
58
16
                              const NullMap::value_type* null_map = nullptr) {
59
16
        return cast_to_datelike->execute_impl(context, block, arguments, result, input_rows_count,
60
16
                                              null_map);
61
16
    };
62
159
}
Unexecuted instantiation: _ZN5doris11CastWrapper23create_datelike_wrapperINS_12DataTypeDateEEESt8functionIFNS_6StatusEPNS_15FunctionContextERNS_5BlockERKSt6vectorIjSaIjEEjmPKhEES6_RKSt10shared_ptrIKNS_9IDataTypeEE
Unexecuted instantiation: _ZN5doris11CastWrapper23create_datelike_wrapperINS_16DataTypeDateTimeEEESt8functionIFNS_6StatusEPNS_15FunctionContextERNS_5BlockERKSt6vectorIjSaIjEEjmPKhEES6_RKSt10shared_ptrIKNS_9IDataTypeEE
_ZN5doris11CastWrapper23create_datelike_wrapperINS_14DataTypeDateV2EEESt8functionIFNS_6StatusEPNS_15FunctionContextERNS_5BlockERKSt6vectorIjSaIjEEjmPKhEES6_RKSt10shared_ptrIKNS_9IDataTypeEE
Line
Count
Source
27
71
WrapperType create_datelike_wrapper(FunctionContext* context, const DataTypePtr& from_type) {
28
71
    std::shared_ptr<CastToBase> cast_to_datelike;
29
30
71
    auto make_datelike_wrapper = [&](const auto& types) -> bool {
31
71
        using Types = std::decay_t<decltype(types)>;
32
71
        using FromDataType = typename Types::LeftType;
33
71
        if constexpr (CastUtil::IsPureDigitType<FromDataType> || IsDatelikeTypes<FromDataType> ||
34
71
                      IsStringType<FromDataType> ||
35
71
                      std::is_same_v<FromDataType, DataTypeTimeStampTz>) {
36
71
            if (context->enable_strict_mode()) {
37
71
                cast_to_datelike = std::make_shared<
38
71
                        CastToImpl<CastModeType::StrictMode, FromDataType, ToDataType>>();
39
71
            } else {
40
71
                cast_to_datelike = std::make_shared<
41
71
                        CastToImpl<CastModeType::NonStrictMode, FromDataType, ToDataType>>();
42
71
            }
43
71
            return true;
44
71
        } else {
45
71
            return false;
46
71
        }
47
71
    };
48
49
71
    if (!call_on_index_and_data_type<void>(from_type->get_primitive_type(),
50
71
                                           make_datelike_wrapper)) {
51
0
        return create_unsupport_wrapper(fmt::format(
52
0
                "CAST AS {} not supported {}", ToDataType {}.get_name(), from_type->get_name()));
53
0
    }
54
55
71
    return [cast_to_datelike](FunctionContext* context, Block& block,
56
71
                              const ColumnNumbers& arguments, const uint32_t result,
57
71
                              size_t input_rows_count,
58
71
                              const NullMap::value_type* null_map = nullptr) {
59
71
        return cast_to_datelike->execute_impl(context, block, arguments, result, input_rows_count,
60
71
                                              null_map);
61
71
    };
62
71
}
_ZN5doris11CastWrapper23create_datelike_wrapperINS_18DataTypeDateTimeV2EEESt8functionIFNS_6StatusEPNS_15FunctionContextERNS_5BlockERKSt6vectorIjSaIjEEjmPKhEES6_RKSt10shared_ptrIKNS_9IDataTypeEE
Line
Count
Source
27
72
WrapperType create_datelike_wrapper(FunctionContext* context, const DataTypePtr& from_type) {
28
72
    std::shared_ptr<CastToBase> cast_to_datelike;
29
30
72
    auto make_datelike_wrapper = [&](const auto& types) -> bool {
31
72
        using Types = std::decay_t<decltype(types)>;
32
72
        using FromDataType = typename Types::LeftType;
33
72
        if constexpr (CastUtil::IsPureDigitType<FromDataType> || IsDatelikeTypes<FromDataType> ||
34
72
                      IsStringType<FromDataType> ||
35
72
                      std::is_same_v<FromDataType, DataTypeTimeStampTz>) {
36
72
            if (context->enable_strict_mode()) {
37
72
                cast_to_datelike = std::make_shared<
38
72
                        CastToImpl<CastModeType::StrictMode, FromDataType, ToDataType>>();
39
72
            } else {
40
72
                cast_to_datelike = std::make_shared<
41
72
                        CastToImpl<CastModeType::NonStrictMode, FromDataType, ToDataType>>();
42
72
            }
43
72
            return true;
44
72
        } else {
45
72
            return false;
46
72
        }
47
72
    };
48
49
72
    if (!call_on_index_and_data_type<void>(from_type->get_primitive_type(),
50
72
                                           make_datelike_wrapper)) {
51
0
        return create_unsupport_wrapper(fmt::format(
52
0
                "CAST AS {} not supported {}", ToDataType {}.get_name(), from_type->get_name()));
53
0
    }
54
55
72
    return [cast_to_datelike](FunctionContext* context, Block& block,
56
72
                              const ColumnNumbers& arguments, const uint32_t result,
57
72
                              size_t input_rows_count,
58
72
                              const NullMap::value_type* null_map = nullptr) {
59
72
        return cast_to_datelike->execute_impl(context, block, arguments, result, input_rows_count,
60
72
                                              null_map);
61
72
    };
62
72
}
_ZN5doris11CastWrapper23create_datelike_wrapperINS_14DataTypeTimeV2EEESt8functionIFNS_6StatusEPNS_15FunctionContextERNS_5BlockERKSt6vectorIjSaIjEEjmPKhEES6_RKSt10shared_ptrIKNS_9IDataTypeEE
Line
Count
Source
27
16
WrapperType create_datelike_wrapper(FunctionContext* context, const DataTypePtr& from_type) {
28
16
    std::shared_ptr<CastToBase> cast_to_datelike;
29
30
16
    auto make_datelike_wrapper = [&](const auto& types) -> bool {
31
16
        using Types = std::decay_t<decltype(types)>;
32
16
        using FromDataType = typename Types::LeftType;
33
16
        if constexpr (CastUtil::IsPureDigitType<FromDataType> || IsDatelikeTypes<FromDataType> ||
34
16
                      IsStringType<FromDataType> ||
35
16
                      std::is_same_v<FromDataType, DataTypeTimeStampTz>) {
36
16
            if (context->enable_strict_mode()) {
37
16
                cast_to_datelike = std::make_shared<
38
16
                        CastToImpl<CastModeType::StrictMode, FromDataType, ToDataType>>();
39
16
            } else {
40
16
                cast_to_datelike = std::make_shared<
41
16
                        CastToImpl<CastModeType::NonStrictMode, FromDataType, ToDataType>>();
42
16
            }
43
16
            return true;
44
16
        } else {
45
16
            return false;
46
16
        }
47
16
    };
48
49
16
    if (!call_on_index_and_data_type<void>(from_type->get_primitive_type(),
50
16
                                           make_datelike_wrapper)) {
51
0
        return create_unsupport_wrapper(fmt::format(
52
0
                "CAST AS {} not supported {}", ToDataType {}.get_name(), from_type->get_name()));
53
0
    }
54
55
16
    return [cast_to_datelike](FunctionContext* context, Block& block,
56
16
                              const ColumnNumbers& arguments, const uint32_t result,
57
16
                              size_t input_rows_count,
58
16
                              const NullMap::value_type* null_map = nullptr) {
59
16
        return cast_to_datelike->execute_impl(context, block, arguments, result, input_rows_count,
60
16
                                              null_map);
61
16
    };
62
16
}
63
64
WrapperType create_datelike_wrapper(FunctionContext* context, const DataTypePtr& from_type,
65
159
                                    PrimitiveType to_type) {
66
159
    switch (to_type) {
67
0
    case TYPE_DATE:
68
0
        return create_datelike_wrapper<DataTypeDate>(context, from_type);
69
0
    case TYPE_DATETIME:
70
0
        return create_datelike_wrapper<DataTypeDateTime>(context, from_type);
71
71
    case TYPE_DATEV2:
72
71
        return create_datelike_wrapper<DataTypeDateV2>(context, from_type);
73
72
    case TYPE_DATETIMEV2:
74
72
        return create_datelike_wrapper<DataTypeDateTimeV2>(context, from_type);
75
16
    case TYPE_TIMEV2:
76
16
        return create_datelike_wrapper<DataTypeTimeV2>(context, from_type);
77
0
    default:
78
0
        return create_unsupport_wrapper(
79
0
                fmt::format("CAST AS date: unsupported to_type {}", type_to_string(to_type)));
80
159
    }
81
159
}
82
83
} // namespace doris::CastWrapper