be/src/exprs/function/cast/function_cast_float.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_number.h" |
19 | | #include "exprs/function/cast/cast_to_float.h" |
20 | | |
21 | | namespace doris::CastWrapper { |
22 | | |
23 | | template <typename ToDataType> |
24 | 16.4k | WrapperType create_float_wrapper(FunctionContext* context, const DataTypePtr& from_type) { |
25 | 16.4k | std::shared_ptr<CastToBase> cast_impl; |
26 | | |
27 | 16.4k | auto make_cast_wrapper = [&](const auto& types) -> bool { |
28 | 16.4k | using Types = std::decay_t<decltype(types)>; |
29 | 16.4k | using FromDataType = typename Types::LeftType; |
30 | 16.4k | if constexpr (type_allow_cast_to_basic_number<FromDataType>) { |
31 | 16.4k | if (context->enable_strict_mode()) { |
32 | 16.2k | cast_impl = std::make_shared< |
33 | 16.2k | CastToImpl<CastModeType::StrictMode, FromDataType, ToDataType>>(); |
34 | 16.2k | } else { |
35 | 214 | cast_impl = std::make_shared< |
36 | 214 | CastToImpl<CastModeType::NonStrictMode, FromDataType, ToDataType>>(); |
37 | 214 | } |
38 | 16.4k | return true; |
39 | 16.4k | } else { |
40 | 0 | return false; |
41 | 0 | } |
42 | 16.4k | }; _ZZN5doris11CastWrapper20create_float_wrapperINS_14DataTypeNumberILNS_13PrimitiveTypeE8EEEEESt8functionIFNS_6StatusEPNS_15FunctionContextERNS_5BlockERKSt6vectorIjSaIjEEjmPKhEES8_RKSt10shared_ptrIKNS_9IDataTypeEEENKUlRKT_E_clINS_8TypePairINS2_ILS3_2EEEvEEEEbSS_ Line | Count | Source | 27 | 2 | auto make_cast_wrapper = [&](const auto& types) -> bool { | 28 | 2 | using Types = std::decay_t<decltype(types)>; | 29 | 2 | using FromDataType = typename Types::LeftType; | 30 | 2 | if constexpr (type_allow_cast_to_basic_number<FromDataType>) { | 31 | 2 | if (context->enable_strict_mode()) { | 32 | 1 | cast_impl = std::make_shared< | 33 | 1 | CastToImpl<CastModeType::StrictMode, FromDataType, ToDataType>>(); | 34 | 1 | } else { | 35 | 1 | cast_impl = std::make_shared< | 36 | 1 | CastToImpl<CastModeType::NonStrictMode, FromDataType, ToDataType>>(); | 37 | 1 | } | 38 | 2 | return true; | 39 | | } else { | 40 | | return false; | 41 | | } | 42 | 2 | }; |
_ZZN5doris11CastWrapper20create_float_wrapperINS_14DataTypeNumberILNS_13PrimitiveTypeE8EEEEESt8functionIFNS_6StatusEPNS_15FunctionContextERNS_5BlockERKSt6vectorIjSaIjEEjmPKhEES8_RKSt10shared_ptrIKNS_9IDataTypeEEENKUlRKT_E_clINS_8TypePairINS2_ILS3_3EEEvEEEEbSS_ Line | Count | Source | 27 | 2 | auto make_cast_wrapper = [&](const auto& types) -> bool { | 28 | 2 | using Types = std::decay_t<decltype(types)>; | 29 | 2 | using FromDataType = typename Types::LeftType; | 30 | 2 | if constexpr (type_allow_cast_to_basic_number<FromDataType>) { | 31 | 2 | if (context->enable_strict_mode()) { | 32 | 1 | cast_impl = std::make_shared< | 33 | 1 | CastToImpl<CastModeType::StrictMode, FromDataType, ToDataType>>(); | 34 | 1 | } else { | 35 | 1 | cast_impl = std::make_shared< | 36 | 1 | CastToImpl<CastModeType::NonStrictMode, FromDataType, ToDataType>>(); | 37 | 1 | } | 38 | 2 | return true; | 39 | | } else { | 40 | | return false; | 41 | | } | 42 | 2 | }; |
_ZZN5doris11CastWrapper20create_float_wrapperINS_14DataTypeNumberILNS_13PrimitiveTypeE8EEEEESt8functionIFNS_6StatusEPNS_15FunctionContextERNS_5BlockERKSt6vectorIjSaIjEEjmPKhEES8_RKSt10shared_ptrIKNS_9IDataTypeEEENKUlRKT_E_clINS_8TypePairINS2_ILS3_4EEEvEEEEbSS_ Line | Count | Source | 27 | 2 | auto make_cast_wrapper = [&](const auto& types) -> bool { | 28 | 2 | using Types = std::decay_t<decltype(types)>; | 29 | 2 | using FromDataType = typename Types::LeftType; | 30 | 2 | if constexpr (type_allow_cast_to_basic_number<FromDataType>) { | 31 | 2 | if (context->enable_strict_mode()) { | 32 | 1 | cast_impl = std::make_shared< | 33 | 1 | CastToImpl<CastModeType::StrictMode, FromDataType, ToDataType>>(); | 34 | 1 | } else { | 35 | 1 | cast_impl = std::make_shared< | 36 | 1 | CastToImpl<CastModeType::NonStrictMode, FromDataType, ToDataType>>(); | 37 | 1 | } | 38 | 2 | return true; | 39 | | } else { | 40 | | return false; | 41 | | } | 42 | 2 | }; |
_ZZN5doris11CastWrapper20create_float_wrapperINS_14DataTypeNumberILNS_13PrimitiveTypeE8EEEEESt8functionIFNS_6StatusEPNS_15FunctionContextERNS_5BlockERKSt6vectorIjSaIjEEjmPKhEES8_RKSt10shared_ptrIKNS_9IDataTypeEEENKUlRKT_E_clINS_8TypePairINS2_ILS3_5EEEvEEEEbSS_ Line | Count | Source | 27 | 2 | auto make_cast_wrapper = [&](const auto& types) -> bool { | 28 | 2 | using Types = std::decay_t<decltype(types)>; | 29 | 2 | using FromDataType = typename Types::LeftType; | 30 | 2 | if constexpr (type_allow_cast_to_basic_number<FromDataType>) { | 31 | 2 | if (context->enable_strict_mode()) { | 32 | 1 | cast_impl = std::make_shared< | 33 | 1 | CastToImpl<CastModeType::StrictMode, FromDataType, ToDataType>>(); | 34 | 1 | } else { | 35 | 1 | cast_impl = std::make_shared< | 36 | 1 | CastToImpl<CastModeType::NonStrictMode, FromDataType, ToDataType>>(); | 37 | 1 | } | 38 | 2 | return true; | 39 | | } else { | 40 | | return false; | 41 | | } | 42 | 2 | }; |
_ZZN5doris11CastWrapper20create_float_wrapperINS_14DataTypeNumberILNS_13PrimitiveTypeE8EEEEESt8functionIFNS_6StatusEPNS_15FunctionContextERNS_5BlockERKSt6vectorIjSaIjEEjmPKhEES8_RKSt10shared_ptrIKNS_9IDataTypeEEENKUlRKT_E_clINS_8TypePairINS2_ILS3_6EEEvEEEEbSS_ Line | Count | Source | 27 | 2 | auto make_cast_wrapper = [&](const auto& types) -> bool { | 28 | 2 | using Types = std::decay_t<decltype(types)>; | 29 | 2 | using FromDataType = typename Types::LeftType; | 30 | 2 | if constexpr (type_allow_cast_to_basic_number<FromDataType>) { | 31 | 2 | if (context->enable_strict_mode()) { | 32 | 1 | cast_impl = std::make_shared< | 33 | 1 | CastToImpl<CastModeType::StrictMode, FromDataType, ToDataType>>(); | 34 | 1 | } else { | 35 | 1 | cast_impl = std::make_shared< | 36 | 1 | CastToImpl<CastModeType::NonStrictMode, FromDataType, ToDataType>>(); | 37 | 1 | } | 38 | 2 | return true; | 39 | | } else { | 40 | | return false; | 41 | | } | 42 | 2 | }; |
_ZZN5doris11CastWrapper20create_float_wrapperINS_14DataTypeNumberILNS_13PrimitiveTypeE8EEEEESt8functionIFNS_6StatusEPNS_15FunctionContextERNS_5BlockERKSt6vectorIjSaIjEEjmPKhEES8_RKSt10shared_ptrIKNS_9IDataTypeEEENKUlRKT_E_clINS_8TypePairINS2_ILS3_7EEEvEEEEbSS_ Line | Count | Source | 27 | 2 | auto make_cast_wrapper = [&](const auto& types) -> bool { | 28 | 2 | using Types = std::decay_t<decltype(types)>; | 29 | 2 | using FromDataType = typename Types::LeftType; | 30 | 2 | if constexpr (type_allow_cast_to_basic_number<FromDataType>) { | 31 | 2 | if (context->enable_strict_mode()) { | 32 | 1 | cast_impl = std::make_shared< | 33 | 1 | CastToImpl<CastModeType::StrictMode, FromDataType, ToDataType>>(); | 34 | 1 | } else { | 35 | 1 | cast_impl = std::make_shared< | 36 | 1 | CastToImpl<CastModeType::NonStrictMode, FromDataType, ToDataType>>(); | 37 | 1 | } | 38 | 2 | return true; | 39 | | } else { | 40 | | return false; | 41 | | } | 42 | 2 | }; |
Unexecuted instantiation: _ZZN5doris11CastWrapper20create_float_wrapperINS_14DataTypeNumberILNS_13PrimitiveTypeE8EEEEESt8functionIFNS_6StatusEPNS_15FunctionContextERNS_5BlockERKSt6vectorIjSaIjEEjmPKhEES8_RKSt10shared_ptrIKNS_9IDataTypeEEENKUlRKT_E_clINS_8TypePairIS4_vEEEEbSS_ _ZZN5doris11CastWrapper20create_float_wrapperINS_14DataTypeNumberILNS_13PrimitiveTypeE8EEEEESt8functionIFNS_6StatusEPNS_15FunctionContextERNS_5BlockERKSt6vectorIjSaIjEEjmPKhEES8_RKSt10shared_ptrIKNS_9IDataTypeEEENKUlRKT_E_clINS_8TypePairINS2_ILS3_9EEEvEEEEbSS_ Line | Count | Source | 27 | 2 | auto make_cast_wrapper = [&](const auto& types) -> bool { | 28 | 2 | using Types = std::decay_t<decltype(types)>; | 29 | 2 | using FromDataType = typename Types::LeftType; | 30 | 2 | if constexpr (type_allow_cast_to_basic_number<FromDataType>) { | 31 | 2 | if (context->enable_strict_mode()) { | 32 | 1 | cast_impl = std::make_shared< | 33 | 1 | CastToImpl<CastModeType::StrictMode, FromDataType, ToDataType>>(); | 34 | 1 | } else { | 35 | 1 | cast_impl = std::make_shared< | 36 | 1 | CastToImpl<CastModeType::NonStrictMode, FromDataType, ToDataType>>(); | 37 | 1 | } | 38 | 2 | return true; | 39 | | } else { | 40 | | return false; | 41 | | } | 42 | 2 | }; |
_ZZN5doris11CastWrapper20create_float_wrapperINS_14DataTypeNumberILNS_13PrimitiveTypeE8EEEEESt8functionIFNS_6StatusEPNS_15FunctionContextERNS_5BlockERKSt6vectorIjSaIjEEjmPKhEES8_RKSt10shared_ptrIKNS_9IDataTypeEEENKUlRKT_E_clINS_8TypePairINS_15DataTypeDecimalILS3_28EEEvEEEEbSS_ Line | Count | Source | 27 | 14 | auto make_cast_wrapper = [&](const auto& types) -> bool { | 28 | 14 | using Types = std::decay_t<decltype(types)>; | 29 | 14 | using FromDataType = typename Types::LeftType; | 30 | 14 | if constexpr (type_allow_cast_to_basic_number<FromDataType>) { | 31 | 14 | if (context->enable_strict_mode()) { | 32 | 7 | cast_impl = std::make_shared< | 33 | 7 | CastToImpl<CastModeType::StrictMode, FromDataType, ToDataType>>(); | 34 | 7 | } else { | 35 | 7 | cast_impl = std::make_shared< | 36 | 7 | CastToImpl<CastModeType::NonStrictMode, FromDataType, ToDataType>>(); | 37 | 7 | } | 38 | 14 | return true; | 39 | | } else { | 40 | | return false; | 41 | | } | 42 | 14 | }; |
_ZZN5doris11CastWrapper20create_float_wrapperINS_14DataTypeNumberILNS_13PrimitiveTypeE8EEEEESt8functionIFNS_6StatusEPNS_15FunctionContextERNS_5BlockERKSt6vectorIjSaIjEEjmPKhEES8_RKSt10shared_ptrIKNS_9IDataTypeEEENKUlRKT_E_clINS_8TypePairINS_15DataTypeDecimalILS3_29EEEvEEEEbSS_ Line | Count | Source | 27 | 18 | auto make_cast_wrapper = [&](const auto& types) -> bool { | 28 | 18 | using Types = std::decay_t<decltype(types)>; | 29 | 18 | using FromDataType = typename Types::LeftType; | 30 | 18 | if constexpr (type_allow_cast_to_basic_number<FromDataType>) { | 31 | 18 | if (context->enable_strict_mode()) { | 32 | 9 | cast_impl = std::make_shared< | 33 | 9 | CastToImpl<CastModeType::StrictMode, FromDataType, ToDataType>>(); | 34 | 9 | } else { | 35 | 9 | cast_impl = std::make_shared< | 36 | 9 | CastToImpl<CastModeType::NonStrictMode, FromDataType, ToDataType>>(); | 37 | 9 | } | 38 | 18 | return true; | 39 | | } else { | 40 | | return false; | 41 | | } | 42 | 18 | }; |
_ZZN5doris11CastWrapper20create_float_wrapperINS_14DataTypeNumberILNS_13PrimitiveTypeE8EEEEESt8functionIFNS_6StatusEPNS_15FunctionContextERNS_5BlockERKSt6vectorIjSaIjEEjmPKhEES8_RKSt10shared_ptrIKNS_9IDataTypeEEENKUlRKT_E_clINS_8TypePairINS_15DataTypeDecimalILS3_20EEEvEEEEbSS_ Line | Count | Source | 27 | 14 | auto make_cast_wrapper = [&](const auto& types) -> bool { | 28 | 14 | using Types = std::decay_t<decltype(types)>; | 29 | 14 | using FromDataType = typename Types::LeftType; | 30 | 14 | if constexpr (type_allow_cast_to_basic_number<FromDataType>) { | 31 | 14 | if (context->enable_strict_mode()) { | 32 | 7 | cast_impl = std::make_shared< | 33 | 7 | CastToImpl<CastModeType::StrictMode, FromDataType, ToDataType>>(); | 34 | 7 | } else { | 35 | 7 | cast_impl = std::make_shared< | 36 | 7 | CastToImpl<CastModeType::NonStrictMode, FromDataType, ToDataType>>(); | 37 | 7 | } | 38 | 14 | return true; | 39 | | } else { | 40 | | return false; | 41 | | } | 42 | 14 | }; |
_ZZN5doris11CastWrapper20create_float_wrapperINS_14DataTypeNumberILNS_13PrimitiveTypeE8EEEEESt8functionIFNS_6StatusEPNS_15FunctionContextERNS_5BlockERKSt6vectorIjSaIjEEjmPKhEES8_RKSt10shared_ptrIKNS_9IDataTypeEEENKUlRKT_E_clINS_8TypePairINS_15DataTypeDecimalILS3_30EEEvEEEEbSS_ Line | Count | Source | 27 | 18 | auto make_cast_wrapper = [&](const auto& types) -> bool { | 28 | 18 | using Types = std::decay_t<decltype(types)>; | 29 | 18 | using FromDataType = typename Types::LeftType; | 30 | 18 | if constexpr (type_allow_cast_to_basic_number<FromDataType>) { | 31 | 18 | if (context->enable_strict_mode()) { | 32 | 9 | cast_impl = std::make_shared< | 33 | 9 | CastToImpl<CastModeType::StrictMode, FromDataType, ToDataType>>(); | 34 | 9 | } else { | 35 | 9 | cast_impl = std::make_shared< | 36 | 9 | CastToImpl<CastModeType::NonStrictMode, FromDataType, ToDataType>>(); | 37 | 9 | } | 38 | 18 | return true; | 39 | | } else { | 40 | | return false; | 41 | | } | 42 | 18 | }; |
_ZZN5doris11CastWrapper20create_float_wrapperINS_14DataTypeNumberILNS_13PrimitiveTypeE8EEEEESt8functionIFNS_6StatusEPNS_15FunctionContextERNS_5BlockERKSt6vectorIjSaIjEEjmPKhEES8_RKSt10shared_ptrIKNS_9IDataTypeEEENKUlRKT_E_clINS_8TypePairINS_15DataTypeDecimalILS3_35EEEvEEEEbSS_ Line | Count | Source | 27 | 36 | auto make_cast_wrapper = [&](const auto& types) -> bool { | 28 | 36 | using Types = std::decay_t<decltype(types)>; | 29 | 36 | using FromDataType = typename Types::LeftType; | 30 | 36 | if constexpr (type_allow_cast_to_basic_number<FromDataType>) { | 31 | 36 | if (context->enable_strict_mode()) { | 32 | 18 | cast_impl = std::make_shared< | 33 | 18 | CastToImpl<CastModeType::StrictMode, FromDataType, ToDataType>>(); | 34 | 18 | } else { | 35 | 18 | cast_impl = std::make_shared< | 36 | 18 | CastToImpl<CastModeType::NonStrictMode, FromDataType, ToDataType>>(); | 37 | 18 | } | 38 | 36 | return true; | 39 | | } else { | 40 | | return false; | 41 | | } | 42 | 36 | }; |
Unexecuted instantiation: _ZZN5doris11CastWrapper20create_float_wrapperINS_14DataTypeNumberILNS_13PrimitiveTypeE8EEEEESt8functionIFNS_6StatusEPNS_15FunctionContextERNS_5BlockERKSt6vectorIjSaIjEEjmPKhEES8_RKSt10shared_ptrIKNS_9IDataTypeEEENKUlRKT_E_clINS_8TypePairINS_12DataTypeDateEvEEEEbSS_ _ZZN5doris11CastWrapper20create_float_wrapperINS_14DataTypeNumberILNS_13PrimitiveTypeE8EEEEESt8functionIFNS_6StatusEPNS_15FunctionContextERNS_5BlockERKSt6vectorIjSaIjEEjmPKhEES8_RKSt10shared_ptrIKNS_9IDataTypeEEENKUlRKT_E_clINS_8TypePairINS_14DataTypeDateV2EvEEEEbSS_ Line | Count | Source | 27 | 37 | auto make_cast_wrapper = [&](const auto& types) -> bool { | 28 | 37 | using Types = std::decay_t<decltype(types)>; | 29 | 37 | using FromDataType = typename Types::LeftType; | 30 | 37 | if constexpr (type_allow_cast_to_basic_number<FromDataType>) { | 31 | 37 | if (context->enable_strict_mode()) { | 32 | 36 | cast_impl = std::make_shared< | 33 | 36 | CastToImpl<CastModeType::StrictMode, FromDataType, ToDataType>>(); | 34 | 36 | } else { | 35 | 1 | cast_impl = std::make_shared< | 36 | 1 | CastToImpl<CastModeType::NonStrictMode, FromDataType, ToDataType>>(); | 37 | 1 | } | 38 | 37 | return true; | 39 | | } else { | 40 | | return false; | 41 | | } | 42 | 37 | }; |
_ZZN5doris11CastWrapper20create_float_wrapperINS_14DataTypeNumberILNS_13PrimitiveTypeE8EEEEESt8functionIFNS_6StatusEPNS_15FunctionContextERNS_5BlockERKSt6vectorIjSaIjEEjmPKhEES8_RKSt10shared_ptrIKNS_9IDataTypeEEENKUlRKT_E_clINS_8TypePairINS_18DataTypeDateTimeV2EvEEEEbSS_ Line | Count | Source | 27 | 7.78k | auto make_cast_wrapper = [&](const auto& types) -> bool { | 28 | 7.78k | using Types = std::decay_t<decltype(types)>; | 29 | 7.78k | using FromDataType = typename Types::LeftType; | 30 | 7.78k | if constexpr (type_allow_cast_to_basic_number<FromDataType>) { | 31 | 7.78k | if (context->enable_strict_mode()) { | 32 | 7.77k | cast_impl = std::make_shared< | 33 | 7.77k | CastToImpl<CastModeType::StrictMode, FromDataType, ToDataType>>(); | 34 | 7.77k | } else { | 35 | 4 | cast_impl = std::make_shared< | 36 | 4 | CastToImpl<CastModeType::NonStrictMode, FromDataType, ToDataType>>(); | 37 | 4 | } | 38 | 7.78k | return true; | 39 | | } else { | 40 | | return false; | 41 | | } | 42 | 7.78k | }; |
Unexecuted instantiation: _ZZN5doris11CastWrapper20create_float_wrapperINS_14DataTypeNumberILNS_13PrimitiveTypeE8EEEEESt8functionIFNS_6StatusEPNS_15FunctionContextERNS_5BlockERKSt6vectorIjSaIjEEjmPKhEES8_RKSt10shared_ptrIKNS_9IDataTypeEEENKUlRKT_E_clINS_8TypePairINS_16DataTypeDateTimeEvEEEEbSS_ _ZZN5doris11CastWrapper20create_float_wrapperINS_14DataTypeNumberILNS_13PrimitiveTypeE8EEEEESt8functionIFNS_6StatusEPNS_15FunctionContextERNS_5BlockERKSt6vectorIjSaIjEEjmPKhEES8_RKSt10shared_ptrIKNS_9IDataTypeEEENKUlRKT_E_clINS_8TypePairINS_14DataTypeTimeV2EvEEEEbSS_ Line | Count | Source | 27 | 162 | auto make_cast_wrapper = [&](const auto& types) -> bool { | 28 | 162 | using Types = std::decay_t<decltype(types)>; | 29 | 162 | using FromDataType = typename Types::LeftType; | 30 | 162 | if constexpr (type_allow_cast_to_basic_number<FromDataType>) { | 31 | 162 | if (context->enable_strict_mode()) { | 32 | 160 | cast_impl = std::make_shared< | 33 | 160 | CastToImpl<CastModeType::StrictMode, FromDataType, ToDataType>>(); | 34 | 160 | } else { | 35 | 2 | cast_impl = std::make_shared< | 36 | 2 | CastToImpl<CastModeType::NonStrictMode, FromDataType, ToDataType>>(); | 37 | 2 | } | 38 | 162 | return true; | 39 | | } else { | 40 | | return false; | 41 | | } | 42 | 162 | }; |
Unexecuted instantiation: _ZZN5doris11CastWrapper20create_float_wrapperINS_14DataTypeNumberILNS_13PrimitiveTypeE8EEEEESt8functionIFNS_6StatusEPNS_15FunctionContextERNS_5BlockERKSt6vectorIjSaIjEEjmPKhEES8_RKSt10shared_ptrIKNS_9IDataTypeEEENKUlRKT_E_clINS_8TypePairINS_19DataTypeTimeStampTzEvEEEEbSS_ Unexecuted instantiation: _ZZN5doris11CastWrapper20create_float_wrapperINS_14DataTypeNumberILNS_13PrimitiveTypeE8EEEEESt8functionIFNS_6StatusEPNS_15FunctionContextERNS_5BlockERKSt6vectorIjSaIjEEjmPKhEES8_RKSt10shared_ptrIKNS_9IDataTypeEEENKUlRKT_E_clINS_8TypePairINS_12DataTypeIPv4EvEEEEbSS_ Unexecuted instantiation: _ZZN5doris11CastWrapper20create_float_wrapperINS_14DataTypeNumberILNS_13PrimitiveTypeE8EEEEESt8functionIFNS_6StatusEPNS_15FunctionContextERNS_5BlockERKSt6vectorIjSaIjEEjmPKhEES8_RKSt10shared_ptrIKNS_9IDataTypeEEENKUlRKT_E_clINS_8TypePairINS_12DataTypeIPv6EvEEEEbSS_ _ZZN5doris11CastWrapper20create_float_wrapperINS_14DataTypeNumberILNS_13PrimitiveTypeE8EEEEESt8functionIFNS_6StatusEPNS_15FunctionContextERNS_5BlockERKSt6vectorIjSaIjEEjmPKhEES8_RKSt10shared_ptrIKNS_9IDataTypeEEENKUlRKT_E_clINS_8TypePairINS_14DataTypeStringEvEEEEbSS_ Line | Count | Source | 27 | 80 | auto make_cast_wrapper = [&](const auto& types) -> bool { | 28 | 80 | using Types = std::decay_t<decltype(types)>; | 29 | 80 | using FromDataType = typename Types::LeftType; | 30 | 80 | if constexpr (type_allow_cast_to_basic_number<FromDataType>) { | 31 | 80 | if (context->enable_strict_mode()) { | 32 | 76 | cast_impl = std::make_shared< | 33 | 76 | CastToImpl<CastModeType::StrictMode, FromDataType, ToDataType>>(); | 34 | 76 | } else { | 35 | 4 | cast_impl = std::make_shared< | 36 | 4 | CastToImpl<CastModeType::NonStrictMode, FromDataType, ToDataType>>(); | 37 | 4 | } | 38 | 80 | return true; | 39 | | } else { | 40 | | return false; | 41 | | } | 42 | 80 | }; |
_ZZN5doris11CastWrapper20create_float_wrapperINS_14DataTypeNumberILNS_13PrimitiveTypeE9EEEEESt8functionIFNS_6StatusEPNS_15FunctionContextERNS_5BlockERKSt6vectorIjSaIjEEjmPKhEES8_RKSt10shared_ptrIKNS_9IDataTypeEEENKUlRKT_E_clINS_8TypePairINS2_ILS3_2EEEvEEEEbSS_ Line | Count | Source | 27 | 89 | auto make_cast_wrapper = [&](const auto& types) -> bool { | 28 | 89 | using Types = std::decay_t<decltype(types)>; | 29 | 89 | using FromDataType = typename Types::LeftType; | 30 | 89 | if constexpr (type_allow_cast_to_basic_number<FromDataType>) { | 31 | 89 | if (context->enable_strict_mode()) { | 32 | 1 | cast_impl = std::make_shared< | 33 | 1 | CastToImpl<CastModeType::StrictMode, FromDataType, ToDataType>>(); | 34 | 88 | } else { | 35 | 88 | cast_impl = std::make_shared< | 36 | 88 | CastToImpl<CastModeType::NonStrictMode, FromDataType, ToDataType>>(); | 37 | 88 | } | 38 | 89 | return true; | 39 | | } else { | 40 | | return false; | 41 | | } | 42 | 89 | }; |
_ZZN5doris11CastWrapper20create_float_wrapperINS_14DataTypeNumberILNS_13PrimitiveTypeE9EEEEESt8functionIFNS_6StatusEPNS_15FunctionContextERNS_5BlockERKSt6vectorIjSaIjEEjmPKhEES8_RKSt10shared_ptrIKNS_9IDataTypeEEENKUlRKT_E_clINS_8TypePairINS2_ILS3_3EEEvEEEEbSS_ Line | Count | Source | 27 | 2 | auto make_cast_wrapper = [&](const auto& types) -> bool { | 28 | 2 | using Types = std::decay_t<decltype(types)>; | 29 | 2 | using FromDataType = typename Types::LeftType; | 30 | 2 | if constexpr (type_allow_cast_to_basic_number<FromDataType>) { | 31 | 2 | if (context->enable_strict_mode()) { | 32 | 1 | cast_impl = std::make_shared< | 33 | 1 | CastToImpl<CastModeType::StrictMode, FromDataType, ToDataType>>(); | 34 | 1 | } else { | 35 | 1 | cast_impl = std::make_shared< | 36 | 1 | CastToImpl<CastModeType::NonStrictMode, FromDataType, ToDataType>>(); | 37 | 1 | } | 38 | 2 | return true; | 39 | | } else { | 40 | | return false; | 41 | | } | 42 | 2 | }; |
_ZZN5doris11CastWrapper20create_float_wrapperINS_14DataTypeNumberILNS_13PrimitiveTypeE9EEEEESt8functionIFNS_6StatusEPNS_15FunctionContextERNS_5BlockERKSt6vectorIjSaIjEEjmPKhEES8_RKSt10shared_ptrIKNS_9IDataTypeEEENKUlRKT_E_clINS_8TypePairINS2_ILS3_4EEEvEEEEbSS_ Line | Count | Source | 27 | 2 | auto make_cast_wrapper = [&](const auto& types) -> bool { | 28 | 2 | using Types = std::decay_t<decltype(types)>; | 29 | 2 | using FromDataType = typename Types::LeftType; | 30 | 2 | if constexpr (type_allow_cast_to_basic_number<FromDataType>) { | 31 | 2 | if (context->enable_strict_mode()) { | 32 | 1 | cast_impl = std::make_shared< | 33 | 1 | CastToImpl<CastModeType::StrictMode, FromDataType, ToDataType>>(); | 34 | 1 | } else { | 35 | 1 | cast_impl = std::make_shared< | 36 | 1 | CastToImpl<CastModeType::NonStrictMode, FromDataType, ToDataType>>(); | 37 | 1 | } | 38 | 2 | return true; | 39 | | } else { | 40 | | return false; | 41 | | } | 42 | 2 | }; |
_ZZN5doris11CastWrapper20create_float_wrapperINS_14DataTypeNumberILNS_13PrimitiveTypeE9EEEEESt8functionIFNS_6StatusEPNS_15FunctionContextERNS_5BlockERKSt6vectorIjSaIjEEjmPKhEES8_RKSt10shared_ptrIKNS_9IDataTypeEEENKUlRKT_E_clINS_8TypePairINS2_ILS3_5EEEvEEEEbSS_ Line | Count | Source | 27 | 2 | auto make_cast_wrapper = [&](const auto& types) -> bool { | 28 | 2 | using Types = std::decay_t<decltype(types)>; | 29 | 2 | using FromDataType = typename Types::LeftType; | 30 | 2 | if constexpr (type_allow_cast_to_basic_number<FromDataType>) { | 31 | 2 | if (context->enable_strict_mode()) { | 32 | 1 | cast_impl = std::make_shared< | 33 | 1 | CastToImpl<CastModeType::StrictMode, FromDataType, ToDataType>>(); | 34 | 1 | } else { | 35 | 1 | cast_impl = std::make_shared< | 36 | 1 | CastToImpl<CastModeType::NonStrictMode, FromDataType, ToDataType>>(); | 37 | 1 | } | 38 | 2 | return true; | 39 | | } else { | 40 | | return false; | 41 | | } | 42 | 2 | }; |
_ZZN5doris11CastWrapper20create_float_wrapperINS_14DataTypeNumberILNS_13PrimitiveTypeE9EEEEESt8functionIFNS_6StatusEPNS_15FunctionContextERNS_5BlockERKSt6vectorIjSaIjEEjmPKhEES8_RKSt10shared_ptrIKNS_9IDataTypeEEENKUlRKT_E_clINS_8TypePairINS2_ILS3_6EEEvEEEEbSS_ Line | Count | Source | 27 | 2 | auto make_cast_wrapper = [&](const auto& types) -> bool { | 28 | 2 | using Types = std::decay_t<decltype(types)>; | 29 | 2 | using FromDataType = typename Types::LeftType; | 30 | 2 | if constexpr (type_allow_cast_to_basic_number<FromDataType>) { | 31 | 2 | if (context->enable_strict_mode()) { | 32 | 1 | cast_impl = std::make_shared< | 33 | 1 | CastToImpl<CastModeType::StrictMode, FromDataType, ToDataType>>(); | 34 | 1 | } else { | 35 | 1 | cast_impl = std::make_shared< | 36 | 1 | CastToImpl<CastModeType::NonStrictMode, FromDataType, ToDataType>>(); | 37 | 1 | } | 38 | 2 | return true; | 39 | | } else { | 40 | | return false; | 41 | | } | 42 | 2 | }; |
_ZZN5doris11CastWrapper20create_float_wrapperINS_14DataTypeNumberILNS_13PrimitiveTypeE9EEEEESt8functionIFNS_6StatusEPNS_15FunctionContextERNS_5BlockERKSt6vectorIjSaIjEEjmPKhEES8_RKSt10shared_ptrIKNS_9IDataTypeEEENKUlRKT_E_clINS_8TypePairINS2_ILS3_7EEEvEEEEbSS_ Line | Count | Source | 27 | 2 | auto make_cast_wrapper = [&](const auto& types) -> bool { | 28 | 2 | using Types = std::decay_t<decltype(types)>; | 29 | 2 | using FromDataType = typename Types::LeftType; | 30 | 2 | if constexpr (type_allow_cast_to_basic_number<FromDataType>) { | 31 | 2 | if (context->enable_strict_mode()) { | 32 | 1 | cast_impl = std::make_shared< | 33 | 1 | CastToImpl<CastModeType::StrictMode, FromDataType, ToDataType>>(); | 34 | 1 | } else { | 35 | 1 | cast_impl = std::make_shared< | 36 | 1 | CastToImpl<CastModeType::NonStrictMode, FromDataType, ToDataType>>(); | 37 | 1 | } | 38 | 2 | return true; | 39 | | } else { | 40 | | return false; | 41 | | } | 42 | 2 | }; |
_ZZN5doris11CastWrapper20create_float_wrapperINS_14DataTypeNumberILNS_13PrimitiveTypeE9EEEEESt8functionIFNS_6StatusEPNS_15FunctionContextERNS_5BlockERKSt6vectorIjSaIjEEjmPKhEES8_RKSt10shared_ptrIKNS_9IDataTypeEEENKUlRKT_E_clINS_8TypePairINS2_ILS3_8EEEvEEEEbSS_ Line | Count | Source | 27 | 2 | auto make_cast_wrapper = [&](const auto& types) -> bool { | 28 | 2 | using Types = std::decay_t<decltype(types)>; | 29 | 2 | using FromDataType = typename Types::LeftType; | 30 | 2 | if constexpr (type_allow_cast_to_basic_number<FromDataType>) { | 31 | 2 | if (context->enable_strict_mode()) { | 32 | 1 | cast_impl = std::make_shared< | 33 | 1 | CastToImpl<CastModeType::StrictMode, FromDataType, ToDataType>>(); | 34 | 1 | } else { | 35 | 1 | cast_impl = std::make_shared< | 36 | 1 | CastToImpl<CastModeType::NonStrictMode, FromDataType, ToDataType>>(); | 37 | 1 | } | 38 | 2 | return true; | 39 | | } else { | 40 | | return false; | 41 | | } | 42 | 2 | }; |
Unexecuted instantiation: _ZZN5doris11CastWrapper20create_float_wrapperINS_14DataTypeNumberILNS_13PrimitiveTypeE9EEEEESt8functionIFNS_6StatusEPNS_15FunctionContextERNS_5BlockERKSt6vectorIjSaIjEEjmPKhEES8_RKSt10shared_ptrIKNS_9IDataTypeEEENKUlRKT_E_clINS_8TypePairIS4_vEEEEbSS_ _ZZN5doris11CastWrapper20create_float_wrapperINS_14DataTypeNumberILNS_13PrimitiveTypeE9EEEEESt8functionIFNS_6StatusEPNS_15FunctionContextERNS_5BlockERKSt6vectorIjSaIjEEjmPKhEES8_RKSt10shared_ptrIKNS_9IDataTypeEEENKUlRKT_E_clINS_8TypePairINS_15DataTypeDecimalILS3_28EEEvEEEEbSS_ Line | Count | Source | 27 | 14 | auto make_cast_wrapper = [&](const auto& types) -> bool { | 28 | 14 | using Types = std::decay_t<decltype(types)>; | 29 | 14 | using FromDataType = typename Types::LeftType; | 30 | 14 | if constexpr (type_allow_cast_to_basic_number<FromDataType>) { | 31 | 14 | if (context->enable_strict_mode()) { | 32 | 7 | cast_impl = std::make_shared< | 33 | 7 | CastToImpl<CastModeType::StrictMode, FromDataType, ToDataType>>(); | 34 | 7 | } else { | 35 | 7 | cast_impl = std::make_shared< | 36 | 7 | CastToImpl<CastModeType::NonStrictMode, FromDataType, ToDataType>>(); | 37 | 7 | } | 38 | 14 | return true; | 39 | | } else { | 40 | | return false; | 41 | | } | 42 | 14 | }; |
_ZZN5doris11CastWrapper20create_float_wrapperINS_14DataTypeNumberILNS_13PrimitiveTypeE9EEEEESt8functionIFNS_6StatusEPNS_15FunctionContextERNS_5BlockERKSt6vectorIjSaIjEEjmPKhEES8_RKSt10shared_ptrIKNS_9IDataTypeEEENKUlRKT_E_clINS_8TypePairINS_15DataTypeDecimalILS3_29EEEvEEEEbSS_ Line | Count | Source | 27 | 18 | auto make_cast_wrapper = [&](const auto& types) -> bool { | 28 | 18 | using Types = std::decay_t<decltype(types)>; | 29 | 18 | using FromDataType = typename Types::LeftType; | 30 | 18 | if constexpr (type_allow_cast_to_basic_number<FromDataType>) { | 31 | 18 | if (context->enable_strict_mode()) { | 32 | 9 | cast_impl = std::make_shared< | 33 | 9 | CastToImpl<CastModeType::StrictMode, FromDataType, ToDataType>>(); | 34 | 9 | } else { | 35 | 9 | cast_impl = std::make_shared< | 36 | 9 | CastToImpl<CastModeType::NonStrictMode, FromDataType, ToDataType>>(); | 37 | 9 | } | 38 | 18 | return true; | 39 | | } else { | 40 | | return false; | 41 | | } | 42 | 18 | }; |
_ZZN5doris11CastWrapper20create_float_wrapperINS_14DataTypeNumberILNS_13PrimitiveTypeE9EEEEESt8functionIFNS_6StatusEPNS_15FunctionContextERNS_5BlockERKSt6vectorIjSaIjEEjmPKhEES8_RKSt10shared_ptrIKNS_9IDataTypeEEENKUlRKT_E_clINS_8TypePairINS_15DataTypeDecimalILS3_20EEEvEEEEbSS_ Line | Count | Source | 27 | 14 | auto make_cast_wrapper = [&](const auto& types) -> bool { | 28 | 14 | using Types = std::decay_t<decltype(types)>; | 29 | 14 | using FromDataType = typename Types::LeftType; | 30 | 14 | if constexpr (type_allow_cast_to_basic_number<FromDataType>) { | 31 | 14 | if (context->enable_strict_mode()) { | 32 | 7 | cast_impl = std::make_shared< | 33 | 7 | CastToImpl<CastModeType::StrictMode, FromDataType, ToDataType>>(); | 34 | 7 | } else { | 35 | 7 | cast_impl = std::make_shared< | 36 | 7 | CastToImpl<CastModeType::NonStrictMode, FromDataType, ToDataType>>(); | 37 | 7 | } | 38 | 14 | return true; | 39 | | } else { | 40 | | return false; | 41 | | } | 42 | 14 | }; |
_ZZN5doris11CastWrapper20create_float_wrapperINS_14DataTypeNumberILNS_13PrimitiveTypeE9EEEEESt8functionIFNS_6StatusEPNS_15FunctionContextERNS_5BlockERKSt6vectorIjSaIjEEjmPKhEES8_RKSt10shared_ptrIKNS_9IDataTypeEEENKUlRKT_E_clINS_8TypePairINS_15DataTypeDecimalILS3_30EEEvEEEEbSS_ Line | Count | Source | 27 | 18 | auto make_cast_wrapper = [&](const auto& types) -> bool { | 28 | 18 | using Types = std::decay_t<decltype(types)>; | 29 | 18 | using FromDataType = typename Types::LeftType; | 30 | 18 | if constexpr (type_allow_cast_to_basic_number<FromDataType>) { | 31 | 18 | if (context->enable_strict_mode()) { | 32 | 9 | cast_impl = std::make_shared< | 33 | 9 | CastToImpl<CastModeType::StrictMode, FromDataType, ToDataType>>(); | 34 | 9 | } else { | 35 | 9 | cast_impl = std::make_shared< | 36 | 9 | CastToImpl<CastModeType::NonStrictMode, FromDataType, ToDataType>>(); | 37 | 9 | } | 38 | 18 | return true; | 39 | | } else { | 40 | | return false; | 41 | | } | 42 | 18 | }; |
_ZZN5doris11CastWrapper20create_float_wrapperINS_14DataTypeNumberILNS_13PrimitiveTypeE9EEEEESt8functionIFNS_6StatusEPNS_15FunctionContextERNS_5BlockERKSt6vectorIjSaIjEEjmPKhEES8_RKSt10shared_ptrIKNS_9IDataTypeEEENKUlRKT_E_clINS_8TypePairINS_15DataTypeDecimalILS3_35EEEvEEEEbSS_ Line | Count | Source | 27 | 18 | auto make_cast_wrapper = [&](const auto& types) -> bool { | 28 | 18 | using Types = std::decay_t<decltype(types)>; | 29 | 18 | using FromDataType = typename Types::LeftType; | 30 | 18 | if constexpr (type_allow_cast_to_basic_number<FromDataType>) { | 31 | 18 | if (context->enable_strict_mode()) { | 32 | 9 | cast_impl = std::make_shared< | 33 | 9 | CastToImpl<CastModeType::StrictMode, FromDataType, ToDataType>>(); | 34 | 9 | } else { | 35 | 9 | cast_impl = std::make_shared< | 36 | 9 | CastToImpl<CastModeType::NonStrictMode, FromDataType, ToDataType>>(); | 37 | 9 | } | 38 | 18 | return true; | 39 | | } else { | 40 | | return false; | 41 | | } | 42 | 18 | }; |
Unexecuted instantiation: _ZZN5doris11CastWrapper20create_float_wrapperINS_14DataTypeNumberILNS_13PrimitiveTypeE9EEEEESt8functionIFNS_6StatusEPNS_15FunctionContextERNS_5BlockERKSt6vectorIjSaIjEEjmPKhEES8_RKSt10shared_ptrIKNS_9IDataTypeEEENKUlRKT_E_clINS_8TypePairINS_12DataTypeDateEvEEEEbSS_ _ZZN5doris11CastWrapper20create_float_wrapperINS_14DataTypeNumberILNS_13PrimitiveTypeE9EEEEESt8functionIFNS_6StatusEPNS_15FunctionContextERNS_5BlockERKSt6vectorIjSaIjEEjmPKhEES8_RKSt10shared_ptrIKNS_9IDataTypeEEENKUlRKT_E_clINS_8TypePairINS_14DataTypeDateV2EvEEEEbSS_ Line | Count | Source | 27 | 37 | auto make_cast_wrapper = [&](const auto& types) -> bool { | 28 | 37 | using Types = std::decay_t<decltype(types)>; | 29 | 37 | using FromDataType = typename Types::LeftType; | 30 | 37 | if constexpr (type_allow_cast_to_basic_number<FromDataType>) { | 31 | 37 | if (context->enable_strict_mode()) { | 32 | 36 | cast_impl = std::make_shared< | 33 | 36 | CastToImpl<CastModeType::StrictMode, FromDataType, ToDataType>>(); | 34 | 36 | } else { | 35 | 1 | cast_impl = std::make_shared< | 36 | 1 | CastToImpl<CastModeType::NonStrictMode, FromDataType, ToDataType>>(); | 37 | 1 | } | 38 | 37 | return true; | 39 | | } else { | 40 | | return false; | 41 | | } | 42 | 37 | }; |
_ZZN5doris11CastWrapper20create_float_wrapperINS_14DataTypeNumberILNS_13PrimitiveTypeE9EEEEESt8functionIFNS_6StatusEPNS_15FunctionContextERNS_5BlockERKSt6vectorIjSaIjEEjmPKhEES8_RKSt10shared_ptrIKNS_9IDataTypeEEENKUlRKT_E_clINS_8TypePairINS_18DataTypeDateTimeV2EvEEEEbSS_ Line | Count | Source | 27 | 7.78k | auto make_cast_wrapper = [&](const auto& types) -> bool { | 28 | 7.78k | using Types = std::decay_t<decltype(types)>; | 29 | 7.78k | using FromDataType = typename Types::LeftType; | 30 | 7.78k | if constexpr (type_allow_cast_to_basic_number<FromDataType>) { | 31 | 7.78k | if (context->enable_strict_mode()) { | 32 | 7.77k | cast_impl = std::make_shared< | 33 | 7.77k | CastToImpl<CastModeType::StrictMode, FromDataType, ToDataType>>(); | 34 | 7.77k | } else { | 35 | 4 | cast_impl = std::make_shared< | 36 | 4 | CastToImpl<CastModeType::NonStrictMode, FromDataType, ToDataType>>(); | 37 | 4 | } | 38 | 7.78k | return true; | 39 | | } else { | 40 | | return false; | 41 | | } | 42 | 7.78k | }; |
Unexecuted instantiation: _ZZN5doris11CastWrapper20create_float_wrapperINS_14DataTypeNumberILNS_13PrimitiveTypeE9EEEEESt8functionIFNS_6StatusEPNS_15FunctionContextERNS_5BlockERKSt6vectorIjSaIjEEjmPKhEES8_RKSt10shared_ptrIKNS_9IDataTypeEEENKUlRKT_E_clINS_8TypePairINS_16DataTypeDateTimeEvEEEEbSS_ _ZZN5doris11CastWrapper20create_float_wrapperINS_14DataTypeNumberILNS_13PrimitiveTypeE9EEEEESt8functionIFNS_6StatusEPNS_15FunctionContextERNS_5BlockERKSt6vectorIjSaIjEEjmPKhEES8_RKSt10shared_ptrIKNS_9IDataTypeEEENKUlRKT_E_clINS_8TypePairINS_14DataTypeTimeV2EvEEEEbSS_ Line | Count | Source | 27 | 162 | auto make_cast_wrapper = [&](const auto& types) -> bool { | 28 | 162 | using Types = std::decay_t<decltype(types)>; | 29 | 162 | using FromDataType = typename Types::LeftType; | 30 | 162 | if constexpr (type_allow_cast_to_basic_number<FromDataType>) { | 31 | 162 | if (context->enable_strict_mode()) { | 32 | 160 | cast_impl = std::make_shared< | 33 | 160 | CastToImpl<CastModeType::StrictMode, FromDataType, ToDataType>>(); | 34 | 160 | } else { | 35 | 2 | cast_impl = std::make_shared< | 36 | 2 | CastToImpl<CastModeType::NonStrictMode, FromDataType, ToDataType>>(); | 37 | 2 | } | 38 | 162 | return true; | 39 | | } else { | 40 | | return false; | 41 | | } | 42 | 162 | }; |
Unexecuted instantiation: _ZZN5doris11CastWrapper20create_float_wrapperINS_14DataTypeNumberILNS_13PrimitiveTypeE9EEEEESt8functionIFNS_6StatusEPNS_15FunctionContextERNS_5BlockERKSt6vectorIjSaIjEEjmPKhEES8_RKSt10shared_ptrIKNS_9IDataTypeEEENKUlRKT_E_clINS_8TypePairINS_19DataTypeTimeStampTzEvEEEEbSS_ Unexecuted instantiation: _ZZN5doris11CastWrapper20create_float_wrapperINS_14DataTypeNumberILNS_13PrimitiveTypeE9EEEEESt8functionIFNS_6StatusEPNS_15FunctionContextERNS_5BlockERKSt6vectorIjSaIjEEjmPKhEES8_RKSt10shared_ptrIKNS_9IDataTypeEEENKUlRKT_E_clINS_8TypePairINS_12DataTypeIPv4EvEEEEbSS_ Unexecuted instantiation: _ZZN5doris11CastWrapper20create_float_wrapperINS_14DataTypeNumberILNS_13PrimitiveTypeE9EEEEESt8functionIFNS_6StatusEPNS_15FunctionContextERNS_5BlockERKSt6vectorIjSaIjEEjmPKhEES8_RKSt10shared_ptrIKNS_9IDataTypeEEENKUlRKT_E_clINS_8TypePairINS_12DataTypeIPv6EvEEEEbSS_ _ZZN5doris11CastWrapper20create_float_wrapperINS_14DataTypeNumberILNS_13PrimitiveTypeE9EEEEESt8functionIFNS_6StatusEPNS_15FunctionContextERNS_5BlockERKSt6vectorIjSaIjEEjmPKhEES8_RKSt10shared_ptrIKNS_9IDataTypeEEENKUlRKT_E_clINS_8TypePairINS_14DataTypeStringEvEEEEbSS_ Line | Count | Source | 27 | 80 | auto make_cast_wrapper = [&](const auto& types) -> bool { | 28 | 80 | using Types = std::decay_t<decltype(types)>; | 29 | 80 | using FromDataType = typename Types::LeftType; | 30 | 80 | if constexpr (type_allow_cast_to_basic_number<FromDataType>) { | 31 | 80 | if (context->enable_strict_mode()) { | 32 | 76 | cast_impl = std::make_shared< | 33 | 76 | CastToImpl<CastModeType::StrictMode, FromDataType, ToDataType>>(); | 34 | 76 | } else { | 35 | 4 | cast_impl = std::make_shared< | 36 | 4 | CastToImpl<CastModeType::NonStrictMode, FromDataType, ToDataType>>(); | 37 | 4 | } | 38 | 80 | return true; | 39 | | } else { | 40 | | return false; | 41 | | } | 42 | 80 | }; |
|
43 | | |
44 | 16.4k | if (!call_on_index_and_data_type<void>(from_type->get_primitive_type(), make_cast_wrapper)) { |
45 | 0 | return create_unsupport_wrapper( |
46 | 0 | fmt::format("CAST AS number not supported {}", from_type->get_name())); |
47 | 0 | } |
48 | | |
49 | 16.4k | return [cast_impl](FunctionContext* context, Block& block, const ColumnNumbers& arguments, |
50 | 16.4k | uint32_t result, size_t input_rows_count, |
51 | 16.4k | const NullMap::value_type* null_map = nullptr) { |
52 | 16.4k | return cast_impl->execute_impl(context, block, arguments, result, input_rows_count, |
53 | 16.4k | null_map); |
54 | 16.4k | }; _ZZN5doris11CastWrapper20create_float_wrapperINS_14DataTypeNumberILNS_13PrimitiveTypeE8EEEEESt8functionIFNS_6StatusEPNS_15FunctionContextERNS_5BlockERKSt6vectorIjSaIjEEjmPKhEES8_RKSt10shared_ptrIKNS_9IDataTypeEEENKUlS8_SA_SF_jmSH_E_clES8_SA_SF_jmSH_ Line | Count | Source | 51 | 8.17k | const NullMap::value_type* null_map = nullptr) { | 52 | 8.17k | return cast_impl->execute_impl(context, block, arguments, result, input_rows_count, | 53 | 8.17k | null_map); | 54 | 8.17k | }; |
_ZZN5doris11CastWrapper20create_float_wrapperINS_14DataTypeNumberILNS_13PrimitiveTypeE9EEEEESt8functionIFNS_6StatusEPNS_15FunctionContextERNS_5BlockERKSt6vectorIjSaIjEEjmPKhEES8_RKSt10shared_ptrIKNS_9IDataTypeEEENKUlS8_SA_SF_jmSH_E_clES8_SA_SF_jmSH_ Line | Count | Source | 51 | 8.24k | const NullMap::value_type* null_map = nullptr) { | 52 | 8.24k | return cast_impl->execute_impl(context, block, arguments, result, input_rows_count, | 53 | 8.24k | null_map); | 54 | 8.24k | }; |
|
55 | 16.4k | } _ZN5doris11CastWrapper20create_float_wrapperINS_14DataTypeNumberILNS_13PrimitiveTypeE8EEEEESt8functionIFNS_6StatusEPNS_15FunctionContextERNS_5BlockERKSt6vectorIjSaIjEEjmPKhEES8_RKSt10shared_ptrIKNS_9IDataTypeEE Line | Count | Source | 24 | 8.17k | WrapperType create_float_wrapper(FunctionContext* context, const DataTypePtr& from_type) { | 25 | 8.17k | std::shared_ptr<CastToBase> cast_impl; | 26 | | | 27 | 8.17k | auto make_cast_wrapper = [&](const auto& types) -> bool { | 28 | 8.17k | using Types = std::decay_t<decltype(types)>; | 29 | 8.17k | using FromDataType = typename Types::LeftType; | 30 | 8.17k | if constexpr (type_allow_cast_to_basic_number<FromDataType>) { | 31 | 8.17k | if (context->enable_strict_mode()) { | 32 | 8.17k | cast_impl = std::make_shared< | 33 | 8.17k | CastToImpl<CastModeType::StrictMode, FromDataType, ToDataType>>(); | 34 | 8.17k | } else { | 35 | 8.17k | cast_impl = std::make_shared< | 36 | 8.17k | CastToImpl<CastModeType::NonStrictMode, FromDataType, ToDataType>>(); | 37 | 8.17k | } | 38 | 8.17k | return true; | 39 | 8.17k | } else { | 40 | 8.17k | return false; | 41 | 8.17k | } | 42 | 8.17k | }; | 43 | | | 44 | 8.17k | if (!call_on_index_and_data_type<void>(from_type->get_primitive_type(), make_cast_wrapper)) { | 45 | 0 | return create_unsupport_wrapper( | 46 | 0 | fmt::format("CAST AS number not supported {}", from_type->get_name())); | 47 | 0 | } | 48 | | | 49 | 8.17k | return [cast_impl](FunctionContext* context, Block& block, const ColumnNumbers& arguments, | 50 | 8.17k | uint32_t result, size_t input_rows_count, | 51 | 8.17k | const NullMap::value_type* null_map = nullptr) { | 52 | 8.17k | return cast_impl->execute_impl(context, block, arguments, result, input_rows_count, | 53 | 8.17k | null_map); | 54 | 8.17k | }; | 55 | 8.17k | } |
_ZN5doris11CastWrapper20create_float_wrapperINS_14DataTypeNumberILNS_13PrimitiveTypeE9EEEEESt8functionIFNS_6StatusEPNS_15FunctionContextERNS_5BlockERKSt6vectorIjSaIjEEjmPKhEES8_RKSt10shared_ptrIKNS_9IDataTypeEE Line | Count | Source | 24 | 8.24k | WrapperType create_float_wrapper(FunctionContext* context, const DataTypePtr& from_type) { | 25 | 8.24k | std::shared_ptr<CastToBase> cast_impl; | 26 | | | 27 | 8.24k | auto make_cast_wrapper = [&](const auto& types) -> bool { | 28 | 8.24k | using Types = std::decay_t<decltype(types)>; | 29 | 8.24k | using FromDataType = typename Types::LeftType; | 30 | 8.24k | if constexpr (type_allow_cast_to_basic_number<FromDataType>) { | 31 | 8.24k | if (context->enable_strict_mode()) { | 32 | 8.24k | cast_impl = std::make_shared< | 33 | 8.24k | CastToImpl<CastModeType::StrictMode, FromDataType, ToDataType>>(); | 34 | 8.24k | } else { | 35 | 8.24k | cast_impl = std::make_shared< | 36 | 8.24k | CastToImpl<CastModeType::NonStrictMode, FromDataType, ToDataType>>(); | 37 | 8.24k | } | 38 | 8.24k | return true; | 39 | 8.24k | } else { | 40 | 8.24k | return false; | 41 | 8.24k | } | 42 | 8.24k | }; | 43 | | | 44 | 8.24k | if (!call_on_index_and_data_type<void>(from_type->get_primitive_type(), make_cast_wrapper)) { | 45 | 0 | return create_unsupport_wrapper( | 46 | 0 | fmt::format("CAST AS number not supported {}", from_type->get_name())); | 47 | 0 | } | 48 | | | 49 | 8.24k | return [cast_impl](FunctionContext* context, Block& block, const ColumnNumbers& arguments, | 50 | 8.24k | uint32_t result, size_t input_rows_count, | 51 | 8.24k | const NullMap::value_type* null_map = nullptr) { | 52 | 8.24k | return cast_impl->execute_impl(context, block, arguments, result, input_rows_count, | 53 | 8.24k | null_map); | 54 | 8.24k | }; | 55 | 8.24k | } |
|
56 | | |
57 | | WrapperType create_float_wrapper(FunctionContext* context, const DataTypePtr& from_type, |
58 | 16.4k | PrimitiveType to_type) { |
59 | 16.4k | switch (to_type) { |
60 | 8.17k | case TYPE_FLOAT: |
61 | 8.17k | return create_float_wrapper<DataTypeFloat32>(context, from_type); |
62 | 8.24k | case TYPE_DOUBLE: |
63 | 8.24k | return create_float_wrapper<DataTypeFloat64>(context, from_type); |
64 | 0 | default: |
65 | 0 | return create_unsupport_wrapper( |
66 | 0 | fmt::format("CAST AS float: unsupported to_type {}", type_to_string(to_type))); |
67 | 16.4k | } |
68 | 16.4k | } |
69 | | |
70 | | } // namespace doris::CastWrapper |