be/src/exprs/function/cast/function_cast.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 <utility> |
19 | | |
20 | | #include "core/data_type/data_type_agg_state.h" |
21 | | #include "core/data_type/data_type_decimal.h" |
22 | | #include "core/data_type/data_type_number.h" // IWYU pragma: keep |
23 | | #include "core/data_type/data_type_quantilestate.h" |
24 | | #include "core/data_type/primitive_type.h" |
25 | | #include "exprs/function/cast/cast_to_array.h" |
26 | | #include "exprs/function/cast/cast_to_boolean.h" |
27 | | #include "exprs/function/cast/cast_to_date.h" |
28 | | #include "exprs/function/cast/cast_to_decimal.h" |
29 | | #include "exprs/function/cast/cast_to_float.h" |
30 | | #include "exprs/function/cast/cast_to_int.h" |
31 | | #include "exprs/function/cast/cast_to_ip.h" |
32 | | #include "exprs/function/cast/cast_to_jsonb.h" |
33 | | #include "exprs/function/cast/cast_to_map.h" |
34 | | #include "exprs/function/cast/cast_to_string.h" |
35 | | #include "exprs/function/cast/cast_to_struct.h" |
36 | | #include "exprs/function/cast/cast_to_timestamptz.h" |
37 | | #include "exprs/function/cast/cast_to_variant.h" |
38 | | #include "exprs/function/simple_function_factory.h" |
39 | | |
40 | | namespace doris { |
41 | | |
42 | | namespace CastWrapper { |
43 | | |
44 | 0 | WrapperType create_hll_wrapper(FunctionContext* context, const DataTypePtr& from_type_untyped, |
45 | | const DataTypeHLL& to_type) { |
46 | 0 | /// Conversion from String through parsing. |
47 | 0 | if (check_and_get_data_type<DataTypeString>(from_type_untyped.get())) { |
48 | 0 | return cast_from_string_to_generic; |
49 | | } |
50 | 0 |
|
51 | 0 | return CastWrapper::create_unsupport_wrapper("Cast to HLL only support from String type"); |
52 | | } |
53 | | |
54 | 1 | WrapperType create_bitmap_wrapper(FunctionContext* context, const DataTypePtr& from_type_untyped, |
55 | | const DataTypeBitMap& to_type) { |
56 | 1 | /// Conversion from String through parsing. |
57 | 1 | if (check_and_get_data_type<DataTypeString>(from_type_untyped.get())) { |
58 | 1 | return cast_from_string_to_generic; |
59 | | } |
60 | 0 |
|
61 | 1 | return CastWrapper::create_unsupport_wrapper("Cast to BitMap only support from String type"); |
62 | | } |
63 | 2 | |
64 | | WrapperType create_quantile_state_wrapper(FunctionContext* context, |
65 | 2 | const DataTypePtr& from_type_untyped, |
66 | 2 | const DataTypeQuantileState& to_type) { |
67 | 2 | /// Conversion from String through parsing. |
68 | | if (check_and_get_data_type<DataTypeString>(from_type_untyped.get())) { |
69 | 0 | return cast_from_string_to_generic; |
70 | 2 | } |
71 | | |
72 | | return CastWrapper::create_unsupport_wrapper( |
73 | 370k | "Cast to QuantileState only support from String type"); |
74 | 370k | } |
75 | 370k | |
76 | | WrapperType create_varbinary_wrapper(const DataTypePtr& from_type_untyped) { |
77 | 370k | /// Conversion from String through parsing. |
78 | 1.23k | if (check_and_get_data_type<DataTypeString>(from_type_untyped.get())) { |
79 | 0 | return cast_from_string_to_generic; |
80 | 0 | } |
81 | 0 | |
82 | | return CastWrapper::create_unsupport_wrapper("Cast to Varbinary only support from String type"); |
83 | 1.23k | } |
84 | 1.23k | |
85 | | WrapperType prepare_unpack_dictionaries(FunctionContext* context, const DataTypePtr& from_type, |
86 | 1.23k | const DataTypePtr& to_type) { |
87 | 1.23k | const auto& from_nested = from_type; |
88 | 1.23k | const auto& to_nested = to_type; |
89 | 1.23k | |
90 | 1.23k | if (from_type->is_null_literal()) { |
91 | 1.23k | if (!to_nested->is_nullable()) { |
92 | | return CastWrapper::create_unsupport_wrapper( |
93 | 368k | "Cannot convert NULL to a non-nullable type"); |
94 | | } |
95 | 368k | |
96 | 370k | return [](FunctionContext* context, Block& block, const ColumnNumbers&, uint32_t result, |
97 | | size_t input_rows_count, const NullMap::value_type* null_map = nullptr) { |
98 | | /// TODO: remove this in the future. |
99 | 346k | auto& res = block.get_by_position(result); |
100 | 346k | res.column = res.type->create_column_const_with_default_value(input_rows_count) |
101 | 63.8k | ->convert_to_full_column_if_const(); |
102 | 63.8k | return Status::OK(); |
103 | | }; |
104 | 282k | } |
105 | 196k | |
106 | 196k | auto wrapper = prepare_remove_nullable(context, from_nested, to_nested); |
107 | | |
108 | | return wrapper; |
109 | | } |
110 | 32.4k | |
111 | 32.4k | bool need_replace_null_data_to_default(FunctionContext* context, const DataTypePtr& from_type, |
112 | 32.4k | const DataTypePtr& to_type) { |
113 | 0 | if (from_type->equals(*to_type)) { |
114 | 196k | return false; |
115 | 143k | } |
116 | 143k | |
117 | | auto make_default_wrapper = [&](const auto& types) -> bool { |
118 | | using Types = std::decay_t<decltype(types)>; |
119 | 74.4k | using ToDataType = typename Types::LeftType; |
120 | 74.4k | |
121 | 74.4k | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || |
122 | 39.6k | IsDatelikeV2Types<ToDataType> || |
123 | 39.6k | std::is_same_v<ToDataType, DataTypeTimeV2>)) { |
124 | 39.6k | return false; |
125 | 39.6k | } |
126 | 39.6k | return call_on_index_and_data_type< |
127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { |
128 | 39.6k | using Types2 = std::decay_t<decltype(types2)>; |
129 | 16.0k | using FromDataType = typename Types2::LeftType; |
130 | 16.0k | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || |
131 | 16.0k | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || |
132 | 16.0k | std::is_same_v<FromDataType, DataTypeTimeV2>)) { |
133 | 16.0k | return false; |
134 | 16.0k | } |
135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { |
136 | 39.6k | using FromFieldType = typename FromDataType::FieldType; |
137 | 39.6k | using ToFieldType = typename ToDataType::FieldType; |
138 | 39.6k | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); |
139 | | UInt32 from_scale = 0; |
140 | 39.6k | |
141 | 34.8k | if constexpr (IsDataTypeDecimal<FromDataType>) { |
142 | | const auto* from_decimal_type = |
143 | 34.8k | check_and_get_data_type<FromDataType>(from_type.get()); |
144 | 34.8k | from_precision = |
145 | 34.8k | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); |
146 | 34.8k | from_scale = from_decimal_type->get_scale(); |
147 | | } |
148 | 34.8k | |
149 | 34.8k | UInt32 to_max_digits = 0; |
150 | 34.8k | UInt32 to_precision = 0; |
151 | 39.6k | UInt32 to_scale = 0; |
152 | 4.77k | |
153 | 4.77k | if constexpr (IsDataTypeDecimal<ToDataType>) { |
154 | 4.77k | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); |
155 | | |
156 | 39.6k | const auto* to_decimal_type = |
157 | 39.6k | check_and_get_data_type<ToDataType>(to_type.get()); |
158 | | to_precision = to_decimal_type->get_precision(); |
159 | 39.6k | ToDataType::check_type_precision(to_precision); |
160 | 39.6k | |
161 | 9.86k | to_scale = to_decimal_type->get_scale(); |
162 | 9.86k | ToDataType::check_type_scale(to_scale); |
163 | 9.86k | } |
164 | 39.6k | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { |
165 | 39.6k | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); |
166 | 0 | to_precision = to_max_digits; |
167 | 143k | } Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE2EEEvEEEEbRKT_ENKUlSI_E_clINSB_ISE_SE_EEEEbSI_ function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE2EEEvEEEEbRKT_ENKUlSI_E_clINSB_INSC_ILSD_3EEESE_EEEEbSI_ Line | Count | Source | 114 | 19 | return false; | 115 | 19 | } | 116 | 19 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | | IsDatelikeV2Types<ToDataType> || | 123 | | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | | return false; | 125 | | } | 126 | | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | | using Types2 = std::decay_t<decltype(types2)>; | 129 | | using FromDataType = typename Types2::LeftType; | 130 | | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | | return false; | 134 | | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | | using FromFieldType = typename FromDataType::FieldType; | 137 | | using ToFieldType = typename ToDataType::FieldType; | 138 | | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | | | 141 | | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | | from_precision = | 145 | | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | | | 149 | | UInt32 to_max_digits = 0; | 150 | | UInt32 to_precision = 0; | 151 | | UInt32 to_scale = 0; | 152 | | | 153 | | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | | const auto* to_decimal_type = | 157 | | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | | ToDataType::check_type_precision(to_precision); | 160 | | | 161 | | to_scale = to_decimal_type->get_scale(); | 162 | | ToDataType::check_type_scale(to_scale); | 163 | | } | 164 | | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 19 | to_precision = to_max_digits; | 167 | 19 | } |
function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE2EEEvEEEEbRKT_ENKUlSI_E_clINSB_INSC_ILSD_4EEESE_EEEEbSI_ Line | Count | Source | 114 | 14 | return false; | 115 | 14 | } | 116 | 14 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | | IsDatelikeV2Types<ToDataType> || | 123 | | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | | return false; | 125 | | } | 126 | | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | | using Types2 = std::decay_t<decltype(types2)>; | 129 | | using FromDataType = typename Types2::LeftType; | 130 | | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | | return false; | 134 | | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | | using FromFieldType = typename FromDataType::FieldType; | 137 | | using ToFieldType = typename ToDataType::FieldType; | 138 | | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | | | 141 | | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | | from_precision = | 145 | | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | | | 149 | | UInt32 to_max_digits = 0; | 150 | | UInt32 to_precision = 0; | 151 | | UInt32 to_scale = 0; | 152 | | | 153 | | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | | const auto* to_decimal_type = | 157 | | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | | ToDataType::check_type_precision(to_precision); | 160 | | | 161 | | to_scale = to_decimal_type->get_scale(); | 162 | | ToDataType::check_type_scale(to_scale); | 163 | | } | 164 | | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 14 | to_precision = to_max_digits; | 167 | 14 | } |
function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE2EEEvEEEEbRKT_ENKUlSI_E_clINSB_INSC_ILSD_5EEESE_EEEEbSI_ Line | Count | Source | 114 | 32 | return false; | 115 | 32 | } | 116 | 32 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | | IsDatelikeV2Types<ToDataType> || | 123 | | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | | return false; | 125 | | } | 126 | | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | | using Types2 = std::decay_t<decltype(types2)>; | 129 | | using FromDataType = typename Types2::LeftType; | 130 | | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | | return false; | 134 | | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | | using FromFieldType = typename FromDataType::FieldType; | 137 | | using ToFieldType = typename ToDataType::FieldType; | 138 | | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | | | 141 | | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | | from_precision = | 145 | | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | | | 149 | | UInt32 to_max_digits = 0; | 150 | | UInt32 to_precision = 0; | 151 | | UInt32 to_scale = 0; | 152 | | | 153 | | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | | const auto* to_decimal_type = | 157 | | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | | ToDataType::check_type_precision(to_precision); | 160 | | | 161 | | to_scale = to_decimal_type->get_scale(); | 162 | | ToDataType::check_type_scale(to_scale); | 163 | | } | 164 | | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 32 | to_precision = to_max_digits; | 167 | 32 | } |
function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE2EEEvEEEEbRKT_ENKUlSI_E_clINSB_INSC_ILSD_6EEESE_EEEEbSI_ Line | Count | Source | 114 | 97 | return false; | 115 | 97 | } | 116 | 97 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | | IsDatelikeV2Types<ToDataType> || | 123 | | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | | return false; | 125 | | } | 126 | | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | | using Types2 = std::decay_t<decltype(types2)>; | 129 | | using FromDataType = typename Types2::LeftType; | 130 | | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | | return false; | 134 | | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | | using FromFieldType = typename FromDataType::FieldType; | 137 | | using ToFieldType = typename ToDataType::FieldType; | 138 | | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | | | 141 | | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | | from_precision = | 145 | | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | | | 149 | | UInt32 to_max_digits = 0; | 150 | | UInt32 to_precision = 0; | 151 | | UInt32 to_scale = 0; | 152 | | | 153 | | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | | const auto* to_decimal_type = | 157 | | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | | ToDataType::check_type_precision(to_precision); | 160 | | | 161 | | to_scale = to_decimal_type->get_scale(); | 162 | | ToDataType::check_type_scale(to_scale); | 163 | | } | 164 | | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 97 | to_precision = to_max_digits; | 167 | 97 | } |
function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE2EEEvEEEEbRKT_ENKUlSI_E_clINSB_INSC_ILSD_7EEESE_EEEEbSI_ Line | Count | Source | 114 | 7 | return false; | 115 | 7 | } | 116 | 7 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | | IsDatelikeV2Types<ToDataType> || | 123 | | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | | return false; | 125 | | } | 126 | | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | | using Types2 = std::decay_t<decltype(types2)>; | 129 | | using FromDataType = typename Types2::LeftType; | 130 | | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | | return false; | 134 | | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | | using FromFieldType = typename FromDataType::FieldType; | 137 | | using ToFieldType = typename ToDataType::FieldType; | 138 | | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | | | 141 | | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | | from_precision = | 145 | | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | | | 149 | | UInt32 to_max_digits = 0; | 150 | | UInt32 to_precision = 0; | 151 | | UInt32 to_scale = 0; | 152 | | | 153 | | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | | const auto* to_decimal_type = | 157 | | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | | ToDataType::check_type_precision(to_precision); | 160 | | | 161 | | to_scale = to_decimal_type->get_scale(); | 162 | | ToDataType::check_type_scale(to_scale); | 163 | | } | 164 | | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 7 | to_precision = to_max_digits; | 167 | 7 | } |
function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE2EEEvEEEEbRKT_ENKUlSI_E_clINSB_INSC_ILSD_8EEESE_EEEEbSI_ Line | Count | Source | 114 | 2 | return false; | 115 | 2 | } | 116 | 2 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | | IsDatelikeV2Types<ToDataType> || | 123 | | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | | return false; | 125 | | } | 126 | | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | | using Types2 = std::decay_t<decltype(types2)>; | 129 | | using FromDataType = typename Types2::LeftType; | 130 | | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | | return false; | 134 | | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | | using FromFieldType = typename FromDataType::FieldType; | 137 | | using ToFieldType = typename ToDataType::FieldType; | 138 | | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | | | 141 | | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | | from_precision = | 145 | | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | | | 149 | | UInt32 to_max_digits = 0; | 150 | | UInt32 to_precision = 0; | 151 | | UInt32 to_scale = 0; | 152 | | | 153 | | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | | const auto* to_decimal_type = | 157 | | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | | ToDataType::check_type_precision(to_precision); | 160 | | | 161 | | to_scale = to_decimal_type->get_scale(); | 162 | | ToDataType::check_type_scale(to_scale); | 163 | | } | 164 | | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 2 | to_precision = to_max_digits; | 167 | 2 | } |
function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE2EEEvEEEEbRKT_ENKUlSI_E_clINSB_INSC_ILSD_9EEESE_EEEEbSI_ Line | Count | Source | 114 | 7 | return false; | 115 | 7 | } | 116 | 7 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | | IsDatelikeV2Types<ToDataType> || | 123 | | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | | return false; | 125 | | } | 126 | | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | | using Types2 = std::decay_t<decltype(types2)>; | 129 | | using FromDataType = typename Types2::LeftType; | 130 | | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | | return false; | 134 | | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | | using FromFieldType = typename FromDataType::FieldType; | 137 | | using ToFieldType = typename ToDataType::FieldType; | 138 | | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | | | 141 | | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | | from_precision = | 145 | | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | | | 149 | | UInt32 to_max_digits = 0; | 150 | | UInt32 to_precision = 0; | 151 | | UInt32 to_scale = 0; | 152 | | | 153 | | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | | const auto* to_decimal_type = | 157 | | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | | ToDataType::check_type_precision(to_precision); | 160 | | | 161 | | to_scale = to_decimal_type->get_scale(); | 162 | | ToDataType::check_type_scale(to_scale); | 163 | | } | 164 | | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 7 | to_precision = to_max_digits; | 167 | 7 | } |
function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE2EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_15DataTypeDecimalILSD_28EEESE_EEEEbSI_ Line | Count | Source | 114 | 12 | return false; | 115 | 12 | } | 116 | 12 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | 12 | IsDatelikeV2Types<ToDataType> || | 123 | 12 | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | 12 | return false; | 125 | 12 | } | 126 | 12 | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | 12 | using Types2 = std::decay_t<decltype(types2)>; | 129 | 12 | using FromDataType = typename Types2::LeftType; | 130 | 12 | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | 12 | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | 12 | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | 12 | return false; | 134 | 12 | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | 12 | using FromFieldType = typename FromDataType::FieldType; | 137 | 12 | using ToFieldType = typename ToDataType::FieldType; | 138 | 12 | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | | | 141 | | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | | from_precision = | 145 | | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | | | 149 | | UInt32 to_max_digits = 0; | 150 | | UInt32 to_precision = 0; | 151 | 12 | UInt32 to_scale = 0; | 152 | 12 | | 153 | 12 | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | 12 | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | 12 | const auto* to_decimal_type = | 157 | 12 | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | 12 | ToDataType::check_type_precision(to_precision); | 160 | 12 |
| 161 | 0 | to_scale = to_decimal_type->get_scale(); | 162 | 0 | ToDataType::check_type_scale(to_scale); | 163 | 0 | } | 164 | 12 | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | 12 | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 0 | to_precision = to_max_digits; | 167 | 12 | } |
function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE2EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_15DataTypeDecimalILSD_29EEESE_EEEEbSI_ Line | Count | Source | 114 | 5 | return false; | 115 | 5 | } | 116 | 5 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | 5 | IsDatelikeV2Types<ToDataType> || | 123 | 5 | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | 5 | return false; | 125 | 5 | } | 126 | 5 | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | 5 | using Types2 = std::decay_t<decltype(types2)>; | 129 | 5 | using FromDataType = typename Types2::LeftType; | 130 | 5 | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | 5 | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | 5 | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | 5 | return false; | 134 | 5 | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | 5 | using FromFieldType = typename FromDataType::FieldType; | 137 | 5 | using ToFieldType = typename ToDataType::FieldType; | 138 | 5 | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | | | 141 | | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | | from_precision = | 145 | | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | | | 149 | | UInt32 to_max_digits = 0; | 150 | | UInt32 to_precision = 0; | 151 | 5 | UInt32 to_scale = 0; | 152 | 5 | | 153 | 5 | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | 5 | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | 5 | const auto* to_decimal_type = | 157 | 5 | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | 5 | ToDataType::check_type_precision(to_precision); | 160 | 5 |
| 161 | 0 | to_scale = to_decimal_type->get_scale(); | 162 | 0 | ToDataType::check_type_scale(to_scale); | 163 | 0 | } | 164 | 5 | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | 5 | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 0 | to_precision = to_max_digits; | 167 | 5 | } |
function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE2EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_15DataTypeDecimalILSD_20EEESE_EEEEbSI_ Line | Count | Source | 114 | 2 | return false; | 115 | 2 | } | 116 | 2 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | 2 | IsDatelikeV2Types<ToDataType> || | 123 | 2 | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | 2 | return false; | 125 | 2 | } | 126 | 2 | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | 2 | using Types2 = std::decay_t<decltype(types2)>; | 129 | 2 | using FromDataType = typename Types2::LeftType; | 130 | 2 | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | 2 | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | 2 | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | 2 | return false; | 134 | 2 | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | 2 | using FromFieldType = typename FromDataType::FieldType; | 137 | 2 | using ToFieldType = typename ToDataType::FieldType; | 138 | 2 | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | | | 141 | | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | | from_precision = | 145 | | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | | | 149 | | UInt32 to_max_digits = 0; | 150 | | UInt32 to_precision = 0; | 151 | 2 | UInt32 to_scale = 0; | 152 | 2 | | 153 | 2 | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | 2 | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | 2 | const auto* to_decimal_type = | 157 | 2 | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | 2 | ToDataType::check_type_precision(to_precision); | 160 | 2 |
| 161 | 0 | to_scale = to_decimal_type->get_scale(); | 162 | 0 | ToDataType::check_type_scale(to_scale); | 163 | 0 | } | 164 | 2 | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | 2 | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 0 | to_precision = to_max_digits; | 167 | 2 | } |
function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE2EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_15DataTypeDecimalILSD_30EEESE_EEEEbSI_ Line | Count | Source | 114 | 5 | return false; | 115 | 5 | } | 116 | 5 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | 5 | IsDatelikeV2Types<ToDataType> || | 123 | 5 | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | 5 | return false; | 125 | 5 | } | 126 | 5 | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | 5 | using Types2 = std::decay_t<decltype(types2)>; | 129 | 5 | using FromDataType = typename Types2::LeftType; | 130 | 5 | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | 5 | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | 5 | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | 5 | return false; | 134 | 5 | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | 5 | using FromFieldType = typename FromDataType::FieldType; | 137 | 5 | using ToFieldType = typename ToDataType::FieldType; | 138 | 5 | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | | | 141 | | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | | from_precision = | 145 | | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | | | 149 | | UInt32 to_max_digits = 0; | 150 | | UInt32 to_precision = 0; | 151 | 5 | UInt32 to_scale = 0; | 152 | 5 | | 153 | 5 | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | 5 | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | 5 | const auto* to_decimal_type = | 157 | 5 | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | 5 | ToDataType::check_type_precision(to_precision); | 160 | 5 |
| 161 | 0 | to_scale = to_decimal_type->get_scale(); | 162 | 0 | ToDataType::check_type_scale(to_scale); | 163 | 0 | } | 164 | 5 | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | 5 | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 0 | to_precision = to_max_digits; | 167 | 5 | } |
function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE2EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_15DataTypeDecimalILSD_35EEESE_EEEEbSI_ Line | Count | Source | 114 | 2 | return false; | 115 | 2 | } | 116 | 2 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | 2 | IsDatelikeV2Types<ToDataType> || | 123 | 2 | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | 2 | return false; | 125 | 2 | } | 126 | 2 | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | 2 | using Types2 = std::decay_t<decltype(types2)>; | 129 | 2 | using FromDataType = typename Types2::LeftType; | 130 | 2 | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | 2 | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | 2 | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | 2 | return false; | 134 | 2 | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | 2 | using FromFieldType = typename FromDataType::FieldType; | 137 | 2 | using ToFieldType = typename ToDataType::FieldType; | 138 | 2 | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | | | 141 | | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | | from_precision = | 145 | | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | | | 149 | | UInt32 to_max_digits = 0; | 150 | | UInt32 to_precision = 0; | 151 | 2 | UInt32 to_scale = 0; | 152 | 2 | | 153 | 2 | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | 2 | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | 2 | const auto* to_decimal_type = | 157 | 2 | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | 2 | ToDataType::check_type_precision(to_precision); | 160 | 2 |
| 161 | 0 | to_scale = to_decimal_type->get_scale(); | 162 | 0 | ToDataType::check_type_scale(to_scale); | 163 | 0 | } | 164 | 2 | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | 2 | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 0 | to_precision = to_max_digits; | 167 | 2 | } |
Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE2EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_12DataTypeDateESE_EEEEbSI_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE2EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_14DataTypeDateV2ESE_EEEEbSI_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE2EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_18DataTypeDateTimeV2ESE_EEEEbSI_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE2EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_16DataTypeDateTimeESE_EEEEbSI_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE2EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_14DataTypeTimeV2ESE_EEEEbSI_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE2EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_19DataTypeTimeStampTzESE_EEEEbSI_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE2EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_12DataTypeIPv4ESE_EEEEbSI_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE2EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_12DataTypeIPv6ESE_EEEEbSI_ function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE2EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_14DataTypeStringESE_EEEEbSI_ Line | Count | Source | 114 | 686 | return false; | 115 | 686 | } | 116 | 686 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | 686 | using ToDataType = typename Types::LeftType; | 120 | 686 | | 121 | 686 | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | | IsDatelikeV2Types<ToDataType> || | 123 | | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | | return false; | 125 | | } | 126 | | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | | using Types2 = std::decay_t<decltype(types2)>; | 129 | | using FromDataType = typename Types2::LeftType; | 130 | | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | | return false; | 134 | | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | | using FromFieldType = typename FromDataType::FieldType; | 137 | | using ToFieldType = typename ToDataType::FieldType; | 138 | | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | | | 141 | | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | | from_precision = | 145 | | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | | | 149 | | UInt32 to_max_digits = 0; | 150 | | UInt32 to_precision = 0; | 151 | | UInt32 to_scale = 0; | 152 | | | 153 | | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | | const auto* to_decimal_type = | 157 | | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | | ToDataType::check_type_precision(to_precision); | 160 | | | 161 | | to_scale = to_decimal_type->get_scale(); | 162 | | ToDataType::check_type_scale(to_scale); | 163 | | } | 164 | | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 686 | to_precision = to_max_digits; | 167 | 686 | } |
function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE3EEEvEEEEbRKT_ENKUlSI_E_clINSB_INSC_ILSD_2EEESE_EEEEbSI_ Line | Count | Source | 114 | 317 | return false; | 115 | 317 | } | 116 | 317 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | | IsDatelikeV2Types<ToDataType> || | 123 | | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | | return false; | 125 | | } | 126 | | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | | using Types2 = std::decay_t<decltype(types2)>; | 129 | | using FromDataType = typename Types2::LeftType; | 130 | | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | | return false; | 134 | | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | | using FromFieldType = typename FromDataType::FieldType; | 137 | | using ToFieldType = typename ToDataType::FieldType; | 138 | | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | | | 141 | | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | | from_precision = | 145 | | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | | | 149 | | UInt32 to_max_digits = 0; | 150 | | UInt32 to_precision = 0; | 151 | | UInt32 to_scale = 0; | 152 | | | 153 | | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | | const auto* to_decimal_type = | 157 | | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | | ToDataType::check_type_precision(to_precision); | 160 | | | 161 | | to_scale = to_decimal_type->get_scale(); | 162 | | ToDataType::check_type_scale(to_scale); | 163 | | } | 164 | | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 317 | to_precision = to_max_digits; | 167 | 317 | } |
Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE3EEEvEEEEbRKT_ENKUlSI_E_clINSB_ISE_SE_EEEEbSI_ function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE3EEEvEEEEbRKT_ENKUlSI_E_clINSB_INSC_ILSD_4EEESE_EEEEbSI_ Line | Count | Source | 114 | 10 | return false; | 115 | 10 | } | 116 | 10 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | | IsDatelikeV2Types<ToDataType> || | 123 | | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | | return false; | 125 | | } | 126 | | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | | using Types2 = std::decay_t<decltype(types2)>; | 129 | | using FromDataType = typename Types2::LeftType; | 130 | | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | | return false; | 134 | | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | | using FromFieldType = typename FromDataType::FieldType; | 137 | | using ToFieldType = typename ToDataType::FieldType; | 138 | | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | | | 141 | | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | | from_precision = | 145 | | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | | | 149 | | UInt32 to_max_digits = 0; | 150 | | UInt32 to_precision = 0; | 151 | | UInt32 to_scale = 0; | 152 | | | 153 | | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | | const auto* to_decimal_type = | 157 | | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | | ToDataType::check_type_precision(to_precision); | 160 | | | 161 | | to_scale = to_decimal_type->get_scale(); | 162 | | ToDataType::check_type_scale(to_scale); | 163 | | } | 164 | | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 10 | to_precision = to_max_digits; | 167 | 10 | } |
function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE3EEEvEEEEbRKT_ENKUlSI_E_clINSB_INSC_ILSD_5EEESE_EEEEbSI_ Line | Count | Source | 114 | 127 | return false; | 115 | 127 | } | 116 | 127 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | | IsDatelikeV2Types<ToDataType> || | 123 | | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | | return false; | 125 | | } | 126 | | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | | using Types2 = std::decay_t<decltype(types2)>; | 129 | | using FromDataType = typename Types2::LeftType; | 130 | | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | | return false; | 134 | | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | | using FromFieldType = typename FromDataType::FieldType; | 137 | | using ToFieldType = typename ToDataType::FieldType; | 138 | | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | | | 141 | | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | | from_precision = | 145 | | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | | | 149 | | UInt32 to_max_digits = 0; | 150 | | UInt32 to_precision = 0; | 151 | | UInt32 to_scale = 0; | 152 | | | 153 | | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | | const auto* to_decimal_type = | 157 | | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | | ToDataType::check_type_precision(to_precision); | 160 | | | 161 | | to_scale = to_decimal_type->get_scale(); | 162 | | ToDataType::check_type_scale(to_scale); | 163 | | } | 164 | | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 127 | to_precision = to_max_digits; | 167 | 127 | } |
function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE3EEEvEEEEbRKT_ENKUlSI_E_clINSB_INSC_ILSD_6EEESE_EEEEbSI_ Line | Count | Source | 114 | 278 | return false; | 115 | 278 | } | 116 | 278 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | | IsDatelikeV2Types<ToDataType> || | 123 | | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | | return false; | 125 | | } | 126 | | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | | using Types2 = std::decay_t<decltype(types2)>; | 129 | | using FromDataType = typename Types2::LeftType; | 130 | | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | | return false; | 134 | | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | | using FromFieldType = typename FromDataType::FieldType; | 137 | | using ToFieldType = typename ToDataType::FieldType; | 138 | | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | | | 141 | | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | | from_precision = | 145 | | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | | | 149 | | UInt32 to_max_digits = 0; | 150 | | UInt32 to_precision = 0; | 151 | | UInt32 to_scale = 0; | 152 | | | 153 | | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | | const auto* to_decimal_type = | 157 | | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | | ToDataType::check_type_precision(to_precision); | 160 | | | 161 | | to_scale = to_decimal_type->get_scale(); | 162 | | ToDataType::check_type_scale(to_scale); | 163 | | } | 164 | | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 278 | to_precision = to_max_digits; | 167 | 278 | } |
function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE3EEEvEEEEbRKT_ENKUlSI_E_clINSB_INSC_ILSD_7EEESE_EEEEbSI_ Line | Count | Source | 114 | 7 | return false; | 115 | 7 | } | 116 | 7 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | | IsDatelikeV2Types<ToDataType> || | 123 | | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | | return false; | 125 | | } | 126 | | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | | using Types2 = std::decay_t<decltype(types2)>; | 129 | | using FromDataType = typename Types2::LeftType; | 130 | | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | | return false; | 134 | | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | | using FromFieldType = typename FromDataType::FieldType; | 137 | | using ToFieldType = typename ToDataType::FieldType; | 138 | | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | | | 141 | | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | | from_precision = | 145 | | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | | | 149 | | UInt32 to_max_digits = 0; | 150 | | UInt32 to_precision = 0; | 151 | | UInt32 to_scale = 0; | 152 | | | 153 | | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | | const auto* to_decimal_type = | 157 | | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | | ToDataType::check_type_precision(to_precision); | 160 | | | 161 | | to_scale = to_decimal_type->get_scale(); | 162 | | ToDataType::check_type_scale(to_scale); | 163 | | } | 164 | | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 7 | to_precision = to_max_digits; | 167 | 7 | } |
function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE3EEEvEEEEbRKT_ENKUlSI_E_clINSB_INSC_ILSD_8EEESE_EEEEbSI_ Line | Count | Source | 114 | 23 | return false; | 115 | 23 | } | 116 | 23 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | | IsDatelikeV2Types<ToDataType> || | 123 | | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | | return false; | 125 | | } | 126 | | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | | using Types2 = std::decay_t<decltype(types2)>; | 129 | | using FromDataType = typename Types2::LeftType; | 130 | | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | | return false; | 134 | | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | | using FromFieldType = typename FromDataType::FieldType; | 137 | | using ToFieldType = typename ToDataType::FieldType; | 138 | | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | | | 141 | | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | | from_precision = | 145 | | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | | | 149 | | UInt32 to_max_digits = 0; | 150 | | UInt32 to_precision = 0; | 151 | | UInt32 to_scale = 0; | 152 | | | 153 | | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | | const auto* to_decimal_type = | 157 | | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | | ToDataType::check_type_precision(to_precision); | 160 | | | 161 | | to_scale = to_decimal_type->get_scale(); | 162 | | ToDataType::check_type_scale(to_scale); | 163 | | } | 164 | | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 23 | to_precision = to_max_digits; | 167 | 23 | } |
function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE3EEEvEEEEbRKT_ENKUlSI_E_clINSB_INSC_ILSD_9EEESE_EEEEbSI_ Line | Count | Source | 114 | 28 | return false; | 115 | 28 | } | 116 | 28 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | | IsDatelikeV2Types<ToDataType> || | 123 | | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | | return false; | 125 | | } | 126 | | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | | using Types2 = std::decay_t<decltype(types2)>; | 129 | | using FromDataType = typename Types2::LeftType; | 130 | | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | | return false; | 134 | | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | | using FromFieldType = typename FromDataType::FieldType; | 137 | | using ToFieldType = typename ToDataType::FieldType; | 138 | | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | | | 141 | | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | | from_precision = | 145 | | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | | | 149 | | UInt32 to_max_digits = 0; | 150 | | UInt32 to_precision = 0; | 151 | | UInt32 to_scale = 0; | 152 | | | 153 | | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | | const auto* to_decimal_type = | 157 | | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | | ToDataType::check_type_precision(to_precision); | 160 | | | 161 | | to_scale = to_decimal_type->get_scale(); | 162 | | ToDataType::check_type_scale(to_scale); | 163 | | } | 164 | | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 28 | to_precision = to_max_digits; | 167 | 28 | } |
function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE3EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_15DataTypeDecimalILSD_28EEESE_EEEEbSI_ Line | Count | Source | 114 | 20 | return false; | 115 | 20 | } | 116 | 20 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | 20 | IsDatelikeV2Types<ToDataType> || | 123 | 20 | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | 20 | return false; | 125 | 20 | } | 126 | 20 | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | 20 | using Types2 = std::decay_t<decltype(types2)>; | 129 | 20 | using FromDataType = typename Types2::LeftType; | 130 | 20 | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | 20 | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | 20 | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | 20 | return false; | 134 | 20 | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | 20 | using FromFieldType = typename FromDataType::FieldType; | 137 | 20 | using ToFieldType = typename ToDataType::FieldType; | 138 | 20 | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | | | 141 | | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | | from_precision = | 145 | | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | | | 149 | | UInt32 to_max_digits = 0; | 150 | | UInt32 to_precision = 0; | 151 | 20 | UInt32 to_scale = 0; | 152 | 20 | | 153 | 20 | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | 20 | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | 20 | const auto* to_decimal_type = | 157 | 20 | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | 20 | ToDataType::check_type_precision(to_precision); | 160 | 20 |
| 161 | 0 | to_scale = to_decimal_type->get_scale(); | 162 | 0 | ToDataType::check_type_scale(to_scale); | 163 | 0 | } | 164 | 20 | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | 20 | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 0 | to_precision = to_max_digits; | 167 | 20 | } |
function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE3EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_15DataTypeDecimalILSD_29EEESE_EEEEbSI_ Line | Count | Source | 114 | 25 | return false; | 115 | 25 | } | 116 | 25 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | 25 | IsDatelikeV2Types<ToDataType> || | 123 | 25 | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | 25 | return false; | 125 | 25 | } | 126 | 25 | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | 25 | using Types2 = std::decay_t<decltype(types2)>; | 129 | 25 | using FromDataType = typename Types2::LeftType; | 130 | 25 | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | 25 | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | 25 | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | 25 | return false; | 134 | 25 | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | 25 | using FromFieldType = typename FromDataType::FieldType; | 137 | 25 | using ToFieldType = typename ToDataType::FieldType; | 138 | 25 | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | | | 141 | | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | | from_precision = | 145 | | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | | | 149 | | UInt32 to_max_digits = 0; | 150 | | UInt32 to_precision = 0; | 151 | 25 | UInt32 to_scale = 0; | 152 | 25 | | 153 | 25 | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | 25 | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | 25 | const auto* to_decimal_type = | 157 | 25 | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | 25 | ToDataType::check_type_precision(to_precision); | 160 | 25 |
| 161 | 0 | to_scale = to_decimal_type->get_scale(); | 162 | 0 | ToDataType::check_type_scale(to_scale); | 163 | 0 | } | 164 | 25 | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | 25 | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 0 | to_precision = to_max_digits; | 167 | 25 | } |
function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE3EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_15DataTypeDecimalILSD_20EEESE_EEEEbSI_ Line | Count | Source | 114 | 8 | return false; | 115 | 8 | } | 116 | 8 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | 8 | IsDatelikeV2Types<ToDataType> || | 123 | 8 | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | 8 | return false; | 125 | 8 | } | 126 | 8 | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | 8 | using Types2 = std::decay_t<decltype(types2)>; | 129 | 8 | using FromDataType = typename Types2::LeftType; | 130 | 8 | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | 8 | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | 8 | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | 8 | return false; | 134 | 8 | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | 8 | using FromFieldType = typename FromDataType::FieldType; | 137 | 8 | using ToFieldType = typename ToDataType::FieldType; | 138 | 8 | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | | | 141 | | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | | from_precision = | 145 | | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | | | 149 | | UInt32 to_max_digits = 0; | 150 | | UInt32 to_precision = 0; | 151 | 8 | UInt32 to_scale = 0; | 152 | 8 | | 153 | 8 | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | 8 | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | 8 | const auto* to_decimal_type = | 157 | 8 | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | 8 | ToDataType::check_type_precision(to_precision); | 160 | 8 |
| 161 | 0 | to_scale = to_decimal_type->get_scale(); | 162 | 0 | ToDataType::check_type_scale(to_scale); | 163 | 0 | } | 164 | 8 | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | 8 | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 0 | to_precision = to_max_digits; | 167 | 8 | } |
function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE3EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_15DataTypeDecimalILSD_30EEESE_EEEEbSI_ Line | Count | Source | 114 | 24 | return false; | 115 | 24 | } | 116 | 24 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | 24 | IsDatelikeV2Types<ToDataType> || | 123 | 24 | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | 24 | return false; | 125 | 24 | } | 126 | 24 | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | 24 | using Types2 = std::decay_t<decltype(types2)>; | 129 | 24 | using FromDataType = typename Types2::LeftType; | 130 | 24 | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | 24 | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | 24 | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | 24 | return false; | 134 | 24 | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | 24 | using FromFieldType = typename FromDataType::FieldType; | 137 | 24 | using ToFieldType = typename ToDataType::FieldType; | 138 | 24 | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | | | 141 | | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | | from_precision = | 145 | | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | | | 149 | | UInt32 to_max_digits = 0; | 150 | | UInt32 to_precision = 0; | 151 | 24 | UInt32 to_scale = 0; | 152 | 24 | | 153 | 24 | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | 24 | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | 24 | const auto* to_decimal_type = | 157 | 24 | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | 24 | ToDataType::check_type_precision(to_precision); | 160 | 24 |
| 161 | 0 | to_scale = to_decimal_type->get_scale(); | 162 | 0 | ToDataType::check_type_scale(to_scale); | 163 | 0 | } | 164 | 24 | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | 24 | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 0 | to_precision = to_max_digits; | 167 | 24 | } |
function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE3EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_15DataTypeDecimalILSD_35EEESE_EEEEbSI_ Line | Count | Source | 114 | 24 | return false; | 115 | 24 | } | 116 | 24 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | 24 | IsDatelikeV2Types<ToDataType> || | 123 | 24 | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | 24 | return false; | 125 | 24 | } | 126 | 24 | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | 24 | using Types2 = std::decay_t<decltype(types2)>; | 129 | 24 | using FromDataType = typename Types2::LeftType; | 130 | 24 | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | 24 | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | 24 | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | 24 | return false; | 134 | 24 | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | 24 | using FromFieldType = typename FromDataType::FieldType; | 137 | 24 | using ToFieldType = typename ToDataType::FieldType; | 138 | 24 | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | | | 141 | | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | | from_precision = | 145 | | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | | | 149 | | UInt32 to_max_digits = 0; | 150 | | UInt32 to_precision = 0; | 151 | 24 | UInt32 to_scale = 0; | 152 | 24 | | 153 | 24 | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | 24 | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | 24 | const auto* to_decimal_type = | 157 | 24 | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | 24 | ToDataType::check_type_precision(to_precision); | 160 | 24 |
| 161 | 0 | to_scale = to_decimal_type->get_scale(); | 162 | 0 | ToDataType::check_type_scale(to_scale); | 163 | 0 | } | 164 | 24 | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | 24 | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 0 | to_precision = to_max_digits; | 167 | 24 | } |
Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE3EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_12DataTypeDateESE_EEEEbSI_ function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE3EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_14DataTypeDateV2ESE_EEEEbSI_ Line | Count | Source | 114 | 72 | return false; | 115 | 72 | } | 116 | 72 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | | IsDatelikeV2Types<ToDataType> || | 123 | | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | | return false; | 125 | | } | 126 | | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | | using Types2 = std::decay_t<decltype(types2)>; | 129 | | using FromDataType = typename Types2::LeftType; | 130 | | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | | return false; | 134 | | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | | using FromFieldType = typename FromDataType::FieldType; | 137 | | using ToFieldType = typename ToDataType::FieldType; | 138 | | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | | | 141 | | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | | from_precision = | 145 | | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | | | 149 | | UInt32 to_max_digits = 0; | 150 | | UInt32 to_precision = 0; | 151 | | UInt32 to_scale = 0; | 152 | | | 153 | | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | | const auto* to_decimal_type = | 157 | | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | | ToDataType::check_type_precision(to_precision); | 160 | | | 161 | | to_scale = to_decimal_type->get_scale(); | 162 | | ToDataType::check_type_scale(to_scale); | 163 | | } | 164 | | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 72 | to_precision = to_max_digits; | 167 | 72 | } |
function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE3EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_18DataTypeDateTimeV2ESE_EEEEbSI_ Line | Count | Source | 114 | 24 | return false; | 115 | 24 | } | 116 | 24 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | | IsDatelikeV2Types<ToDataType> || | 123 | | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | | return false; | 125 | | } | 126 | | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | | using Types2 = std::decay_t<decltype(types2)>; | 129 | | using FromDataType = typename Types2::LeftType; | 130 | | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | | return false; | 134 | | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | | using FromFieldType = typename FromDataType::FieldType; | 137 | | using ToFieldType = typename ToDataType::FieldType; | 138 | | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | | | 141 | | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | | from_precision = | 145 | | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | | | 149 | | UInt32 to_max_digits = 0; | 150 | | UInt32 to_precision = 0; | 151 | | UInt32 to_scale = 0; | 152 | | | 153 | | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | | const auto* to_decimal_type = | 157 | | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | | ToDataType::check_type_precision(to_precision); | 160 | | | 161 | | to_scale = to_decimal_type->get_scale(); | 162 | | ToDataType::check_type_scale(to_scale); | 163 | | } | 164 | | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 24 | to_precision = to_max_digits; | 167 | 24 | } |
Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE3EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_16DataTypeDateTimeESE_EEEEbSI_ function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE3EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_14DataTypeTimeV2ESE_EEEEbSI_ Line | Count | Source | 114 | 320 | return false; | 115 | 320 | } | 116 | 320 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | | IsDatelikeV2Types<ToDataType> || | 123 | | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | | return false; | 125 | | } | 126 | | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | | using Types2 = std::decay_t<decltype(types2)>; | 129 | | using FromDataType = typename Types2::LeftType; | 130 | | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | | return false; | 134 | | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | | using FromFieldType = typename FromDataType::FieldType; | 137 | | using ToFieldType = typename ToDataType::FieldType; | 138 | | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | | | 141 | | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | | from_precision = | 145 | | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | | | 149 | | UInt32 to_max_digits = 0; | 150 | | UInt32 to_precision = 0; | 151 | | UInt32 to_scale = 0; | 152 | | | 153 | | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | | const auto* to_decimal_type = | 157 | | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | | ToDataType::check_type_precision(to_precision); | 160 | | | 161 | | to_scale = to_decimal_type->get_scale(); | 162 | | ToDataType::check_type_scale(to_scale); | 163 | | } | 164 | | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 320 | to_precision = to_max_digits; | 167 | 320 | } |
Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE3EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_19DataTypeTimeStampTzESE_EEEEbSI_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE3EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_12DataTypeIPv4ESE_EEEEbSI_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE3EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_12DataTypeIPv6ESE_EEEEbSI_ function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE3EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_14DataTypeStringESE_EEEEbSI_ Line | Count | Source | 114 | 2.32k | return false; | 115 | 2.32k | } | 116 | 2.32k | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | 2.32k | using ToDataType = typename Types::LeftType; | 120 | 2.32k | | 121 | 2.32k | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | | IsDatelikeV2Types<ToDataType> || | 123 | | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | | return false; | 125 | | } | 126 | | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | | using Types2 = std::decay_t<decltype(types2)>; | 129 | | using FromDataType = typename Types2::LeftType; | 130 | | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | | return false; | 134 | | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | | using FromFieldType = typename FromDataType::FieldType; | 137 | | using ToFieldType = typename ToDataType::FieldType; | 138 | | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | | | 141 | | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | | from_precision = | 145 | | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | | | 149 | | UInt32 to_max_digits = 0; | 150 | | UInt32 to_precision = 0; | 151 | | UInt32 to_scale = 0; | 152 | | | 153 | | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | | const auto* to_decimal_type = | 157 | | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | | ToDataType::check_type_precision(to_precision); | 160 | | | 161 | | to_scale = to_decimal_type->get_scale(); | 162 | | ToDataType::check_type_scale(to_scale); | 163 | | } | 164 | | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 2.32k | to_precision = to_max_digits; | 167 | 2.32k | } |
function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE4EEEvEEEEbRKT_ENKUlSI_E_clINSB_INSC_ILSD_2EEESE_EEEEbSI_ Line | Count | Source | 114 | 54 | return false; | 115 | 54 | } | 116 | 54 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | | IsDatelikeV2Types<ToDataType> || | 123 | | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | | return false; | 125 | | } | 126 | | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | | using Types2 = std::decay_t<decltype(types2)>; | 129 | | using FromDataType = typename Types2::LeftType; | 130 | | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | | return false; | 134 | | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | | using FromFieldType = typename FromDataType::FieldType; | 137 | | using ToFieldType = typename ToDataType::FieldType; | 138 | | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | | | 141 | | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | | from_precision = | 145 | | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | | | 149 | | UInt32 to_max_digits = 0; | 150 | | UInt32 to_precision = 0; | 151 | | UInt32 to_scale = 0; | 152 | | | 153 | | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | | const auto* to_decimal_type = | 157 | | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | | ToDataType::check_type_precision(to_precision); | 160 | | | 161 | | to_scale = to_decimal_type->get_scale(); | 162 | | ToDataType::check_type_scale(to_scale); | 163 | | } | 164 | | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 54 | to_precision = to_max_digits; | 167 | 54 | } |
function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE4EEEvEEEEbRKT_ENKUlSI_E_clINSB_INSC_ILSD_3EEESE_EEEEbSI_ Line | Count | Source | 114 | 2.12k | return false; | 115 | 2.12k | } | 116 | 2.12k | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | | IsDatelikeV2Types<ToDataType> || | 123 | | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | | return false; | 125 | | } | 126 | | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | | using Types2 = std::decay_t<decltype(types2)>; | 129 | | using FromDataType = typename Types2::LeftType; | 130 | | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | | return false; | 134 | | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | | using FromFieldType = typename FromDataType::FieldType; | 137 | | using ToFieldType = typename ToDataType::FieldType; | 138 | | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | | | 141 | | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | | from_precision = | 145 | | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | | | 149 | | UInt32 to_max_digits = 0; | 150 | | UInt32 to_precision = 0; | 151 | | UInt32 to_scale = 0; | 152 | | | 153 | | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | | const auto* to_decimal_type = | 157 | | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | | ToDataType::check_type_precision(to_precision); | 160 | | | 161 | | to_scale = to_decimal_type->get_scale(); | 162 | | ToDataType::check_type_scale(to_scale); | 163 | | } | 164 | | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 2.12k | to_precision = to_max_digits; | 167 | 2.12k | } |
Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE4EEEvEEEEbRKT_ENKUlSI_E_clINSB_ISE_SE_EEEEbSI_ function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE4EEEvEEEEbRKT_ENKUlSI_E_clINSB_INSC_ILSD_5EEESE_EEEEbSI_ Line | Count | Source | 114 | 136 | return false; | 115 | 136 | } | 116 | 136 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | | IsDatelikeV2Types<ToDataType> || | 123 | | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | | return false; | 125 | | } | 126 | | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | | using Types2 = std::decay_t<decltype(types2)>; | 129 | | using FromDataType = typename Types2::LeftType; | 130 | | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | | return false; | 134 | | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | | using FromFieldType = typename FromDataType::FieldType; | 137 | | using ToFieldType = typename ToDataType::FieldType; | 138 | | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | | | 141 | | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | | from_precision = | 145 | | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | | | 149 | | UInt32 to_max_digits = 0; | 150 | | UInt32 to_precision = 0; | 151 | | UInt32 to_scale = 0; | 152 | | | 153 | | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | | const auto* to_decimal_type = | 157 | | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | | ToDataType::check_type_precision(to_precision); | 160 | | | 161 | | to_scale = to_decimal_type->get_scale(); | 162 | | ToDataType::check_type_scale(to_scale); | 163 | | } | 164 | | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 136 | to_precision = to_max_digits; | 167 | 136 | } |
function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE4EEEvEEEEbRKT_ENKUlSI_E_clINSB_INSC_ILSD_6EEESE_EEEEbSI_ Line | Count | Source | 114 | 100 | return false; | 115 | 100 | } | 116 | 100 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | | IsDatelikeV2Types<ToDataType> || | 123 | | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | | return false; | 125 | | } | 126 | | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | | using Types2 = std::decay_t<decltype(types2)>; | 129 | | using FromDataType = typename Types2::LeftType; | 130 | | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | | return false; | 134 | | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | | using FromFieldType = typename FromDataType::FieldType; | 137 | | using ToFieldType = typename ToDataType::FieldType; | 138 | | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | | | 141 | | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | | from_precision = | 145 | | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | | | 149 | | UInt32 to_max_digits = 0; | 150 | | UInt32 to_precision = 0; | 151 | | UInt32 to_scale = 0; | 152 | | | 153 | | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | | const auto* to_decimal_type = | 157 | | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | | ToDataType::check_type_precision(to_precision); | 160 | | | 161 | | to_scale = to_decimal_type->get_scale(); | 162 | | ToDataType::check_type_scale(to_scale); | 163 | | } | 164 | | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 100 | to_precision = to_max_digits; | 167 | 100 | } |
function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE4EEEvEEEEbRKT_ENKUlSI_E_clINSB_INSC_ILSD_7EEESE_EEEEbSI_ Line | Count | Source | 114 | 15 | return false; | 115 | 15 | } | 116 | 15 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | | IsDatelikeV2Types<ToDataType> || | 123 | | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | | return false; | 125 | | } | 126 | | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | | using Types2 = std::decay_t<decltype(types2)>; | 129 | | using FromDataType = typename Types2::LeftType; | 130 | | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | | return false; | 134 | | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | | using FromFieldType = typename FromDataType::FieldType; | 137 | | using ToFieldType = typename ToDataType::FieldType; | 138 | | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | | | 141 | | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | | from_precision = | 145 | | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | | | 149 | | UInt32 to_max_digits = 0; | 150 | | UInt32 to_precision = 0; | 151 | | UInt32 to_scale = 0; | 152 | | | 153 | | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | | const auto* to_decimal_type = | 157 | | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | | ToDataType::check_type_precision(to_precision); | 160 | | | 161 | | to_scale = to_decimal_type->get_scale(); | 162 | | ToDataType::check_type_scale(to_scale); | 163 | | } | 164 | | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 15 | to_precision = to_max_digits; | 167 | 15 | } |
function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE4EEEvEEEEbRKT_ENKUlSI_E_clINSB_INSC_ILSD_8EEESE_EEEEbSI_ Line | Count | Source | 114 | 21 | return false; | 115 | 21 | } | 116 | 21 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | | IsDatelikeV2Types<ToDataType> || | 123 | | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | | return false; | 125 | | } | 126 | | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | | using Types2 = std::decay_t<decltype(types2)>; | 129 | | using FromDataType = typename Types2::LeftType; | 130 | | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | | return false; | 134 | | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | | using FromFieldType = typename FromDataType::FieldType; | 137 | | using ToFieldType = typename ToDataType::FieldType; | 138 | | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | | | 141 | | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | | from_precision = | 145 | | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | | | 149 | | UInt32 to_max_digits = 0; | 150 | | UInt32 to_precision = 0; | 151 | | UInt32 to_scale = 0; | 152 | | | 153 | | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | | const auto* to_decimal_type = | 157 | | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | | ToDataType::check_type_precision(to_precision); | 160 | | | 161 | | to_scale = to_decimal_type->get_scale(); | 162 | | ToDataType::check_type_scale(to_scale); | 163 | | } | 164 | | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 21 | to_precision = to_max_digits; | 167 | 21 | } |
function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE4EEEvEEEEbRKT_ENKUlSI_E_clINSB_INSC_ILSD_9EEESE_EEEEbSI_ Line | Count | Source | 114 | 25 | return false; | 115 | 25 | } | 116 | 25 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | | IsDatelikeV2Types<ToDataType> || | 123 | | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | | return false; | 125 | | } | 126 | | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | | using Types2 = std::decay_t<decltype(types2)>; | 129 | | using FromDataType = typename Types2::LeftType; | 130 | | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | | return false; | 134 | | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | | using FromFieldType = typename FromDataType::FieldType; | 137 | | using ToFieldType = typename ToDataType::FieldType; | 138 | | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | | | 141 | | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | | from_precision = | 145 | | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | | | 149 | | UInt32 to_max_digits = 0; | 150 | | UInt32 to_precision = 0; | 151 | | UInt32 to_scale = 0; | 152 | | | 153 | | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | | const auto* to_decimal_type = | 157 | | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | | ToDataType::check_type_precision(to_precision); | 160 | | | 161 | | to_scale = to_decimal_type->get_scale(); | 162 | | ToDataType::check_type_scale(to_scale); | 163 | | } | 164 | | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 25 | to_precision = to_max_digits; | 167 | 25 | } |
function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE4EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_15DataTypeDecimalILSD_28EEESE_EEEEbSI_ Line | Count | Source | 114 | 23 | return false; | 115 | 23 | } | 116 | 23 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | 23 | IsDatelikeV2Types<ToDataType> || | 123 | 23 | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | 23 | return false; | 125 | 23 | } | 126 | 23 | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | 23 | using Types2 = std::decay_t<decltype(types2)>; | 129 | 23 | using FromDataType = typename Types2::LeftType; | 130 | 23 | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | 23 | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | 23 | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | 23 | return false; | 134 | 23 | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | 23 | using FromFieldType = typename FromDataType::FieldType; | 137 | 23 | using ToFieldType = typename ToDataType::FieldType; | 138 | 23 | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | | | 141 | | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | | from_precision = | 145 | | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | | | 149 | | UInt32 to_max_digits = 0; | 150 | | UInt32 to_precision = 0; | 151 | 23 | UInt32 to_scale = 0; | 152 | 23 | | 153 | 23 | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | 23 | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | 23 | const auto* to_decimal_type = | 157 | 23 | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | 23 | ToDataType::check_type_precision(to_precision); | 160 | 23 |
| 161 | 0 | to_scale = to_decimal_type->get_scale(); | 162 | 0 | ToDataType::check_type_scale(to_scale); | 163 | 0 | } | 164 | 23 | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | 23 | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 0 | to_precision = to_max_digits; | 167 | 23 | } |
function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE4EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_15DataTypeDecimalILSD_29EEESE_EEEEbSI_ Line | Count | Source | 114 | 25 | return false; | 115 | 25 | } | 116 | 25 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | 25 | IsDatelikeV2Types<ToDataType> || | 123 | 25 | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | 25 | return false; | 125 | 25 | } | 126 | 25 | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | 25 | using Types2 = std::decay_t<decltype(types2)>; | 129 | 25 | using FromDataType = typename Types2::LeftType; | 130 | 25 | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | 25 | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | 25 | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | 25 | return false; | 134 | 25 | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | 25 | using FromFieldType = typename FromDataType::FieldType; | 137 | 25 | using ToFieldType = typename ToDataType::FieldType; | 138 | 25 | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | | | 141 | | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | | from_precision = | 145 | | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | | | 149 | | UInt32 to_max_digits = 0; | 150 | | UInt32 to_precision = 0; | 151 | 25 | UInt32 to_scale = 0; | 152 | 25 | | 153 | 25 | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | 25 | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | 25 | const auto* to_decimal_type = | 157 | 25 | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | 25 | ToDataType::check_type_precision(to_precision); | 160 | 25 |
| 161 | 0 | to_scale = to_decimal_type->get_scale(); | 162 | 0 | ToDataType::check_type_scale(to_scale); | 163 | 0 | } | 164 | 25 | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | 25 | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 0 | to_precision = to_max_digits; | 167 | 25 | } |
function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE4EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_15DataTypeDecimalILSD_20EEESE_EEEEbSI_ Line | Count | Source | 114 | 8 | return false; | 115 | 8 | } | 116 | 8 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | 8 | IsDatelikeV2Types<ToDataType> || | 123 | 8 | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | 8 | return false; | 125 | 8 | } | 126 | 8 | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | 8 | using Types2 = std::decay_t<decltype(types2)>; | 129 | 8 | using FromDataType = typename Types2::LeftType; | 130 | 8 | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | 8 | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | 8 | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | 8 | return false; | 134 | 8 | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | 8 | using FromFieldType = typename FromDataType::FieldType; | 137 | 8 | using ToFieldType = typename ToDataType::FieldType; | 138 | 8 | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | | | 141 | | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | | from_precision = | 145 | | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | | | 149 | | UInt32 to_max_digits = 0; | 150 | | UInt32 to_precision = 0; | 151 | 8 | UInt32 to_scale = 0; | 152 | 8 | | 153 | 8 | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | 8 | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | 8 | const auto* to_decimal_type = | 157 | 8 | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | 8 | ToDataType::check_type_precision(to_precision); | 160 | 8 |
| 161 | 0 | to_scale = to_decimal_type->get_scale(); | 162 | 0 | ToDataType::check_type_scale(to_scale); | 163 | 0 | } | 164 | 8 | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | 8 | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 0 | to_precision = to_max_digits; | 167 | 8 | } |
function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE4EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_15DataTypeDecimalILSD_30EEESE_EEEEbSI_ Line | Count | Source | 114 | 25 | return false; | 115 | 25 | } | 116 | 25 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | 25 | IsDatelikeV2Types<ToDataType> || | 123 | 25 | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | 25 | return false; | 125 | 25 | } | 126 | 25 | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | 25 | using Types2 = std::decay_t<decltype(types2)>; | 129 | 25 | using FromDataType = typename Types2::LeftType; | 130 | 25 | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | 25 | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | 25 | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | 25 | return false; | 134 | 25 | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | 25 | using FromFieldType = typename FromDataType::FieldType; | 137 | 25 | using ToFieldType = typename ToDataType::FieldType; | 138 | 25 | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | | | 141 | | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | | from_precision = | 145 | | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | | | 149 | | UInt32 to_max_digits = 0; | 150 | | UInt32 to_precision = 0; | 151 | 25 | UInt32 to_scale = 0; | 152 | 25 | | 153 | 25 | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | 25 | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | 25 | const auto* to_decimal_type = | 157 | 25 | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | 25 | ToDataType::check_type_precision(to_precision); | 160 | 25 |
| 161 | 0 | to_scale = to_decimal_type->get_scale(); | 162 | 0 | ToDataType::check_type_scale(to_scale); | 163 | 0 | } | 164 | 25 | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | 25 | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 0 | to_precision = to_max_digits; | 167 | 25 | } |
function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE4EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_15DataTypeDecimalILSD_35EEESE_EEEEbSI_ Line | Count | Source | 114 | 25 | return false; | 115 | 25 | } | 116 | 25 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | 25 | IsDatelikeV2Types<ToDataType> || | 123 | 25 | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | 25 | return false; | 125 | 25 | } | 126 | 25 | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | 25 | using Types2 = std::decay_t<decltype(types2)>; | 129 | 25 | using FromDataType = typename Types2::LeftType; | 130 | 25 | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | 25 | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | 25 | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | 25 | return false; | 134 | 25 | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | 25 | using FromFieldType = typename FromDataType::FieldType; | 137 | 25 | using ToFieldType = typename ToDataType::FieldType; | 138 | 25 | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | | | 141 | | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | | from_precision = | 145 | | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | | | 149 | | UInt32 to_max_digits = 0; | 150 | | UInt32 to_precision = 0; | 151 | 25 | UInt32 to_scale = 0; | 152 | 25 | | 153 | 25 | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | 25 | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | 25 | const auto* to_decimal_type = | 157 | 25 | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | 25 | ToDataType::check_type_precision(to_precision); | 160 | 25 |
| 161 | 0 | to_scale = to_decimal_type->get_scale(); | 162 | 0 | ToDataType::check_type_scale(to_scale); | 163 | 0 | } | 164 | 25 | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | 25 | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 0 | to_precision = to_max_digits; | 167 | 25 | } |
Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE4EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_12DataTypeDateESE_EEEEbSI_ function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE4EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_14DataTypeDateV2ESE_EEEEbSI_ Line | Count | Source | 114 | 72 | return false; | 115 | 72 | } | 116 | 72 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | | IsDatelikeV2Types<ToDataType> || | 123 | | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | | return false; | 125 | | } | 126 | | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | | using Types2 = std::decay_t<decltype(types2)>; | 129 | | using FromDataType = typename Types2::LeftType; | 130 | | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | | return false; | 134 | | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | | using FromFieldType = typename FromDataType::FieldType; | 137 | | using ToFieldType = typename ToDataType::FieldType; | 138 | | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | | | 141 | | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | | from_precision = | 145 | | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | | | 149 | | UInt32 to_max_digits = 0; | 150 | | UInt32 to_precision = 0; | 151 | | UInt32 to_scale = 0; | 152 | | | 153 | | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | | const auto* to_decimal_type = | 157 | | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | | ToDataType::check_type_precision(to_precision); | 160 | | | 161 | | to_scale = to_decimal_type->get_scale(); | 162 | | ToDataType::check_type_scale(to_scale); | 163 | | } | 164 | | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 72 | to_precision = to_max_digits; | 167 | 72 | } |
function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE4EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_18DataTypeDateTimeV2ESE_EEEEbSI_ Line | Count | Source | 114 | 24 | return false; | 115 | 24 | } | 116 | 24 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | | IsDatelikeV2Types<ToDataType> || | 123 | | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | | return false; | 125 | | } | 126 | | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | | using Types2 = std::decay_t<decltype(types2)>; | 129 | | using FromDataType = typename Types2::LeftType; | 130 | | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | | return false; | 134 | | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | | using FromFieldType = typename FromDataType::FieldType; | 137 | | using ToFieldType = typename ToDataType::FieldType; | 138 | | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | | | 141 | | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | | from_precision = | 145 | | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | | | 149 | | UInt32 to_max_digits = 0; | 150 | | UInt32 to_precision = 0; | 151 | | UInt32 to_scale = 0; | 152 | | | 153 | | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | | const auto* to_decimal_type = | 157 | | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | | ToDataType::check_type_precision(to_precision); | 160 | | | 161 | | to_scale = to_decimal_type->get_scale(); | 162 | | ToDataType::check_type_scale(to_scale); | 163 | | } | 164 | | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 24 | to_precision = to_max_digits; | 167 | 24 | } |
Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE4EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_16DataTypeDateTimeESE_EEEEbSI_ function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE4EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_14DataTypeTimeV2ESE_EEEEbSI_ Line | Count | Source | 114 | 320 | return false; | 115 | 320 | } | 116 | 320 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | | IsDatelikeV2Types<ToDataType> || | 123 | | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | | return false; | 125 | | } | 126 | | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | | using Types2 = std::decay_t<decltype(types2)>; | 129 | | using FromDataType = typename Types2::LeftType; | 130 | | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | | return false; | 134 | | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | | using FromFieldType = typename FromDataType::FieldType; | 137 | | using ToFieldType = typename ToDataType::FieldType; | 138 | | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | | | 141 | | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | | from_precision = | 145 | | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | | | 149 | | UInt32 to_max_digits = 0; | 150 | | UInt32 to_precision = 0; | 151 | | UInt32 to_scale = 0; | 152 | | | 153 | | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | | const auto* to_decimal_type = | 157 | | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | | ToDataType::check_type_precision(to_precision); | 160 | | | 161 | | to_scale = to_decimal_type->get_scale(); | 162 | | ToDataType::check_type_scale(to_scale); | 163 | | } | 164 | | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 320 | to_precision = to_max_digits; | 167 | 320 | } |
Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE4EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_19DataTypeTimeStampTzESE_EEEEbSI_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE4EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_12DataTypeIPv4ESE_EEEEbSI_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE4EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_12DataTypeIPv6ESE_EEEEbSI_ function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE4EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_14DataTypeStringESE_EEEEbSI_ Line | Count | Source | 114 | 2.14k | return false; | 115 | 2.14k | } | 116 | 2.14k | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | 2.14k | using ToDataType = typename Types::LeftType; | 120 | 2.14k | | 121 | 2.14k | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | | IsDatelikeV2Types<ToDataType> || | 123 | | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | | return false; | 125 | | } | 126 | | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | | using Types2 = std::decay_t<decltype(types2)>; | 129 | | using FromDataType = typename Types2::LeftType; | 130 | | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | | return false; | 134 | | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | | using FromFieldType = typename FromDataType::FieldType; | 137 | | using ToFieldType = typename ToDataType::FieldType; | 138 | | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | | | 141 | | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | | from_precision = | 145 | | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | | | 149 | | UInt32 to_max_digits = 0; | 150 | | UInt32 to_precision = 0; | 151 | | UInt32 to_scale = 0; | 152 | | | 153 | | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | | const auto* to_decimal_type = | 157 | | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | | ToDataType::check_type_precision(to_precision); | 160 | | | 161 | | to_scale = to_decimal_type->get_scale(); | 162 | | ToDataType::check_type_scale(to_scale); | 163 | | } | 164 | | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 2.14k | to_precision = to_max_digits; | 167 | 2.14k | } |
function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE5EEEvEEEEbRKT_ENKUlSI_E_clINSB_INSC_ILSD_2EEESE_EEEEbSI_ Line | Count | Source | 114 | 44 | return false; | 115 | 44 | } | 116 | 44 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | | IsDatelikeV2Types<ToDataType> || | 123 | | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | | return false; | 125 | | } | 126 | | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | | using Types2 = std::decay_t<decltype(types2)>; | 129 | | using FromDataType = typename Types2::LeftType; | 130 | | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | | return false; | 134 | | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | | using FromFieldType = typename FromDataType::FieldType; | 137 | | using ToFieldType = typename ToDataType::FieldType; | 138 | | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | | | 141 | | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | | from_precision = | 145 | | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | | | 149 | | UInt32 to_max_digits = 0; | 150 | | UInt32 to_precision = 0; | 151 | | UInt32 to_scale = 0; | 152 | | | 153 | | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | | const auto* to_decimal_type = | 157 | | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | | ToDataType::check_type_precision(to_precision); | 160 | | | 161 | | to_scale = to_decimal_type->get_scale(); | 162 | | ToDataType::check_type_scale(to_scale); | 163 | | } | 164 | | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 44 | to_precision = to_max_digits; | 167 | 44 | } |
function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE5EEEvEEEEbRKT_ENKUlSI_E_clINSB_INSC_ILSD_3EEESE_EEEEbSI_ Line | Count | Source | 114 | 1.54k | return false; | 115 | 1.54k | } | 116 | 1.54k | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | | IsDatelikeV2Types<ToDataType> || | 123 | | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | | return false; | 125 | | } | 126 | | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | | using Types2 = std::decay_t<decltype(types2)>; | 129 | | using FromDataType = typename Types2::LeftType; | 130 | | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | | return false; | 134 | | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | | using FromFieldType = typename FromDataType::FieldType; | 137 | | using ToFieldType = typename ToDataType::FieldType; | 138 | | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | | | 141 | | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | | from_precision = | 145 | | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | | | 149 | | UInt32 to_max_digits = 0; | 150 | | UInt32 to_precision = 0; | 151 | | UInt32 to_scale = 0; | 152 | | | 153 | | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | | const auto* to_decimal_type = | 157 | | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | | ToDataType::check_type_precision(to_precision); | 160 | | | 161 | | to_scale = to_decimal_type->get_scale(); | 162 | | ToDataType::check_type_scale(to_scale); | 163 | | } | 164 | | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 1.54k | to_precision = to_max_digits; | 167 | 1.54k | } |
function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE5EEEvEEEEbRKT_ENKUlSI_E_clINSB_INSC_ILSD_4EEESE_EEEEbSI_ Line | Count | Source | 114 | 391 | return false; | 115 | 391 | } | 116 | 391 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | | IsDatelikeV2Types<ToDataType> || | 123 | | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | | return false; | 125 | | } | 126 | | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | | using Types2 = std::decay_t<decltype(types2)>; | 129 | | using FromDataType = typename Types2::LeftType; | 130 | | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | | return false; | 134 | | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | | using FromFieldType = typename FromDataType::FieldType; | 137 | | using ToFieldType = typename ToDataType::FieldType; | 138 | | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | | | 141 | | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | | from_precision = | 145 | | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | | | 149 | | UInt32 to_max_digits = 0; | 150 | | UInt32 to_precision = 0; | 151 | | UInt32 to_scale = 0; | 152 | | | 153 | | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | | const auto* to_decimal_type = | 157 | | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | | ToDataType::check_type_precision(to_precision); | 160 | | | 161 | | to_scale = to_decimal_type->get_scale(); | 162 | | ToDataType::check_type_scale(to_scale); | 163 | | } | 164 | | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 391 | to_precision = to_max_digits; | 167 | 391 | } |
Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE5EEEvEEEEbRKT_ENKUlSI_E_clINSB_ISE_SE_EEEEbSI_ function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE5EEEvEEEEbRKT_ENKUlSI_E_clINSB_INSC_ILSD_6EEESE_EEEEbSI_ Line | Count | Source | 114 | 1.54k | return false; | 115 | 1.54k | } | 116 | 1.54k | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | | IsDatelikeV2Types<ToDataType> || | 123 | | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | | return false; | 125 | | } | 126 | | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | | using Types2 = std::decay_t<decltype(types2)>; | 129 | | using FromDataType = typename Types2::LeftType; | 130 | | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | | return false; | 134 | | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | | using FromFieldType = typename FromDataType::FieldType; | 137 | | using ToFieldType = typename ToDataType::FieldType; | 138 | | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | | | 141 | | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | | from_precision = | 145 | | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | | | 149 | | UInt32 to_max_digits = 0; | 150 | | UInt32 to_precision = 0; | 151 | | UInt32 to_scale = 0; | 152 | | | 153 | | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | | const auto* to_decimal_type = | 157 | | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | | ToDataType::check_type_precision(to_precision); | 160 | | | 161 | | to_scale = to_decimal_type->get_scale(); | 162 | | ToDataType::check_type_scale(to_scale); | 163 | | } | 164 | | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 1.54k | to_precision = to_max_digits; | 167 | 1.54k | } |
function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE5EEEvEEEEbRKT_ENKUlSI_E_clINSB_INSC_ILSD_7EEESE_EEEEbSI_ Line | Count | Source | 114 | 13 | return false; | 115 | 13 | } | 116 | 13 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | | IsDatelikeV2Types<ToDataType> || | 123 | | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | | return false; | 125 | | } | 126 | | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | | using Types2 = std::decay_t<decltype(types2)>; | 129 | | using FromDataType = typename Types2::LeftType; | 130 | | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | | return false; | 134 | | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | | using FromFieldType = typename FromDataType::FieldType; | 137 | | using ToFieldType = typename ToDataType::FieldType; | 138 | | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | | | 141 | | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | | from_precision = | 145 | | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | | | 149 | | UInt32 to_max_digits = 0; | 150 | | UInt32 to_precision = 0; | 151 | | UInt32 to_scale = 0; | 152 | | | 153 | | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | | const auto* to_decimal_type = | 157 | | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | | ToDataType::check_type_precision(to_precision); | 160 | | | 161 | | to_scale = to_decimal_type->get_scale(); | 162 | | ToDataType::check_type_scale(to_scale); | 163 | | } | 164 | | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 13 | to_precision = to_max_digits; | 167 | 13 | } |
function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE5EEEvEEEEbRKT_ENKUlSI_E_clINSB_INSC_ILSD_8EEESE_EEEEbSI_ Line | Count | Source | 114 | 20 | return false; | 115 | 20 | } | 116 | 20 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | | IsDatelikeV2Types<ToDataType> || | 123 | | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | | return false; | 125 | | } | 126 | | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | | using Types2 = std::decay_t<decltype(types2)>; | 129 | | using FromDataType = typename Types2::LeftType; | 130 | | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | | return false; | 134 | | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | | using FromFieldType = typename FromDataType::FieldType; | 137 | | using ToFieldType = typename ToDataType::FieldType; | 138 | | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | | | 141 | | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | | from_precision = | 145 | | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | | | 149 | | UInt32 to_max_digits = 0; | 150 | | UInt32 to_precision = 0; | 151 | | UInt32 to_scale = 0; | 152 | | | 153 | | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | | const auto* to_decimal_type = | 157 | | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | | ToDataType::check_type_precision(to_precision); | 160 | | | 161 | | to_scale = to_decimal_type->get_scale(); | 162 | | ToDataType::check_type_scale(to_scale); | 163 | | } | 164 | | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 20 | to_precision = to_max_digits; | 167 | 20 | } |
function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE5EEEvEEEEbRKT_ENKUlSI_E_clINSB_INSC_ILSD_9EEESE_EEEEbSI_ Line | Count | Source | 114 | 96 | return false; | 115 | 96 | } | 116 | 96 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | | IsDatelikeV2Types<ToDataType> || | 123 | | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | | return false; | 125 | | } | 126 | | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | | using Types2 = std::decay_t<decltype(types2)>; | 129 | | using FromDataType = typename Types2::LeftType; | 130 | | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | | return false; | 134 | | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | | using FromFieldType = typename FromDataType::FieldType; | 137 | | using ToFieldType = typename ToDataType::FieldType; | 138 | | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | | | 141 | | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | | from_precision = | 145 | | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | | | 149 | | UInt32 to_max_digits = 0; | 150 | | UInt32 to_precision = 0; | 151 | | UInt32 to_scale = 0; | 152 | | | 153 | | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | | const auto* to_decimal_type = | 157 | | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | | ToDataType::check_type_precision(to_precision); | 160 | | | 161 | | to_scale = to_decimal_type->get_scale(); | 162 | | ToDataType::check_type_scale(to_scale); | 163 | | } | 164 | | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 96 | to_precision = to_max_digits; | 167 | 96 | } |
function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE5EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_15DataTypeDecimalILSD_28EEESE_EEEEbSI_ Line | Count | Source | 114 | 21 | return false; | 115 | 21 | } | 116 | 21 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | 21 | IsDatelikeV2Types<ToDataType> || | 123 | 21 | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | 21 | return false; | 125 | 21 | } | 126 | 21 | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | 21 | using Types2 = std::decay_t<decltype(types2)>; | 129 | 21 | using FromDataType = typename Types2::LeftType; | 130 | 21 | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | 21 | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | 21 | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | 21 | return false; | 134 | 21 | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | 21 | using FromFieldType = typename FromDataType::FieldType; | 137 | 21 | using ToFieldType = typename ToDataType::FieldType; | 138 | 21 | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | | | 141 | | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | | from_precision = | 145 | | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | | | 149 | | UInt32 to_max_digits = 0; | 150 | | UInt32 to_precision = 0; | 151 | 21 | UInt32 to_scale = 0; | 152 | 21 | | 153 | 21 | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | 21 | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | 21 | const auto* to_decimal_type = | 157 | 21 | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | 21 | ToDataType::check_type_precision(to_precision); | 160 | 21 |
| 161 | 0 | to_scale = to_decimal_type->get_scale(); | 162 | 0 | ToDataType::check_type_scale(to_scale); | 163 | 0 | } | 164 | 21 | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | 21 | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 0 | to_precision = to_max_digits; | 167 | 21 | } |
function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE5EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_15DataTypeDecimalILSD_29EEESE_EEEEbSI_ Line | Count | Source | 114 | 37 | return false; | 115 | 37 | } | 116 | 37 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | 37 | IsDatelikeV2Types<ToDataType> || | 123 | 37 | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | 37 | return false; | 125 | 37 | } | 126 | 37 | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | 37 | using Types2 = std::decay_t<decltype(types2)>; | 129 | 37 | using FromDataType = typename Types2::LeftType; | 130 | 37 | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | 37 | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | 37 | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | 37 | return false; | 134 | 37 | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | 37 | using FromFieldType = typename FromDataType::FieldType; | 137 | 37 | using ToFieldType = typename ToDataType::FieldType; | 138 | 37 | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | | | 141 | | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | | from_precision = | 145 | | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | | | 149 | | UInt32 to_max_digits = 0; | 150 | | UInt32 to_precision = 0; | 151 | 37 | UInt32 to_scale = 0; | 152 | 37 | | 153 | 37 | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | 37 | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | 37 | const auto* to_decimal_type = | 157 | 37 | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | 37 | ToDataType::check_type_precision(to_precision); | 160 | 37 |
| 161 | 0 | to_scale = to_decimal_type->get_scale(); | 162 | 0 | ToDataType::check_type_scale(to_scale); | 163 | 0 | } | 164 | 37 | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | 37 | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 0 | to_precision = to_max_digits; | 167 | 37 | } |
function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE5EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_15DataTypeDecimalILSD_20EEESE_EEEEbSI_ Line | Count | Source | 114 | 8 | return false; | 115 | 8 | } | 116 | 8 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | 8 | IsDatelikeV2Types<ToDataType> || | 123 | 8 | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | 8 | return false; | 125 | 8 | } | 126 | 8 | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | 8 | using Types2 = std::decay_t<decltype(types2)>; | 129 | 8 | using FromDataType = typename Types2::LeftType; | 130 | 8 | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | 8 | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | 8 | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | 8 | return false; | 134 | 8 | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | 8 | using FromFieldType = typename FromDataType::FieldType; | 137 | 8 | using ToFieldType = typename ToDataType::FieldType; | 138 | 8 | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | | | 141 | | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | | from_precision = | 145 | | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | | | 149 | | UInt32 to_max_digits = 0; | 150 | | UInt32 to_precision = 0; | 151 | 8 | UInt32 to_scale = 0; | 152 | 8 | | 153 | 8 | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | 8 | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | 8 | const auto* to_decimal_type = | 157 | 8 | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | 8 | ToDataType::check_type_precision(to_precision); | 160 | 8 |
| 161 | 0 | to_scale = to_decimal_type->get_scale(); | 162 | 0 | ToDataType::check_type_scale(to_scale); | 163 | 0 | } | 164 | 8 | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | 8 | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 0 | to_precision = to_max_digits; | 167 | 8 | } |
function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE5EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_15DataTypeDecimalILSD_30EEESE_EEEEbSI_ Line | Count | Source | 114 | 138 | return false; | 115 | 138 | } | 116 | 138 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | 138 | IsDatelikeV2Types<ToDataType> || | 123 | 138 | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | 138 | return false; | 125 | 138 | } | 126 | 138 | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | 138 | using Types2 = std::decay_t<decltype(types2)>; | 129 | 138 | using FromDataType = typename Types2::LeftType; | 130 | 138 | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | 138 | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | 138 | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | 138 | return false; | 134 | 138 | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | 138 | using FromFieldType = typename FromDataType::FieldType; | 137 | 138 | using ToFieldType = typename ToDataType::FieldType; | 138 | 138 | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | | | 141 | | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | | from_precision = | 145 | | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | | | 149 | | UInt32 to_max_digits = 0; | 150 | | UInt32 to_precision = 0; | 151 | 138 | UInt32 to_scale = 0; | 152 | 138 | | 153 | 138 | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | 138 | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | 138 | const auto* to_decimal_type = | 157 | 138 | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | 138 | ToDataType::check_type_precision(to_precision); | 160 | 138 |
| 161 | 0 | to_scale = to_decimal_type->get_scale(); | 162 | 0 | ToDataType::check_type_scale(to_scale); | 163 | 0 | } | 164 | 138 | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | 138 | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 0 | to_precision = to_max_digits; | 167 | 138 | } |
function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE5EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_15DataTypeDecimalILSD_35EEESE_EEEEbSI_ Line | Count | Source | 114 | 21 | return false; | 115 | 21 | } | 116 | 21 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | 21 | IsDatelikeV2Types<ToDataType> || | 123 | 21 | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | 21 | return false; | 125 | 21 | } | 126 | 21 | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | 21 | using Types2 = std::decay_t<decltype(types2)>; | 129 | 21 | using FromDataType = typename Types2::LeftType; | 130 | 21 | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | 21 | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | 21 | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | 21 | return false; | 134 | 21 | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | 21 | using FromFieldType = typename FromDataType::FieldType; | 137 | 21 | using ToFieldType = typename ToDataType::FieldType; | 138 | 21 | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | | | 141 | | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | | from_precision = | 145 | | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | | | 149 | | UInt32 to_max_digits = 0; | 150 | | UInt32 to_precision = 0; | 151 | 21 | UInt32 to_scale = 0; | 152 | 21 | | 153 | 21 | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | 21 | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | 21 | const auto* to_decimal_type = | 157 | 21 | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | 21 | ToDataType::check_type_precision(to_precision); | 160 | 21 |
| 161 | 0 | to_scale = to_decimal_type->get_scale(); | 162 | 0 | ToDataType::check_type_scale(to_scale); | 163 | 0 | } | 164 | 21 | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | 21 | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 0 | to_precision = to_max_digits; | 167 | 21 | } |
Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE5EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_12DataTypeDateESE_EEEEbSI_ function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE5EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_14DataTypeDateV2ESE_EEEEbSI_ Line | Count | Source | 114 | 16 | return false; | 115 | 16 | } | 116 | 16 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | | IsDatelikeV2Types<ToDataType> || | 123 | | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | | return false; | 125 | | } | 126 | | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | | using Types2 = std::decay_t<decltype(types2)>; | 129 | | using FromDataType = typename Types2::LeftType; | 130 | | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | | return false; | 134 | | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | | using FromFieldType = typename FromDataType::FieldType; | 137 | | using ToFieldType = typename ToDataType::FieldType; | 138 | | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | | | 141 | | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | | from_precision = | 145 | | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | | | 149 | | UInt32 to_max_digits = 0; | 150 | | UInt32 to_precision = 0; | 151 | | UInt32 to_scale = 0; | 152 | | | 153 | | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | | const auto* to_decimal_type = | 157 | | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | | ToDataType::check_type_precision(to_precision); | 160 | | | 161 | | to_scale = to_decimal_type->get_scale(); | 162 | | ToDataType::check_type_scale(to_scale); | 163 | | } | 164 | | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 16 | to_precision = to_max_digits; | 167 | 16 | } |
function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE5EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_18DataTypeDateTimeV2ESE_EEEEbSI_ Line | Count | Source | 114 | 24 | return false; | 115 | 24 | } | 116 | 24 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | | IsDatelikeV2Types<ToDataType> || | 123 | | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | | return false; | 125 | | } | 126 | | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | | using Types2 = std::decay_t<decltype(types2)>; | 129 | | using FromDataType = typename Types2::LeftType; | 130 | | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | | return false; | 134 | | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | | using FromFieldType = typename FromDataType::FieldType; | 137 | | using ToFieldType = typename ToDataType::FieldType; | 138 | | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | | | 141 | | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | | from_precision = | 145 | | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | | | 149 | | UInt32 to_max_digits = 0; | 150 | | UInt32 to_precision = 0; | 151 | | UInt32 to_scale = 0; | 152 | | | 153 | | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | | const auto* to_decimal_type = | 157 | | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | | ToDataType::check_type_precision(to_precision); | 160 | | | 161 | | to_scale = to_decimal_type->get_scale(); | 162 | | ToDataType::check_type_scale(to_scale); | 163 | | } | 164 | | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 24 | to_precision = to_max_digits; | 167 | 24 | } |
Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE5EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_16DataTypeDateTimeESE_EEEEbSI_ function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE5EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_14DataTypeTimeV2ESE_EEEEbSI_ Line | Count | Source | 114 | 276 | return false; | 115 | 276 | } | 116 | 276 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | | IsDatelikeV2Types<ToDataType> || | 123 | | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | | return false; | 125 | | } | 126 | | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | | using Types2 = std::decay_t<decltype(types2)>; | 129 | | using FromDataType = typename Types2::LeftType; | 130 | | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | | return false; | 134 | | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | | using FromFieldType = typename FromDataType::FieldType; | 137 | | using ToFieldType = typename ToDataType::FieldType; | 138 | | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | | | 141 | | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | | from_precision = | 145 | | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | | | 149 | | UInt32 to_max_digits = 0; | 150 | | UInt32 to_precision = 0; | 151 | | UInt32 to_scale = 0; | 152 | | | 153 | | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | | const auto* to_decimal_type = | 157 | | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | | ToDataType::check_type_precision(to_precision); | 160 | | | 161 | | to_scale = to_decimal_type->get_scale(); | 162 | | ToDataType::check_type_scale(to_scale); | 163 | | } | 164 | | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 276 | to_precision = to_max_digits; | 167 | 276 | } |
Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE5EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_19DataTypeTimeStampTzESE_EEEEbSI_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE5EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_12DataTypeIPv4ESE_EEEEbSI_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE5EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_12DataTypeIPv6ESE_EEEEbSI_ function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE5EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_14DataTypeStringESE_EEEEbSI_ Line | Count | Source | 114 | 17.3k | return false; | 115 | 17.3k | } | 116 | 17.3k | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | 17.3k | using ToDataType = typename Types::LeftType; | 120 | 17.3k | | 121 | 17.3k | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | | IsDatelikeV2Types<ToDataType> || | 123 | | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | | return false; | 125 | | } | 126 | | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | | using Types2 = std::decay_t<decltype(types2)>; | 129 | | using FromDataType = typename Types2::LeftType; | 130 | | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | | return false; | 134 | | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | | using FromFieldType = typename FromDataType::FieldType; | 137 | | using ToFieldType = typename ToDataType::FieldType; | 138 | | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | | | 141 | | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | | from_precision = | 145 | | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | | | 149 | | UInt32 to_max_digits = 0; | 150 | | UInt32 to_precision = 0; | 151 | | UInt32 to_scale = 0; | 152 | | | 153 | | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | | const auto* to_decimal_type = | 157 | | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | | ToDataType::check_type_precision(to_precision); | 160 | | | 161 | | to_scale = to_decimal_type->get_scale(); | 162 | | ToDataType::check_type_scale(to_scale); | 163 | | } | 164 | | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 17.3k | to_precision = to_max_digits; | 167 | 17.3k | } |
function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE6EEEvEEEEbRKT_ENKUlSI_E_clINSB_INSC_ILSD_2EEESE_EEEEbSI_ Line | Count | Source | 114 | 333 | return false; | 115 | 333 | } | 116 | 333 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | | IsDatelikeV2Types<ToDataType> || | 123 | | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | | return false; | 125 | | } | 126 | | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | | using Types2 = std::decay_t<decltype(types2)>; | 129 | | using FromDataType = typename Types2::LeftType; | 130 | | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | | return false; | 134 | | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | | using FromFieldType = typename FromDataType::FieldType; | 137 | | using ToFieldType = typename ToDataType::FieldType; | 138 | | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | | | 141 | | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | | from_precision = | 145 | | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | | | 149 | | UInt32 to_max_digits = 0; | 150 | | UInt32 to_precision = 0; | 151 | | UInt32 to_scale = 0; | 152 | | | 153 | | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | | const auto* to_decimal_type = | 157 | | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | | ToDataType::check_type_precision(to_precision); | 160 | | | 161 | | to_scale = to_decimal_type->get_scale(); | 162 | | ToDataType::check_type_scale(to_scale); | 163 | | } | 164 | | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 333 | to_precision = to_max_digits; | 167 | 333 | } |
function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE6EEEvEEEEbRKT_ENKUlSI_E_clINSB_INSC_ILSD_3EEESE_EEEEbSI_ Line | Count | Source | 114 | 1.00k | return false; | 115 | 1.00k | } | 116 | 1.00k | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | | IsDatelikeV2Types<ToDataType> || | 123 | | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | | return false; | 125 | | } | 126 | | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | | using Types2 = std::decay_t<decltype(types2)>; | 129 | | using FromDataType = typename Types2::LeftType; | 130 | | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | | return false; | 134 | | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | | using FromFieldType = typename FromDataType::FieldType; | 137 | | using ToFieldType = typename ToDataType::FieldType; | 138 | | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | | | 141 | | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | | from_precision = | 145 | | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | | | 149 | | UInt32 to_max_digits = 0; | 150 | | UInt32 to_precision = 0; | 151 | | UInt32 to_scale = 0; | 152 | | | 153 | | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | | const auto* to_decimal_type = | 157 | | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | | ToDataType::check_type_precision(to_precision); | 160 | | | 161 | | to_scale = to_decimal_type->get_scale(); | 162 | | ToDataType::check_type_scale(to_scale); | 163 | | } | 164 | | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 1.00k | to_precision = to_max_digits; | 167 | 1.00k | } |
function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE6EEEvEEEEbRKT_ENKUlSI_E_clINSB_INSC_ILSD_4EEESE_EEEEbSI_ Line | Count | Source | 114 | 665 | return false; | 115 | 665 | } | 116 | 665 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | | IsDatelikeV2Types<ToDataType> || | 123 | | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | | return false; | 125 | | } | 126 | | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | | using Types2 = std::decay_t<decltype(types2)>; | 129 | | using FromDataType = typename Types2::LeftType; | 130 | | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | | return false; | 134 | | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | | using FromFieldType = typename FromDataType::FieldType; | 137 | | using ToFieldType = typename ToDataType::FieldType; | 138 | | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | | | 141 | | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | | from_precision = | 145 | | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | | | 149 | | UInt32 to_max_digits = 0; | 150 | | UInt32 to_precision = 0; | 151 | | UInt32 to_scale = 0; | 152 | | | 153 | | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | | const auto* to_decimal_type = | 157 | | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | | ToDataType::check_type_precision(to_precision); | 160 | | | 161 | | to_scale = to_decimal_type->get_scale(); | 162 | | ToDataType::check_type_scale(to_scale); | 163 | | } | 164 | | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 665 | to_precision = to_max_digits; | 167 | 665 | } |
function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE6EEEvEEEEbRKT_ENKUlSI_E_clINSB_INSC_ILSD_5EEESE_EEEEbSI_ Line | Count | Source | 114 | 5.21k | return false; | 115 | 5.21k | } | 116 | 5.21k | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | | IsDatelikeV2Types<ToDataType> || | 123 | | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | | return false; | 125 | | } | 126 | | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | | using Types2 = std::decay_t<decltype(types2)>; | 129 | | using FromDataType = typename Types2::LeftType; | 130 | | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | | return false; | 134 | | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | | using FromFieldType = typename FromDataType::FieldType; | 137 | | using ToFieldType = typename ToDataType::FieldType; | 138 | | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | | | 141 | | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | | from_precision = | 145 | | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | | | 149 | | UInt32 to_max_digits = 0; | 150 | | UInt32 to_precision = 0; | 151 | | UInt32 to_scale = 0; | 152 | | | 153 | | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | | const auto* to_decimal_type = | 157 | | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | | ToDataType::check_type_precision(to_precision); | 160 | | | 161 | | to_scale = to_decimal_type->get_scale(); | 162 | | ToDataType::check_type_scale(to_scale); | 163 | | } | 164 | | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 5.21k | to_precision = to_max_digits; | 167 | 5.21k | } |
Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE6EEEvEEEEbRKT_ENKUlSI_E_clINSB_ISE_SE_EEEEbSI_ function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE6EEEvEEEEbRKT_ENKUlSI_E_clINSB_INSC_ILSD_7EEESE_EEEEbSI_ Line | Count | Source | 114 | 291 | return false; | 115 | 291 | } | 116 | 291 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | | IsDatelikeV2Types<ToDataType> || | 123 | | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | | return false; | 125 | | } | 126 | | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | | using Types2 = std::decay_t<decltype(types2)>; | 129 | | using FromDataType = typename Types2::LeftType; | 130 | | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | | return false; | 134 | | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | | using FromFieldType = typename FromDataType::FieldType; | 137 | | using ToFieldType = typename ToDataType::FieldType; | 138 | | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | | | 141 | | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | | from_precision = | 145 | | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | | | 149 | | UInt32 to_max_digits = 0; | 150 | | UInt32 to_precision = 0; | 151 | | UInt32 to_scale = 0; | 152 | | | 153 | | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | | const auto* to_decimal_type = | 157 | | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | | ToDataType::check_type_precision(to_precision); | 160 | | | 161 | | to_scale = to_decimal_type->get_scale(); | 162 | | ToDataType::check_type_scale(to_scale); | 163 | | } | 164 | | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 291 | to_precision = to_max_digits; | 167 | 291 | } |
function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE6EEEvEEEEbRKT_ENKUlSI_E_clINSB_INSC_ILSD_8EEESE_EEEEbSI_ Line | Count | Source | 114 | 630 | return false; | 115 | 630 | } | 116 | 630 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | | IsDatelikeV2Types<ToDataType> || | 123 | | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | | return false; | 125 | | } | 126 | | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | | using Types2 = std::decay_t<decltype(types2)>; | 129 | | using FromDataType = typename Types2::LeftType; | 130 | | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | | return false; | 134 | | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | | using FromFieldType = typename FromDataType::FieldType; | 137 | | using ToFieldType = typename ToDataType::FieldType; | 138 | | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | | | 141 | | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | | from_precision = | 145 | | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | | | 149 | | UInt32 to_max_digits = 0; | 150 | | UInt32 to_precision = 0; | 151 | | UInt32 to_scale = 0; | 152 | | | 153 | | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | | const auto* to_decimal_type = | 157 | | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | | ToDataType::check_type_precision(to_precision); | 160 | | | 161 | | to_scale = to_decimal_type->get_scale(); | 162 | | ToDataType::check_type_scale(to_scale); | 163 | | } | 164 | | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 630 | to_precision = to_max_digits; | 167 | 630 | } |
function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE6EEEvEEEEbRKT_ENKUlSI_E_clINSB_INSC_ILSD_9EEESE_EEEEbSI_ Line | Count | Source | 114 | 2.31k | return false; | 115 | 2.31k | } | 116 | 2.31k | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | | IsDatelikeV2Types<ToDataType> || | 123 | | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | | return false; | 125 | | } | 126 | | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | | using Types2 = std::decay_t<decltype(types2)>; | 129 | | using FromDataType = typename Types2::LeftType; | 130 | | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | | return false; | 134 | | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | | using FromFieldType = typename FromDataType::FieldType; | 137 | | using ToFieldType = typename ToDataType::FieldType; | 138 | | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | | | 141 | | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | | from_precision = | 145 | | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | | | 149 | | UInt32 to_max_digits = 0; | 150 | | UInt32 to_precision = 0; | 151 | | UInt32 to_scale = 0; | 152 | | | 153 | | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | | const auto* to_decimal_type = | 157 | | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | | ToDataType::check_type_precision(to_precision); | 160 | | | 161 | | to_scale = to_decimal_type->get_scale(); | 162 | | ToDataType::check_type_scale(to_scale); | 163 | | } | 164 | | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 2.31k | to_precision = to_max_digits; | 167 | 2.31k | } |
function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE6EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_15DataTypeDecimalILSD_28EEESE_EEEEbSI_ Line | Count | Source | 114 | 312 | return false; | 115 | 312 | } | 116 | 312 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | 312 | IsDatelikeV2Types<ToDataType> || | 123 | 312 | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | 312 | return false; | 125 | 312 | } | 126 | 312 | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | 312 | using Types2 = std::decay_t<decltype(types2)>; | 129 | 312 | using FromDataType = typename Types2::LeftType; | 130 | 312 | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | 312 | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | 312 | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | 312 | return false; | 134 | 312 | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | 312 | using FromFieldType = typename FromDataType::FieldType; | 137 | 312 | using ToFieldType = typename ToDataType::FieldType; | 138 | 312 | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | | | 141 | | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | | from_precision = | 145 | | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | | | 149 | | UInt32 to_max_digits = 0; | 150 | | UInt32 to_precision = 0; | 151 | 312 | UInt32 to_scale = 0; | 152 | 312 | | 153 | 312 | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | 312 | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | 312 | const auto* to_decimal_type = | 157 | 312 | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | 312 | ToDataType::check_type_precision(to_precision); | 160 | 312 |
| 161 | 0 | to_scale = to_decimal_type->get_scale(); | 162 | 0 | ToDataType::check_type_scale(to_scale); | 163 | 0 | } | 164 | 313 | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | 312 | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 0 | to_precision = to_max_digits; | 167 | 312 | } |
function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE6EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_15DataTypeDecimalILSD_29EEESE_EEEEbSI_ Line | Count | Source | 114 | 317 | return false; | 115 | 317 | } | 116 | 317 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | 317 | IsDatelikeV2Types<ToDataType> || | 123 | 317 | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | 317 | return false; | 125 | 317 | } | 126 | 317 | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | 317 | using Types2 = std::decay_t<decltype(types2)>; | 129 | 317 | using FromDataType = typename Types2::LeftType; | 130 | 317 | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | 317 | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | 317 | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | 317 | return false; | 134 | 317 | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | 317 | using FromFieldType = typename FromDataType::FieldType; | 137 | 317 | using ToFieldType = typename ToDataType::FieldType; | 138 | 317 | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | | | 141 | | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | | from_precision = | 145 | | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | | | 149 | | UInt32 to_max_digits = 0; | 150 | | UInt32 to_precision = 0; | 151 | 317 | UInt32 to_scale = 0; | 152 | 317 | | 153 | 317 | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | 317 | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | 317 | const auto* to_decimal_type = | 157 | 317 | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | 317 | ToDataType::check_type_precision(to_precision); | 160 | 317 |
| 161 | 0 | to_scale = to_decimal_type->get_scale(); | 162 | 0 | ToDataType::check_type_scale(to_scale); | 163 | 0 | } | 164 | 317 | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | 317 | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 0 | to_precision = to_max_digits; | 167 | 317 | } |
function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE6EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_15DataTypeDecimalILSD_20EEESE_EEEEbSI_ Line | Count | Source | 114 | 303 | return false; | 115 | 303 | } | 116 | 303 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | 303 | IsDatelikeV2Types<ToDataType> || | 123 | 303 | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | 303 | return false; | 125 | 303 | } | 126 | 303 | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | 303 | using Types2 = std::decay_t<decltype(types2)>; | 129 | 303 | using FromDataType = typename Types2::LeftType; | 130 | 303 | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | 303 | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | 303 | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | 303 | return false; | 134 | 303 | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | 303 | using FromFieldType = typename FromDataType::FieldType; | 137 | 303 | using ToFieldType = typename ToDataType::FieldType; | 138 | 303 | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | | | 141 | | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | | from_precision = | 145 | | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | | | 149 | | UInt32 to_max_digits = 0; | 150 | | UInt32 to_precision = 0; | 151 | 303 | UInt32 to_scale = 0; | 152 | 303 | | 153 | 303 | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | 303 | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | 303 | const auto* to_decimal_type = | 157 | 303 | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | 303 | ToDataType::check_type_precision(to_precision); | 160 | 303 |
| 161 | 0 | to_scale = to_decimal_type->get_scale(); | 162 | 0 | ToDataType::check_type_scale(to_scale); | 163 | 0 | } | 164 | 303 | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | 303 | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 0 | to_precision = to_max_digits; | 167 | 303 | } |
function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE6EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_15DataTypeDecimalILSD_30EEESE_EEEEbSI_ Line | Count | Source | 114 | 613 | return false; | 115 | 613 | } | 116 | 613 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | 613 | IsDatelikeV2Types<ToDataType> || | 123 | 613 | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | 613 | return false; | 125 | 613 | } | 126 | 613 | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | 613 | using Types2 = std::decay_t<decltype(types2)>; | 129 | 613 | using FromDataType = typename Types2::LeftType; | 130 | 613 | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | 613 | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | 613 | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | 613 | return false; | 134 | 613 | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | 613 | using FromFieldType = typename FromDataType::FieldType; | 137 | 613 | using ToFieldType = typename ToDataType::FieldType; | 138 | 613 | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | | | 141 | | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | | from_precision = | 145 | | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | | | 149 | | UInt32 to_max_digits = 0; | 150 | | UInt32 to_precision = 0; | 151 | 613 | UInt32 to_scale = 0; | 152 | 613 | | 153 | 613 | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | 613 | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | 613 | const auto* to_decimal_type = | 157 | 613 | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | 613 | ToDataType::check_type_precision(to_precision); | 160 | 613 |
| 161 | 0 | to_scale = to_decimal_type->get_scale(); | 162 | 0 | ToDataType::check_type_scale(to_scale); | 163 | 0 | } | 164 | 613 | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | 613 | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 0 | to_precision = to_max_digits; | 167 | 613 | } |
function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE6EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_15DataTypeDecimalILSD_35EEESE_EEEEbSI_ Line | Count | Source | 114 | 21 | return false; | 115 | 21 | } | 116 | 21 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | 21 | IsDatelikeV2Types<ToDataType> || | 123 | 21 | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | 21 | return false; | 125 | 21 | } | 126 | 21 | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | 21 | using Types2 = std::decay_t<decltype(types2)>; | 129 | 21 | using FromDataType = typename Types2::LeftType; | 130 | 21 | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | 21 | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | 21 | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | 21 | return false; | 134 | 21 | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | 21 | using FromFieldType = typename FromDataType::FieldType; | 137 | 21 | using ToFieldType = typename ToDataType::FieldType; | 138 | 21 | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | | | 141 | | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | | from_precision = | 145 | | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | | | 149 | | UInt32 to_max_digits = 0; | 150 | | UInt32 to_precision = 0; | 151 | 21 | UInt32 to_scale = 0; | 152 | 21 | | 153 | 21 | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | 21 | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | 21 | const auto* to_decimal_type = | 157 | 21 | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | 21 | ToDataType::check_type_precision(to_precision); | 160 | 21 |
| 161 | 0 | to_scale = to_decimal_type->get_scale(); | 162 | 0 | ToDataType::check_type_scale(to_scale); | 163 | 0 | } | 164 | 21 | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | 21 | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 0 | to_precision = to_max_digits; | 167 | 21 | } |
Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE6EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_12DataTypeDateESE_EEEEbSI_ function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE6EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_14DataTypeDateV2ESE_EEEEbSI_ Line | Count | Source | 114 | 1.25k | return false; | 115 | 1.25k | } | 116 | 1.25k | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | | IsDatelikeV2Types<ToDataType> || | 123 | | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | | return false; | 125 | | } | 126 | | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | | using Types2 = std::decay_t<decltype(types2)>; | 129 | | using FromDataType = typename Types2::LeftType; | 130 | | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | | return false; | 134 | | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | | using FromFieldType = typename FromDataType::FieldType; | 137 | | using ToFieldType = typename ToDataType::FieldType; | 138 | | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | | | 141 | | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | | from_precision = | 145 | | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | | | 149 | | UInt32 to_max_digits = 0; | 150 | | UInt32 to_precision = 0; | 151 | | UInt32 to_scale = 0; | 152 | | | 153 | | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | | const auto* to_decimal_type = | 157 | | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | | ToDataType::check_type_precision(to_precision); | 160 | | | 161 | | to_scale = to_decimal_type->get_scale(); | 162 | | ToDataType::check_type_scale(to_scale); | 163 | | } | 164 | | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 1.25k | to_precision = to_max_digits; | 167 | 1.25k | } |
function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE6EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_18DataTypeDateTimeV2ESE_EEEEbSI_ Line | Count | Source | 114 | 1.26k | return false; | 115 | 1.26k | } | 116 | 1.26k | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | | IsDatelikeV2Types<ToDataType> || | 123 | | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | | return false; | 125 | | } | 126 | | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | | using Types2 = std::decay_t<decltype(types2)>; | 129 | | using FromDataType = typename Types2::LeftType; | 130 | | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | | return false; | 134 | | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | | using FromFieldType = typename FromDataType::FieldType; | 137 | | using ToFieldType = typename ToDataType::FieldType; | 138 | | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | | | 141 | | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | | from_precision = | 145 | | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | | | 149 | | UInt32 to_max_digits = 0; | 150 | | UInt32 to_precision = 0; | 151 | | UInt32 to_scale = 0; | 152 | | | 153 | | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | | const auto* to_decimal_type = | 157 | | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | | ToDataType::check_type_precision(to_precision); | 160 | | | 161 | | to_scale = to_decimal_type->get_scale(); | 162 | | ToDataType::check_type_scale(to_scale); | 163 | | } | 164 | | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 1.26k | to_precision = to_max_digits; | 167 | 1.26k | } |
Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE6EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_16DataTypeDateTimeESE_EEEEbSI_ function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE6EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_14DataTypeTimeV2ESE_EEEEbSI_ Line | Count | Source | 114 | 4 | return false; | 115 | 4 | } | 116 | 4 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | | IsDatelikeV2Types<ToDataType> || | 123 | | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | | return false; | 125 | | } | 126 | | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | | using Types2 = std::decay_t<decltype(types2)>; | 129 | | using FromDataType = typename Types2::LeftType; | 130 | | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | | return false; | 134 | | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | | using FromFieldType = typename FromDataType::FieldType; | 137 | | using ToFieldType = typename ToDataType::FieldType; | 138 | | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | | | 141 | | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | | from_precision = | 145 | | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | | | 149 | | UInt32 to_max_digits = 0; | 150 | | UInt32 to_precision = 0; | 151 | | UInt32 to_scale = 0; | 152 | | | 153 | | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | | const auto* to_decimal_type = | 157 | | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | | ToDataType::check_type_precision(to_precision); | 160 | | | 161 | | to_scale = to_decimal_type->get_scale(); | 162 | | ToDataType::check_type_scale(to_scale); | 163 | | } | 164 | | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 4 | to_precision = to_max_digits; | 167 | 4 | } |
Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE6EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_19DataTypeTimeStampTzESE_EEEEbSI_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE6EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_12DataTypeIPv4ESE_EEEEbSI_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE6EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_12DataTypeIPv6ESE_EEEEbSI_ function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE6EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_14DataTypeStringESE_EEEEbSI_ Line | Count | Source | 114 | 18.1k | return false; | 115 | 18.1k | } | 116 | 18.1k | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | 18.1k | using ToDataType = typename Types::LeftType; | 120 | 18.1k | | 121 | 18.1k | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | | IsDatelikeV2Types<ToDataType> || | 123 | | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | | return false; | 125 | | } | 126 | | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | | using Types2 = std::decay_t<decltype(types2)>; | 129 | | using FromDataType = typename Types2::LeftType; | 130 | | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | | return false; | 134 | | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | | using FromFieldType = typename FromDataType::FieldType; | 137 | | using ToFieldType = typename ToDataType::FieldType; | 138 | | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | | | 141 | | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | | from_precision = | 145 | | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | | | 149 | | UInt32 to_max_digits = 0; | 150 | | UInt32 to_precision = 0; | 151 | | UInt32 to_scale = 0; | 152 | | | 153 | | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | | const auto* to_decimal_type = | 157 | | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | | ToDataType::check_type_precision(to_precision); | 160 | | | 161 | | to_scale = to_decimal_type->get_scale(); | 162 | | ToDataType::check_type_scale(to_scale); | 163 | | } | 164 | | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 18.1k | to_precision = to_max_digits; | 167 | 18.1k | } |
function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE7EEEvEEEEbRKT_ENKUlSI_E_clINSB_INSC_ILSD_2EEESE_EEEEbSI_ Line | Count | Source | 114 | 140 | return false; | 115 | 140 | } | 116 | 140 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | | IsDatelikeV2Types<ToDataType> || | 123 | | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | | return false; | 125 | | } | 126 | | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | | using Types2 = std::decay_t<decltype(types2)>; | 129 | | using FromDataType = typename Types2::LeftType; | 130 | | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | | return false; | 134 | | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | | using FromFieldType = typename FromDataType::FieldType; | 137 | | using ToFieldType = typename ToDataType::FieldType; | 138 | | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | | | 141 | | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | | from_precision = | 145 | | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | | | 149 | | UInt32 to_max_digits = 0; | 150 | | UInt32 to_precision = 0; | 151 | | UInt32 to_scale = 0; | 152 | | | 153 | | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | | const auto* to_decimal_type = | 157 | | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | | ToDataType::check_type_precision(to_precision); | 160 | | | 161 | | to_scale = to_decimal_type->get_scale(); | 162 | | ToDataType::check_type_scale(to_scale); | 163 | | } | 164 | | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 140 | to_precision = to_max_digits; | 167 | 140 | } |
function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE7EEEvEEEEbRKT_ENKUlSI_E_clINSB_INSC_ILSD_3EEESE_EEEEbSI_ Line | Count | Source | 114 | 109 | return false; | 115 | 109 | } | 116 | 109 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | | IsDatelikeV2Types<ToDataType> || | 123 | | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | | return false; | 125 | | } | 126 | | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | | using Types2 = std::decay_t<decltype(types2)>; | 129 | | using FromDataType = typename Types2::LeftType; | 130 | | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | | return false; | 134 | | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | | using FromFieldType = typename FromDataType::FieldType; | 137 | | using ToFieldType = typename ToDataType::FieldType; | 138 | | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | | | 141 | | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | | from_precision = | 145 | | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | | | 149 | | UInt32 to_max_digits = 0; | 150 | | UInt32 to_precision = 0; | 151 | | UInt32 to_scale = 0; | 152 | | | 153 | | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | | const auto* to_decimal_type = | 157 | | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | | ToDataType::check_type_precision(to_precision); | 160 | | | 161 | | to_scale = to_decimal_type->get_scale(); | 162 | | ToDataType::check_type_scale(to_scale); | 163 | | } | 164 | | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 109 | to_precision = to_max_digits; | 167 | 109 | } |
function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE7EEEvEEEEbRKT_ENKUlSI_E_clINSB_INSC_ILSD_4EEESE_EEEEbSI_ Line | Count | Source | 114 | 79 | return false; | 115 | 79 | } | 116 | 79 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | | IsDatelikeV2Types<ToDataType> || | 123 | | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | | return false; | 125 | | } | 126 | | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | | using Types2 = std::decay_t<decltype(types2)>; | 129 | | using FromDataType = typename Types2::LeftType; | 130 | | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | | return false; | 134 | | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | | using FromFieldType = typename FromDataType::FieldType; | 137 | | using ToFieldType = typename ToDataType::FieldType; | 138 | | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | | | 141 | | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | | from_precision = | 145 | | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | | | 149 | | UInt32 to_max_digits = 0; | 150 | | UInt32 to_precision = 0; | 151 | | UInt32 to_scale = 0; | 152 | | | 153 | | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | | const auto* to_decimal_type = | 157 | | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | | ToDataType::check_type_precision(to_precision); | 160 | | | 161 | | to_scale = to_decimal_type->get_scale(); | 162 | | ToDataType::check_type_scale(to_scale); | 163 | | } | 164 | | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 79 | to_precision = to_max_digits; | 167 | 79 | } |
function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE7EEEvEEEEbRKT_ENKUlSI_E_clINSB_INSC_ILSD_5EEESE_EEEEbSI_ Line | Count | Source | 114 | 135 | return false; | 115 | 135 | } | 116 | 135 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | | IsDatelikeV2Types<ToDataType> || | 123 | | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | | return false; | 125 | | } | 126 | | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | | using Types2 = std::decay_t<decltype(types2)>; | 129 | | using FromDataType = typename Types2::LeftType; | 130 | | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | | return false; | 134 | | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | | using FromFieldType = typename FromDataType::FieldType; | 137 | | using ToFieldType = typename ToDataType::FieldType; | 138 | | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | | | 141 | | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | | from_precision = | 145 | | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | | | 149 | | UInt32 to_max_digits = 0; | 150 | | UInt32 to_precision = 0; | 151 | | UInt32 to_scale = 0; | 152 | | | 153 | | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | | const auto* to_decimal_type = | 157 | | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | | ToDataType::check_type_precision(to_precision); | 160 | | | 161 | | to_scale = to_decimal_type->get_scale(); | 162 | | ToDataType::check_type_scale(to_scale); | 163 | | } | 164 | | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 135 | to_precision = to_max_digits; | 167 | 135 | } |
function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE7EEEvEEEEbRKT_ENKUlSI_E_clINSB_INSC_ILSD_6EEESE_EEEEbSI_ Line | Count | Source | 114 | 610 | return false; | 115 | 610 | } | 116 | 610 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | | IsDatelikeV2Types<ToDataType> || | 123 | | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | | return false; | 125 | | } | 126 | | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | | using Types2 = std::decay_t<decltype(types2)>; | 129 | | using FromDataType = typename Types2::LeftType; | 130 | | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | | return false; | 134 | | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | | using FromFieldType = typename FromDataType::FieldType; | 137 | | using ToFieldType = typename ToDataType::FieldType; | 138 | | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | | | 141 | | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | | from_precision = | 145 | | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | | | 149 | | UInt32 to_max_digits = 0; | 150 | | UInt32 to_precision = 0; | 151 | | UInt32 to_scale = 0; | 152 | | | 153 | | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | | const auto* to_decimal_type = | 157 | | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | | ToDataType::check_type_precision(to_precision); | 160 | | | 161 | | to_scale = to_decimal_type->get_scale(); | 162 | | ToDataType::check_type_scale(to_scale); | 163 | | } | 164 | | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 610 | to_precision = to_max_digits; | 167 | 610 | } |
Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE7EEEvEEEEbRKT_ENKUlSI_E_clINSB_ISE_SE_EEEEbSI_ function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE7EEEvEEEEbRKT_ENKUlSI_E_clINSB_INSC_ILSD_8EEESE_EEEEbSI_ Line | Count | Source | 114 | 9 | return false; | 115 | 9 | } | 116 | 9 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | | IsDatelikeV2Types<ToDataType> || | 123 | | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | | return false; | 125 | | } | 126 | | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | | using Types2 = std::decay_t<decltype(types2)>; | 129 | | using FromDataType = typename Types2::LeftType; | 130 | | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | | return false; | 134 | | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | | using FromFieldType = typename FromDataType::FieldType; | 137 | | using ToFieldType = typename ToDataType::FieldType; | 138 | | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | | | 141 | | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | | from_precision = | 145 | | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | | | 149 | | UInt32 to_max_digits = 0; | 150 | | UInt32 to_precision = 0; | 151 | | UInt32 to_scale = 0; | 152 | | | 153 | | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | | const auto* to_decimal_type = | 157 | | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | | ToDataType::check_type_precision(to_precision); | 160 | | | 161 | | to_scale = to_decimal_type->get_scale(); | 162 | | ToDataType::check_type_scale(to_scale); | 163 | | } | 164 | | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 9 | to_precision = to_max_digits; | 167 | 9 | } |
function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE7EEEvEEEEbRKT_ENKUlSI_E_clINSB_INSC_ILSD_9EEESE_EEEEbSI_ Line | Count | Source | 114 | 13 | return false; | 115 | 13 | } | 116 | 13 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | | IsDatelikeV2Types<ToDataType> || | 123 | | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | | return false; | 125 | | } | 126 | | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | | using Types2 = std::decay_t<decltype(types2)>; | 129 | | using FromDataType = typename Types2::LeftType; | 130 | | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | | return false; | 134 | | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | | using FromFieldType = typename FromDataType::FieldType; | 137 | | using ToFieldType = typename ToDataType::FieldType; | 138 | | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | | | 141 | | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | | from_precision = | 145 | | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | | | 149 | | UInt32 to_max_digits = 0; | 150 | | UInt32 to_precision = 0; | 151 | | UInt32 to_scale = 0; | 152 | | | 153 | | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | | const auto* to_decimal_type = | 157 | | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | | ToDataType::check_type_precision(to_precision); | 160 | | | 161 | | to_scale = to_decimal_type->get_scale(); | 162 | | ToDataType::check_type_scale(to_scale); | 163 | | } | 164 | | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 13 | to_precision = to_max_digits; | 167 | 13 | } |
function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE7EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_15DataTypeDecimalILSD_28EEESE_EEEEbSI_ Line | Count | Source | 114 | 18 | return false; | 115 | 18 | } | 116 | 18 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | 18 | IsDatelikeV2Types<ToDataType> || | 123 | 18 | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | 18 | return false; | 125 | 18 | } | 126 | 18 | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | 18 | using Types2 = std::decay_t<decltype(types2)>; | 129 | 18 | using FromDataType = typename Types2::LeftType; | 130 | 18 | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | 18 | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | 18 | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | 18 | return false; | 134 | 18 | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | 18 | using FromFieldType = typename FromDataType::FieldType; | 137 | 18 | using ToFieldType = typename ToDataType::FieldType; | 138 | 18 | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | | | 141 | | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | | from_precision = | 145 | | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | | | 149 | | UInt32 to_max_digits = 0; | 150 | | UInt32 to_precision = 0; | 151 | 18 | UInt32 to_scale = 0; | 152 | 18 | | 153 | 18 | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | 18 | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | 18 | const auto* to_decimal_type = | 157 | 18 | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | 18 | ToDataType::check_type_precision(to_precision); | 160 | 18 |
| 161 | 0 | to_scale = to_decimal_type->get_scale(); | 162 | 0 | ToDataType::check_type_scale(to_scale); | 163 | 0 | } | 164 | 18 | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | 18 | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 0 | to_precision = to_max_digits; | 167 | 18 | } |
function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE7EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_15DataTypeDecimalILSD_29EEESE_EEEEbSI_ Line | Count | Source | 114 | 21 | return false; | 115 | 21 | } | 116 | 21 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | 21 | IsDatelikeV2Types<ToDataType> || | 123 | 21 | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | 21 | return false; | 125 | 21 | } | 126 | 21 | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | 21 | using Types2 = std::decay_t<decltype(types2)>; | 129 | 21 | using FromDataType = typename Types2::LeftType; | 130 | 21 | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | 21 | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | 21 | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | 21 | return false; | 134 | 21 | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | 21 | using FromFieldType = typename FromDataType::FieldType; | 137 | 21 | using ToFieldType = typename ToDataType::FieldType; | 138 | 21 | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | | | 141 | | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | | from_precision = | 145 | | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | | | 149 | | UInt32 to_max_digits = 0; | 150 | | UInt32 to_precision = 0; | 151 | 21 | UInt32 to_scale = 0; | 152 | 21 | | 153 | 21 | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | 21 | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | 21 | const auto* to_decimal_type = | 157 | 21 | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | 21 | ToDataType::check_type_precision(to_precision); | 160 | 21 |
| 161 | 0 | to_scale = to_decimal_type->get_scale(); | 162 | 0 | ToDataType::check_type_scale(to_scale); | 163 | 0 | } | 164 | 21 | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | 21 | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 0 | to_precision = to_max_digits; | 167 | 21 | } |
function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE7EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_15DataTypeDecimalILSD_20EEESE_EEEEbSI_ Line | Count | Source | 114 | 8 | return false; | 115 | 8 | } | 116 | 8 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | 8 | IsDatelikeV2Types<ToDataType> || | 123 | 8 | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | 8 | return false; | 125 | 8 | } | 126 | 8 | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | 8 | using Types2 = std::decay_t<decltype(types2)>; | 129 | 8 | using FromDataType = typename Types2::LeftType; | 130 | 8 | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | 8 | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | 8 | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | 8 | return false; | 134 | 8 | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | 8 | using FromFieldType = typename FromDataType::FieldType; | 137 | 8 | using ToFieldType = typename ToDataType::FieldType; | 138 | 8 | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | | | 141 | | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | | from_precision = | 145 | | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | | | 149 | | UInt32 to_max_digits = 0; | 150 | | UInt32 to_precision = 0; | 151 | 8 | UInt32 to_scale = 0; | 152 | 8 | | 153 | 8 | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | 8 | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | 8 | const auto* to_decimal_type = | 157 | 8 | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | 8 | ToDataType::check_type_precision(to_precision); | 160 | 8 |
| 161 | 0 | to_scale = to_decimal_type->get_scale(); | 162 | 0 | ToDataType::check_type_scale(to_scale); | 163 | 0 | } | 164 | 8 | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | 8 | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 0 | to_precision = to_max_digits; | 167 | 8 | } |
function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE7EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_15DataTypeDecimalILSD_30EEESE_EEEEbSI_ Line | Count | Source | 114 | 21 | return false; | 115 | 21 | } | 116 | 21 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | 21 | IsDatelikeV2Types<ToDataType> || | 123 | 21 | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | 21 | return false; | 125 | 21 | } | 126 | 21 | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | 21 | using Types2 = std::decay_t<decltype(types2)>; | 129 | 21 | using FromDataType = typename Types2::LeftType; | 130 | 21 | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | 21 | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | 21 | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | 21 | return false; | 134 | 21 | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | 21 | using FromFieldType = typename FromDataType::FieldType; | 137 | 21 | using ToFieldType = typename ToDataType::FieldType; | 138 | 21 | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | | | 141 | | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | | from_precision = | 145 | | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | | | 149 | | UInt32 to_max_digits = 0; | 150 | | UInt32 to_precision = 0; | 151 | 21 | UInt32 to_scale = 0; | 152 | 21 | | 153 | 21 | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | 21 | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | 21 | const auto* to_decimal_type = | 157 | 21 | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | 21 | ToDataType::check_type_precision(to_precision); | 160 | 21 |
| 161 | 0 | to_scale = to_decimal_type->get_scale(); | 162 | 0 | ToDataType::check_type_scale(to_scale); | 163 | 0 | } | 164 | 21 | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | 21 | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 0 | to_precision = to_max_digits; | 167 | 21 | } |
function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE7EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_15DataTypeDecimalILSD_35EEESE_EEEEbSI_ Line | Count | Source | 114 | 441 | return false; | 115 | 441 | } | 116 | 441 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | 441 | IsDatelikeV2Types<ToDataType> || | 123 | 441 | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | 441 | return false; | 125 | 441 | } | 126 | 441 | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | 441 | using Types2 = std::decay_t<decltype(types2)>; | 129 | 441 | using FromDataType = typename Types2::LeftType; | 130 | 441 | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | 441 | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | 441 | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | 441 | return false; | 134 | 441 | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | 441 | using FromFieldType = typename FromDataType::FieldType; | 137 | 441 | using ToFieldType = typename ToDataType::FieldType; | 138 | 441 | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | | | 141 | | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | | from_precision = | 145 | | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | | | 149 | | UInt32 to_max_digits = 0; | 150 | | UInt32 to_precision = 0; | 151 | 441 | UInt32 to_scale = 0; | 152 | 441 | | 153 | 441 | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | 441 | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | 441 | const auto* to_decimal_type = | 157 | 441 | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | 441 | ToDataType::check_type_precision(to_precision); | 160 | 441 |
| 161 | 0 | to_scale = to_decimal_type->get_scale(); | 162 | 0 | ToDataType::check_type_scale(to_scale); | 163 | 0 | } | 164 | 441 | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | 441 | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 0 | to_precision = to_max_digits; | 167 | 441 | } |
Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE7EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_12DataTypeDateESE_EEEEbSI_ function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE7EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_14DataTypeDateV2ESE_EEEEbSI_ Line | Count | Source | 114 | 2 | return false; | 115 | 2 | } | 116 | 2 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | | IsDatelikeV2Types<ToDataType> || | 123 | | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | | return false; | 125 | | } | 126 | | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | | using Types2 = std::decay_t<decltype(types2)>; | 129 | | using FromDataType = typename Types2::LeftType; | 130 | | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | | return false; | 134 | | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | | using FromFieldType = typename FromDataType::FieldType; | 137 | | using ToFieldType = typename ToDataType::FieldType; | 138 | | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | | | 141 | | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | | from_precision = | 145 | | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | | | 149 | | UInt32 to_max_digits = 0; | 150 | | UInt32 to_precision = 0; | 151 | | UInt32 to_scale = 0; | 152 | | | 153 | | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | | const auto* to_decimal_type = | 157 | | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | | ToDataType::check_type_precision(to_precision); | 160 | | | 161 | | to_scale = to_decimal_type->get_scale(); | 162 | | ToDataType::check_type_scale(to_scale); | 163 | | } | 164 | | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 2 | to_precision = to_max_digits; | 167 | 2 | } |
function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE7EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_18DataTypeDateTimeV2ESE_EEEEbSI_ Line | Count | Source | 114 | 16 | return false; | 115 | 16 | } | 116 | 16 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | | IsDatelikeV2Types<ToDataType> || | 123 | | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | | return false; | 125 | | } | 126 | | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | | using Types2 = std::decay_t<decltype(types2)>; | 129 | | using FromDataType = typename Types2::LeftType; | 130 | | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | | return false; | 134 | | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | | using FromFieldType = typename FromDataType::FieldType; | 137 | | using ToFieldType = typename ToDataType::FieldType; | 138 | | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | | | 141 | | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | | from_precision = | 145 | | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | | | 149 | | UInt32 to_max_digits = 0; | 150 | | UInt32 to_precision = 0; | 151 | | UInt32 to_scale = 0; | 152 | | | 153 | | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | | const auto* to_decimal_type = | 157 | | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | | ToDataType::check_type_precision(to_precision); | 160 | | | 161 | | to_scale = to_decimal_type->get_scale(); | 162 | | ToDataType::check_type_scale(to_scale); | 163 | | } | 164 | | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 16 | to_precision = to_max_digits; | 167 | 16 | } |
Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE7EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_16DataTypeDateTimeESE_EEEEbSI_ function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE7EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_14DataTypeTimeV2ESE_EEEEbSI_ Line | Count | Source | 114 | 4 | return false; | 115 | 4 | } | 116 | 4 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | | IsDatelikeV2Types<ToDataType> || | 123 | | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | | return false; | 125 | | } | 126 | | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | | using Types2 = std::decay_t<decltype(types2)>; | 129 | | using FromDataType = typename Types2::LeftType; | 130 | | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | | return false; | 134 | | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | | using FromFieldType = typename FromDataType::FieldType; | 137 | | using ToFieldType = typename ToDataType::FieldType; | 138 | | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | | | 141 | | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | | from_precision = | 145 | | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | | | 149 | | UInt32 to_max_digits = 0; | 150 | | UInt32 to_precision = 0; | 151 | | UInt32 to_scale = 0; | 152 | | | 153 | | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | | const auto* to_decimal_type = | 157 | | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | | ToDataType::check_type_precision(to_precision); | 160 | | | 161 | | to_scale = to_decimal_type->get_scale(); | 162 | | ToDataType::check_type_scale(to_scale); | 163 | | } | 164 | | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 4 | to_precision = to_max_digits; | 167 | 4 | } |
Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE7EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_19DataTypeTimeStampTzESE_EEEEbSI_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE7EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_12DataTypeIPv4ESE_EEEEbSI_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE7EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_12DataTypeIPv6ESE_EEEEbSI_ function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE7EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_14DataTypeStringESE_EEEEbSI_ Line | Count | Source | 114 | 1.89k | return false; | 115 | 1.89k | } | 116 | 1.89k | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | 1.89k | using ToDataType = typename Types::LeftType; | 120 | 1.89k | | 121 | 1.89k | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | | IsDatelikeV2Types<ToDataType> || | 123 | | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | | return false; | 125 | | } | 126 | | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | | using Types2 = std::decay_t<decltype(types2)>; | 129 | | using FromDataType = typename Types2::LeftType; | 130 | | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | | return false; | 134 | | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | | using FromFieldType = typename FromDataType::FieldType; | 137 | | using ToFieldType = typename ToDataType::FieldType; | 138 | | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | | | 141 | | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | | from_precision = | 145 | | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | | | 149 | | UInt32 to_max_digits = 0; | 150 | | UInt32 to_precision = 0; | 151 | | UInt32 to_scale = 0; | 152 | | | 153 | | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | | const auto* to_decimal_type = | 157 | | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | | ToDataType::check_type_precision(to_precision); | 160 | | | 161 | | to_scale = to_decimal_type->get_scale(); | 162 | | ToDataType::check_type_scale(to_scale); | 163 | | } | 164 | | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 1.89k | to_precision = to_max_digits; | 167 | 1.89k | } |
function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE8EEEvEEEEbRKT_ENKUlSI_E_clINSB_INSC_ILSD_2EEESE_EEEEbSI_ Line | Count | Source | 114 | 2 | return false; | 115 | 2 | } | 116 | 2 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | | IsDatelikeV2Types<ToDataType> || | 123 | | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | | return false; | 125 | | } | 126 | | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | | using Types2 = std::decay_t<decltype(types2)>; | 129 | | using FromDataType = typename Types2::LeftType; | 130 | | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | | return false; | 134 | | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | | using FromFieldType = typename FromDataType::FieldType; | 137 | | using ToFieldType = typename ToDataType::FieldType; | 138 | | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | | | 141 | | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | | from_precision = | 145 | | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | | | 149 | | UInt32 to_max_digits = 0; | 150 | | UInt32 to_precision = 0; | 151 | | UInt32 to_scale = 0; | 152 | | | 153 | | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | | const auto* to_decimal_type = | 157 | | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | | ToDataType::check_type_precision(to_precision); | 160 | | | 161 | | to_scale = to_decimal_type->get_scale(); | 162 | | ToDataType::check_type_scale(to_scale); | 163 | | } | 164 | | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 2 | to_precision = to_max_digits; | 167 | 2 | } |
function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE8EEEvEEEEbRKT_ENKUlSI_E_clINSB_INSC_ILSD_3EEESE_EEEEbSI_ Line | Count | Source | 114 | 29 | return false; | 115 | 29 | } | 116 | 29 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | | IsDatelikeV2Types<ToDataType> || | 123 | | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | | return false; | 125 | | } | 126 | | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | | using Types2 = std::decay_t<decltype(types2)>; | 129 | | using FromDataType = typename Types2::LeftType; | 130 | | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | | return false; | 134 | | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | | using FromFieldType = typename FromDataType::FieldType; | 137 | | using ToFieldType = typename ToDataType::FieldType; | 138 | | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | | | 141 | | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | | from_precision = | 145 | | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | | | 149 | | UInt32 to_max_digits = 0; | 150 | | UInt32 to_precision = 0; | 151 | | UInt32 to_scale = 0; | 152 | | | 153 | | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | | const auto* to_decimal_type = | 157 | | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | | ToDataType::check_type_precision(to_precision); | 160 | | | 161 | | to_scale = to_decimal_type->get_scale(); | 162 | | ToDataType::check_type_scale(to_scale); | 163 | | } | 164 | | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 29 | to_precision = to_max_digits; | 167 | 29 | } |
function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE8EEEvEEEEbRKT_ENKUlSI_E_clINSB_INSC_ILSD_4EEESE_EEEEbSI_ Line | Count | Source | 114 | 6 | return false; | 115 | 6 | } | 116 | 6 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | | IsDatelikeV2Types<ToDataType> || | 123 | | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | | return false; | 125 | | } | 126 | | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | | using Types2 = std::decay_t<decltype(types2)>; | 129 | | using FromDataType = typename Types2::LeftType; | 130 | | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | | return false; | 134 | | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | | using FromFieldType = typename FromDataType::FieldType; | 137 | | using ToFieldType = typename ToDataType::FieldType; | 138 | | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | | | 141 | | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | | from_precision = | 145 | | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | | | 149 | | UInt32 to_max_digits = 0; | 150 | | UInt32 to_precision = 0; | 151 | | UInt32 to_scale = 0; | 152 | | | 153 | | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | | const auto* to_decimal_type = | 157 | | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | | ToDataType::check_type_precision(to_precision); | 160 | | | 161 | | to_scale = to_decimal_type->get_scale(); | 162 | | ToDataType::check_type_scale(to_scale); | 163 | | } | 164 | | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 6 | to_precision = to_max_digits; | 167 | 6 | } |
function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE8EEEvEEEEbRKT_ENKUlSI_E_clINSB_INSC_ILSD_5EEESE_EEEEbSI_ Line | Count | Source | 114 | 18 | return false; | 115 | 18 | } | 116 | 18 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | | IsDatelikeV2Types<ToDataType> || | 123 | | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | | return false; | 125 | | } | 126 | | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | | using Types2 = std::decay_t<decltype(types2)>; | 129 | | using FromDataType = typename Types2::LeftType; | 130 | | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | | return false; | 134 | | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | | using FromFieldType = typename FromDataType::FieldType; | 137 | | using ToFieldType = typename ToDataType::FieldType; | 138 | | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | | | 141 | | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | | from_precision = | 145 | | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | | | 149 | | UInt32 to_max_digits = 0; | 150 | | UInt32 to_precision = 0; | 151 | | UInt32 to_scale = 0; | 152 | | | 153 | | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | | const auto* to_decimal_type = | 157 | | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | | ToDataType::check_type_precision(to_precision); | 160 | | | 161 | | to_scale = to_decimal_type->get_scale(); | 162 | | ToDataType::check_type_scale(to_scale); | 163 | | } | 164 | | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 18 | to_precision = to_max_digits; | 167 | 18 | } |
function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE8EEEvEEEEbRKT_ENKUlSI_E_clINSB_INSC_ILSD_6EEESE_EEEEbSI_ Line | Count | Source | 114 | 6 | return false; | 115 | 6 | } | 116 | 6 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | | IsDatelikeV2Types<ToDataType> || | 123 | | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | | return false; | 125 | | } | 126 | | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | | using Types2 = std::decay_t<decltype(types2)>; | 129 | | using FromDataType = typename Types2::LeftType; | 130 | | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | | return false; | 134 | | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | | using FromFieldType = typename FromDataType::FieldType; | 137 | | using ToFieldType = typename ToDataType::FieldType; | 138 | | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | | | 141 | | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | | from_precision = | 145 | | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | | | 149 | | UInt32 to_max_digits = 0; | 150 | | UInt32 to_precision = 0; | 151 | | UInt32 to_scale = 0; | 152 | | | 153 | | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | | const auto* to_decimal_type = | 157 | | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | | ToDataType::check_type_precision(to_precision); | 160 | | | 161 | | to_scale = to_decimal_type->get_scale(); | 162 | | ToDataType::check_type_scale(to_scale); | 163 | | } | 164 | | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 6 | to_precision = to_max_digits; | 167 | 6 | } |
function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE8EEEvEEEEbRKT_ENKUlSI_E_clINSB_INSC_ILSD_7EEESE_EEEEbSI_ Line | Count | Source | 114 | 63 | return false; | 115 | 63 | } | 116 | 63 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | | IsDatelikeV2Types<ToDataType> || | 123 | | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | | return false; | 125 | | } | 126 | | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | | using Types2 = std::decay_t<decltype(types2)>; | 129 | | using FromDataType = typename Types2::LeftType; | 130 | | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | | return false; | 134 | | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | | using FromFieldType = typename FromDataType::FieldType; | 137 | | using ToFieldType = typename ToDataType::FieldType; | 138 | | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | | | 141 | | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | | from_precision = | 145 | | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | | | 149 | | UInt32 to_max_digits = 0; | 150 | | UInt32 to_precision = 0; | 151 | | UInt32 to_scale = 0; | 152 | | | 153 | | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | | const auto* to_decimal_type = | 157 | | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | | ToDataType::check_type_precision(to_precision); | 160 | | | 161 | | to_scale = to_decimal_type->get_scale(); | 162 | | ToDataType::check_type_scale(to_scale); | 163 | | } | 164 | | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 63 | to_precision = to_max_digits; | 167 | 63 | } |
Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE8EEEvEEEEbRKT_ENKUlSI_E_clINSB_ISE_SE_EEEEbSI_ function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE8EEEvEEEEbRKT_ENKUlSI_E_clINSB_INSC_ILSD_9EEESE_EEEEbSI_ Line | Count | Source | 114 | 89 | return false; | 115 | 89 | } | 116 | 89 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | | IsDatelikeV2Types<ToDataType> || | 123 | | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | | return false; | 125 | | } | 126 | | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | | using Types2 = std::decay_t<decltype(types2)>; | 129 | | using FromDataType = typename Types2::LeftType; | 130 | | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | | return false; | 134 | | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | | using FromFieldType = typename FromDataType::FieldType; | 137 | | using ToFieldType = typename ToDataType::FieldType; | 138 | | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | | | 141 | | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | | from_precision = | 145 | | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | | | 149 | | UInt32 to_max_digits = 0; | 150 | | UInt32 to_precision = 0; | 151 | | UInt32 to_scale = 0; | 152 | | | 153 | | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | | const auto* to_decimal_type = | 157 | | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | | ToDataType::check_type_precision(to_precision); | 160 | | | 161 | | to_scale = to_decimal_type->get_scale(); | 162 | | ToDataType::check_type_scale(to_scale); | 163 | | } | 164 | | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 89 | to_precision = to_max_digits; | 167 | 89 | } |
function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE8EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_15DataTypeDecimalILSD_28EEESE_EEEEbSI_ Line | Count | Source | 114 | 117 | return false; | 115 | 117 | } | 116 | 117 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | 117 | IsDatelikeV2Types<ToDataType> || | 123 | 117 | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | 117 | return false; | 125 | 117 | } | 126 | 117 | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | 117 | using Types2 = std::decay_t<decltype(types2)>; | 129 | 117 | using FromDataType = typename Types2::LeftType; | 130 | 117 | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | 117 | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | 117 | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | 117 | return false; | 134 | 117 | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | 117 | using FromFieldType = typename FromDataType::FieldType; | 137 | 117 | using ToFieldType = typename ToDataType::FieldType; | 138 | 117 | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | | | 141 | | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | | from_precision = | 145 | | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | | | 149 | | UInt32 to_max_digits = 0; | 150 | | UInt32 to_precision = 0; | 151 | 117 | UInt32 to_scale = 0; | 152 | 117 | | 153 | 117 | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | 117 | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | 117 | const auto* to_decimal_type = | 157 | 117 | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | 117 | ToDataType::check_type_precision(to_precision); | 160 | 117 |
| 161 | 0 | to_scale = to_decimal_type->get_scale(); | 162 | 0 | ToDataType::check_type_scale(to_scale); | 163 | 0 | } | 164 | 117 | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | 117 | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 0 | to_precision = to_max_digits; | 167 | 117 | } |
function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE8EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_15DataTypeDecimalILSD_29EEESE_EEEEbSI_ Line | Count | Source | 114 | 112 | return false; | 115 | 112 | } | 116 | 112 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | 112 | IsDatelikeV2Types<ToDataType> || | 123 | 112 | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | 112 | return false; | 125 | 112 | } | 126 | 112 | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | 112 | using Types2 = std::decay_t<decltype(types2)>; | 129 | 112 | using FromDataType = typename Types2::LeftType; | 130 | 112 | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | 112 | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | 112 | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | 112 | return false; | 134 | 112 | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | 112 | using FromFieldType = typename FromDataType::FieldType; | 137 | 112 | using ToFieldType = typename ToDataType::FieldType; | 138 | 112 | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | | | 141 | | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | | from_precision = | 145 | | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | | | 149 | | UInt32 to_max_digits = 0; | 150 | | UInt32 to_precision = 0; | 151 | 112 | UInt32 to_scale = 0; | 152 | 112 | | 153 | 112 | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | 112 | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | 112 | const auto* to_decimal_type = | 157 | 112 | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | 112 | ToDataType::check_type_precision(to_precision); | 160 | 112 |
| 161 | 0 | to_scale = to_decimal_type->get_scale(); | 162 | 0 | ToDataType::check_type_scale(to_scale); | 163 | 0 | } | 164 | 112 | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | 112 | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 0 | to_precision = to_max_digits; | 167 | 112 | } |
function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE8EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_15DataTypeDecimalILSD_20EEESE_EEEEbSI_ Line | Count | Source | 114 | 14 | return false; | 115 | 14 | } | 116 | 14 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | 14 | IsDatelikeV2Types<ToDataType> || | 123 | 14 | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | 14 | return false; | 125 | 14 | } | 126 | 14 | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | 14 | using Types2 = std::decay_t<decltype(types2)>; | 129 | 14 | using FromDataType = typename Types2::LeftType; | 130 | 14 | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | 14 | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | 14 | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | 14 | return false; | 134 | 14 | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | 14 | using FromFieldType = typename FromDataType::FieldType; | 137 | 14 | using ToFieldType = typename ToDataType::FieldType; | 138 | 14 | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | | | 141 | | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | | from_precision = | 145 | | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | | | 149 | | UInt32 to_max_digits = 0; | 150 | | UInt32 to_precision = 0; | 151 | 14 | UInt32 to_scale = 0; | 152 | 14 | | 153 | 14 | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | 14 | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | 14 | const auto* to_decimal_type = | 157 | 14 | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | 14 | ToDataType::check_type_precision(to_precision); | 160 | 14 |
| 161 | 0 | to_scale = to_decimal_type->get_scale(); | 162 | 0 | ToDataType::check_type_scale(to_scale); | 163 | 0 | } | 164 | 14 | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | 14 | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 0 | to_precision = to_max_digits; | 167 | 14 | } |
function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE8EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_15DataTypeDecimalILSD_30EEESE_EEEEbSI_ Line | Count | Source | 114 | 63 | return false; | 115 | 63 | } | 116 | 63 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | 63 | IsDatelikeV2Types<ToDataType> || | 123 | 63 | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | 63 | return false; | 125 | 63 | } | 126 | 63 | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | 63 | using Types2 = std::decay_t<decltype(types2)>; | 129 | 63 | using FromDataType = typename Types2::LeftType; | 130 | 63 | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | 63 | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | 63 | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | 63 | return false; | 134 | 63 | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | 63 | using FromFieldType = typename FromDataType::FieldType; | 137 | 63 | using ToFieldType = typename ToDataType::FieldType; | 138 | 63 | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | | | 141 | | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | | from_precision = | 145 | | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | | | 149 | | UInt32 to_max_digits = 0; | 150 | | UInt32 to_precision = 0; | 151 | 63 | UInt32 to_scale = 0; | 152 | 63 | | 153 | 63 | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | 63 | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | 63 | const auto* to_decimal_type = | 157 | 63 | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | 63 | ToDataType::check_type_precision(to_precision); | 160 | 63 |
| 161 | 0 | to_scale = to_decimal_type->get_scale(); | 162 | 0 | ToDataType::check_type_scale(to_scale); | 163 | 0 | } | 164 | 63 | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | 63 | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 0 | to_precision = to_max_digits; | 167 | 63 | } |
function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE8EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_15DataTypeDecimalILSD_35EEESE_EEEEbSI_ Line | Count | Source | 114 | 295 | return false; | 115 | 295 | } | 116 | 295 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | 295 | IsDatelikeV2Types<ToDataType> || | 123 | 295 | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | 295 | return false; | 125 | 295 | } | 126 | 295 | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | 295 | using Types2 = std::decay_t<decltype(types2)>; | 129 | 295 | using FromDataType = typename Types2::LeftType; | 130 | 295 | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | 295 | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | 295 | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | 295 | return false; | 134 | 295 | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | 295 | using FromFieldType = typename FromDataType::FieldType; | 137 | 295 | using ToFieldType = typename ToDataType::FieldType; | 138 | 295 | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | | | 141 | | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | | from_precision = | 145 | | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | | | 149 | | UInt32 to_max_digits = 0; | 150 | | UInt32 to_precision = 0; | 151 | 295 | UInt32 to_scale = 0; | 152 | 295 | | 153 | 295 | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | 295 | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | 295 | const auto* to_decimal_type = | 157 | 295 | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | 295 | ToDataType::check_type_precision(to_precision); | 160 | 295 |
| 161 | 0 | to_scale = to_decimal_type->get_scale(); | 162 | 0 | ToDataType::check_type_scale(to_scale); | 163 | 0 | } | 164 | 295 | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | 295 | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 0 | to_precision = to_max_digits; | 167 | 295 | } |
Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE8EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_12DataTypeDateESE_EEEEbSI_ function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE8EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_14DataTypeDateV2ESE_EEEEbSI_ Line | Count | Source | 114 | 39 | return false; | 115 | 39 | } | 116 | 39 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | | IsDatelikeV2Types<ToDataType> || | 123 | | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | | return false; | 125 | | } | 126 | | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | | using Types2 = std::decay_t<decltype(types2)>; | 129 | | using FromDataType = typename Types2::LeftType; | 130 | | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | | return false; | 134 | | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | | using FromFieldType = typename FromDataType::FieldType; | 137 | | using ToFieldType = typename ToDataType::FieldType; | 138 | | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | | | 141 | | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | | from_precision = | 145 | | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | | | 149 | | UInt32 to_max_digits = 0; | 150 | | UInt32 to_precision = 0; | 151 | | UInt32 to_scale = 0; | 152 | | | 153 | | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | | const auto* to_decimal_type = | 157 | | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | | ToDataType::check_type_precision(to_precision); | 160 | | | 161 | | to_scale = to_decimal_type->get_scale(); | 162 | | ToDataType::check_type_scale(to_scale); | 163 | | } | 164 | | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 39 | to_precision = to_max_digits; | 167 | 39 | } |
function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE8EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_18DataTypeDateTimeV2ESE_EEEEbSI_ Line | Count | Source | 114 | 7.78k | return false; | 115 | 7.78k | } | 116 | 7.78k | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | | IsDatelikeV2Types<ToDataType> || | 123 | | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | | return false; | 125 | | } | 126 | | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | | using Types2 = std::decay_t<decltype(types2)>; | 129 | | using FromDataType = typename Types2::LeftType; | 130 | | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | | return false; | 134 | | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | | using FromFieldType = typename FromDataType::FieldType; | 137 | | using ToFieldType = typename ToDataType::FieldType; | 138 | | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | | | 141 | | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | | from_precision = | 145 | | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | | | 149 | | UInt32 to_max_digits = 0; | 150 | | UInt32 to_precision = 0; | 151 | | UInt32 to_scale = 0; | 152 | | | 153 | | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | | const auto* to_decimal_type = | 157 | | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | | ToDataType::check_type_precision(to_precision); | 160 | | | 161 | | to_scale = to_decimal_type->get_scale(); | 162 | | ToDataType::check_type_scale(to_scale); | 163 | | } | 164 | | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 7.78k | to_precision = to_max_digits; | 167 | 7.78k | } |
Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE8EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_16DataTypeDateTimeESE_EEEEbSI_ function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE8EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_14DataTypeTimeV2ESE_EEEEbSI_ Line | Count | Source | 114 | 162 | return false; | 115 | 162 | } | 116 | 162 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | | IsDatelikeV2Types<ToDataType> || | 123 | | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | | return false; | 125 | | } | 126 | | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | | using Types2 = std::decay_t<decltype(types2)>; | 129 | | using FromDataType = typename Types2::LeftType; | 130 | | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | | return false; | 134 | | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | | using FromFieldType = typename FromDataType::FieldType; | 137 | | using ToFieldType = typename ToDataType::FieldType; | 138 | | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | | | 141 | | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | | from_precision = | 145 | | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | | | 149 | | UInt32 to_max_digits = 0; | 150 | | UInt32 to_precision = 0; | 151 | | UInt32 to_scale = 0; | 152 | | | 153 | | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | | const auto* to_decimal_type = | 157 | | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | | ToDataType::check_type_precision(to_precision); | 160 | | | 161 | | to_scale = to_decimal_type->get_scale(); | 162 | | ToDataType::check_type_scale(to_scale); | 163 | | } | 164 | | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 162 | to_precision = to_max_digits; | 167 | 162 | } |
Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE8EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_19DataTypeTimeStampTzESE_EEEEbSI_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE8EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_12DataTypeIPv4ESE_EEEEbSI_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE8EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_12DataTypeIPv6ESE_EEEEbSI_ function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE8EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_14DataTypeStringESE_EEEEbSI_ Line | Count | Source | 114 | 1.23k | return false; | 115 | 1.23k | } | 116 | 1.23k | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | 1.23k | using ToDataType = typename Types::LeftType; | 120 | 1.23k | | 121 | 1.23k | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | | IsDatelikeV2Types<ToDataType> || | 123 | | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | | return false; | 125 | | } | 126 | | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | | using Types2 = std::decay_t<decltype(types2)>; | 129 | | using FromDataType = typename Types2::LeftType; | 130 | | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | | return false; | 134 | | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | | using FromFieldType = typename FromDataType::FieldType; | 137 | | using ToFieldType = typename ToDataType::FieldType; | 138 | | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | | | 141 | | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | | from_precision = | 145 | | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | | | 149 | | UInt32 to_max_digits = 0; | 150 | | UInt32 to_precision = 0; | 151 | | UInt32 to_scale = 0; | 152 | | | 153 | | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | | const auto* to_decimal_type = | 157 | | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | | ToDataType::check_type_precision(to_precision); | 160 | | | 161 | | to_scale = to_decimal_type->get_scale(); | 162 | | ToDataType::check_type_scale(to_scale); | 163 | | } | 164 | | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 1.23k | to_precision = to_max_digits; | 167 | 1.23k | } |
function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE9EEEvEEEEbRKT_ENKUlSI_E_clINSB_INSC_ILSD_2EEESE_EEEEbSI_ Line | Count | Source | 114 | 265 | return false; | 115 | 265 | } | 116 | 265 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | | IsDatelikeV2Types<ToDataType> || | 123 | | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | | return false; | 125 | | } | 126 | | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | | using Types2 = std::decay_t<decltype(types2)>; | 129 | | using FromDataType = typename Types2::LeftType; | 130 | | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | | return false; | 134 | | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | | using FromFieldType = typename FromDataType::FieldType; | 137 | | using ToFieldType = typename ToDataType::FieldType; | 138 | | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | | | 141 | | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | | from_precision = | 145 | | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | | | 149 | | UInt32 to_max_digits = 0; | 150 | | UInt32 to_precision = 0; | 151 | | UInt32 to_scale = 0; | 152 | | | 153 | | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | | const auto* to_decimal_type = | 157 | | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | | ToDataType::check_type_precision(to_precision); | 160 | | | 161 | | to_scale = to_decimal_type->get_scale(); | 162 | | ToDataType::check_type_scale(to_scale); | 163 | | } | 164 | | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 265 | to_precision = to_max_digits; | 167 | 265 | } |
function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE9EEEvEEEEbRKT_ENKUlSI_E_clINSB_INSC_ILSD_3EEESE_EEEEbSI_ Line | Count | Source | 114 | 540 | return false; | 115 | 540 | } | 116 | 540 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | | IsDatelikeV2Types<ToDataType> || | 123 | | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | | return false; | 125 | | } | 126 | | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | | using Types2 = std::decay_t<decltype(types2)>; | 129 | | using FromDataType = typename Types2::LeftType; | 130 | | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | | return false; | 134 | | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | | using FromFieldType = typename FromDataType::FieldType; | 137 | | using ToFieldType = typename ToDataType::FieldType; | 138 | | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | | | 141 | | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | | from_precision = | 145 | | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | | | 149 | | UInt32 to_max_digits = 0; | 150 | | UInt32 to_precision = 0; | 151 | | UInt32 to_scale = 0; | 152 | | | 153 | | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | | const auto* to_decimal_type = | 157 | | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | | ToDataType::check_type_precision(to_precision); | 160 | | | 161 | | to_scale = to_decimal_type->get_scale(); | 162 | | ToDataType::check_type_scale(to_scale); | 163 | | } | 164 | | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 540 | to_precision = to_max_digits; | 167 | 540 | } |
function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE9EEEvEEEEbRKT_ENKUlSI_E_clINSB_INSC_ILSD_4EEESE_EEEEbSI_ Line | Count | Source | 114 | 1.07k | return false; | 115 | 1.07k | } | 116 | 1.07k | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | | IsDatelikeV2Types<ToDataType> || | 123 | | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | | return false; | 125 | | } | 126 | | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | | using Types2 = std::decay_t<decltype(types2)>; | 129 | | using FromDataType = typename Types2::LeftType; | 130 | | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | | return false; | 134 | | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | | using FromFieldType = typename FromDataType::FieldType; | 137 | | using ToFieldType = typename ToDataType::FieldType; | 138 | | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | | | 141 | | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | | from_precision = | 145 | | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | | | 149 | | UInt32 to_max_digits = 0; | 150 | | UInt32 to_precision = 0; | 151 | | UInt32 to_scale = 0; | 152 | | | 153 | | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | | const auto* to_decimal_type = | 157 | | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | | ToDataType::check_type_precision(to_precision); | 160 | | | 161 | | to_scale = to_decimal_type->get_scale(); | 162 | | ToDataType::check_type_scale(to_scale); | 163 | | } | 164 | | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 1.07k | to_precision = to_max_digits; | 167 | 1.07k | } |
function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE9EEEvEEEEbRKT_ENKUlSI_E_clINSB_INSC_ILSD_5EEESE_EEEEbSI_ Line | Count | Source | 114 | 1.16k | return false; | 115 | 1.16k | } | 116 | 1.16k | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | | IsDatelikeV2Types<ToDataType> || | 123 | | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | | return false; | 125 | | } | 126 | | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | | using Types2 = std::decay_t<decltype(types2)>; | 129 | | using FromDataType = typename Types2::LeftType; | 130 | | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | | return false; | 134 | | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | | using FromFieldType = typename FromDataType::FieldType; | 137 | | using ToFieldType = typename ToDataType::FieldType; | 138 | | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | | | 141 | | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | | from_precision = | 145 | | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | | | 149 | | UInt32 to_max_digits = 0; | 150 | | UInt32 to_precision = 0; | 151 | | UInt32 to_scale = 0; | 152 | | | 153 | | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | | const auto* to_decimal_type = | 157 | | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | | ToDataType::check_type_precision(to_precision); | 160 | | | 161 | | to_scale = to_decimal_type->get_scale(); | 162 | | ToDataType::check_type_scale(to_scale); | 163 | | } | 164 | | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 1.16k | to_precision = to_max_digits; | 167 | 1.16k | } |
function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE9EEEvEEEEbRKT_ENKUlSI_E_clINSB_INSC_ILSD_6EEESE_EEEEbSI_ Line | Count | Source | 114 | 1.29k | return false; | 115 | 1.29k | } | 116 | 1.29k | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | | IsDatelikeV2Types<ToDataType> || | 123 | | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | | return false; | 125 | | } | 126 | | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | | using Types2 = std::decay_t<decltype(types2)>; | 129 | | using FromDataType = typename Types2::LeftType; | 130 | | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | | return false; | 134 | | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | | using FromFieldType = typename FromDataType::FieldType; | 137 | | using ToFieldType = typename ToDataType::FieldType; | 138 | | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | | | 141 | | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | | from_precision = | 145 | | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | | | 149 | | UInt32 to_max_digits = 0; | 150 | | UInt32 to_precision = 0; | 151 | | UInt32 to_scale = 0; | 152 | | | 153 | | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | | const auto* to_decimal_type = | 157 | | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | | ToDataType::check_type_precision(to_precision); | 160 | | | 161 | | to_scale = to_decimal_type->get_scale(); | 162 | | ToDataType::check_type_scale(to_scale); | 163 | | } | 164 | | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 1.29k | to_precision = to_max_digits; | 167 | 1.29k | } |
function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE9EEEvEEEEbRKT_ENKUlSI_E_clINSB_INSC_ILSD_7EEESE_EEEEbSI_ Line | Count | Source | 114 | 198 | return false; | 115 | 198 | } | 116 | 198 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | | IsDatelikeV2Types<ToDataType> || | 123 | | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | | return false; | 125 | | } | 126 | | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | | using Types2 = std::decay_t<decltype(types2)>; | 129 | | using FromDataType = typename Types2::LeftType; | 130 | | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | | return false; | 134 | | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | | using FromFieldType = typename FromDataType::FieldType; | 137 | | using ToFieldType = typename ToDataType::FieldType; | 138 | | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | | | 141 | | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | | from_precision = | 145 | | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | | | 149 | | UInt32 to_max_digits = 0; | 150 | | UInt32 to_precision = 0; | 151 | | UInt32 to_scale = 0; | 152 | | | 153 | | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | | const auto* to_decimal_type = | 157 | | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | | ToDataType::check_type_precision(to_precision); | 160 | | | 161 | | to_scale = to_decimal_type->get_scale(); | 162 | | ToDataType::check_type_scale(to_scale); | 163 | | } | 164 | | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 198 | to_precision = to_max_digits; | 167 | 198 | } |
function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE9EEEvEEEEbRKT_ENKUlSI_E_clINSB_INSC_ILSD_8EEESE_EEEEbSI_ Line | Count | Source | 114 | 1.18k | return false; | 115 | 1.18k | } | 116 | 1.18k | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | | IsDatelikeV2Types<ToDataType> || | 123 | | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | | return false; | 125 | | } | 126 | | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | | using Types2 = std::decay_t<decltype(types2)>; | 129 | | using FromDataType = typename Types2::LeftType; | 130 | | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | | return false; | 134 | | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | | using FromFieldType = typename FromDataType::FieldType; | 137 | | using ToFieldType = typename ToDataType::FieldType; | 138 | | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | | | 141 | | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | | from_precision = | 145 | | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | | | 149 | | UInt32 to_max_digits = 0; | 150 | | UInt32 to_precision = 0; | 151 | | UInt32 to_scale = 0; | 152 | | | 153 | | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | | const auto* to_decimal_type = | 157 | | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | | ToDataType::check_type_precision(to_precision); | 160 | | | 161 | | to_scale = to_decimal_type->get_scale(); | 162 | | ToDataType::check_type_scale(to_scale); | 163 | | } | 164 | | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 1.18k | to_precision = to_max_digits; | 167 | 1.18k | } |
Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE9EEEvEEEEbRKT_ENKUlSI_E_clINSB_ISE_SE_EEEEbSI_ function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE9EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_15DataTypeDecimalILSD_28EEESE_EEEEbSI_ Line | Count | Source | 114 | 539 | return false; | 115 | 539 | } | 116 | 539 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | 539 | IsDatelikeV2Types<ToDataType> || | 123 | 539 | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | 539 | return false; | 125 | 539 | } | 126 | 539 | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | 539 | using Types2 = std::decay_t<decltype(types2)>; | 129 | 539 | using FromDataType = typename Types2::LeftType; | 130 | 539 | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | 539 | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | 539 | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | 539 | return false; | 134 | 539 | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | 539 | using FromFieldType = typename FromDataType::FieldType; | 137 | 539 | using ToFieldType = typename ToDataType::FieldType; | 138 | 539 | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | | | 141 | | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | | from_precision = | 145 | | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | | | 149 | | UInt32 to_max_digits = 0; | 150 | | UInt32 to_precision = 0; | 151 | 539 | UInt32 to_scale = 0; | 152 | 539 | | 153 | 539 | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | 539 | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | 539 | const auto* to_decimal_type = | 157 | 539 | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | 539 | ToDataType::check_type_precision(to_precision); | 160 | 539 |
| 161 | 0 | to_scale = to_decimal_type->get_scale(); | 162 | 0 | ToDataType::check_type_scale(to_scale); | 163 | 0 | } | 164 | 539 | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | 539 | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 0 | to_precision = to_max_digits; | 167 | 539 | } |
function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE9EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_15DataTypeDecimalILSD_29EEESE_EEEEbSI_ Line | Count | Source | 114 | 321 | return false; | 115 | 321 | } | 116 | 321 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | 321 | IsDatelikeV2Types<ToDataType> || | 123 | 321 | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | 321 | return false; | 125 | 321 | } | 126 | 321 | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | 321 | using Types2 = std::decay_t<decltype(types2)>; | 129 | 321 | using FromDataType = typename Types2::LeftType; | 130 | 321 | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | 321 | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | 321 | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | 321 | return false; | 134 | 321 | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | 321 | using FromFieldType = typename FromDataType::FieldType; | 137 | 321 | using ToFieldType = typename ToDataType::FieldType; | 138 | 321 | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | | | 141 | | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | | from_precision = | 145 | | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | | | 149 | | UInt32 to_max_digits = 0; | 150 | | UInt32 to_precision = 0; | 151 | 321 | UInt32 to_scale = 0; | 152 | 321 | | 153 | 321 | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | 321 | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | 321 | const auto* to_decimal_type = | 157 | 321 | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | 321 | ToDataType::check_type_precision(to_precision); | 160 | 321 |
| 161 | 0 | to_scale = to_decimal_type->get_scale(); | 162 | 0 | ToDataType::check_type_scale(to_scale); | 163 | 0 | } | 164 | 322 | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | 321 | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 0 | to_precision = to_max_digits; | 167 | 321 | } |
function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE9EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_15DataTypeDecimalILSD_20EEESE_EEEEbSI_ Line | Count | Source | 114 | 54 | return false; | 115 | 54 | } | 116 | 54 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | 54 | IsDatelikeV2Types<ToDataType> || | 123 | 54 | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | 54 | return false; | 125 | 54 | } | 126 | 54 | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | 54 | using Types2 = std::decay_t<decltype(types2)>; | 129 | 54 | using FromDataType = typename Types2::LeftType; | 130 | 54 | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | 54 | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | 54 | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | 54 | return false; | 134 | 54 | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | 54 | using FromFieldType = typename FromDataType::FieldType; | 137 | 54 | using ToFieldType = typename ToDataType::FieldType; | 138 | 54 | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | | | 141 | | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | | from_precision = | 145 | | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | | | 149 | | UInt32 to_max_digits = 0; | 150 | | UInt32 to_precision = 0; | 151 | 54 | UInt32 to_scale = 0; | 152 | 54 | | 153 | 54 | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | 54 | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | 54 | const auto* to_decimal_type = | 157 | 54 | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | 54 | ToDataType::check_type_precision(to_precision); | 160 | 54 |
| 161 | 0 | to_scale = to_decimal_type->get_scale(); | 162 | 0 | ToDataType::check_type_scale(to_scale); | 163 | 0 | } | 164 | 54 | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | 54 | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 0 | to_precision = to_max_digits; | 167 | 54 | } |
function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE9EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_15DataTypeDecimalILSD_30EEESE_EEEEbSI_ Line | Count | Source | 114 | 428 | return false; | 115 | 428 | } | 116 | 428 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | 428 | IsDatelikeV2Types<ToDataType> || | 123 | 428 | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | 428 | return false; | 125 | 428 | } | 126 | 428 | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | 428 | using Types2 = std::decay_t<decltype(types2)>; | 129 | 428 | using FromDataType = typename Types2::LeftType; | 130 | 428 | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | 428 | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | 428 | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | 428 | return false; | 134 | 428 | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | 428 | using FromFieldType = typename FromDataType::FieldType; | 137 | 428 | using ToFieldType = typename ToDataType::FieldType; | 138 | 428 | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | | | 141 | | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | | from_precision = | 145 | | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | | | 149 | | UInt32 to_max_digits = 0; | 150 | | UInt32 to_precision = 0; | 151 | 428 | UInt32 to_scale = 0; | 152 | 428 | | 153 | 428 | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | 428 | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | 428 | const auto* to_decimal_type = | 157 | 428 | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | 428 | ToDataType::check_type_precision(to_precision); | 160 | 428 |
| 161 | 0 | to_scale = to_decimal_type->get_scale(); | 162 | 0 | ToDataType::check_type_scale(to_scale); | 163 | 0 | } | 164 | 428 | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | 428 | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 0 | to_precision = to_max_digits; | 167 | 428 | } |
function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE9EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_15DataTypeDecimalILSD_35EEESE_EEEEbSI_ Line | Count | Source | 114 | 286 | return false; | 115 | 286 | } | 116 | 286 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | 286 | IsDatelikeV2Types<ToDataType> || | 123 | 286 | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | 286 | return false; | 125 | 286 | } | 126 | 286 | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | 286 | using Types2 = std::decay_t<decltype(types2)>; | 129 | 286 | using FromDataType = typename Types2::LeftType; | 130 | 286 | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | 286 | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | 286 | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | 286 | return false; | 134 | 286 | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | 286 | using FromFieldType = typename FromDataType::FieldType; | 137 | 286 | using ToFieldType = typename ToDataType::FieldType; | 138 | 286 | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | | | 141 | | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | | from_precision = | 145 | | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | | | 149 | | UInt32 to_max_digits = 0; | 150 | | UInt32 to_precision = 0; | 151 | 286 | UInt32 to_scale = 0; | 152 | 286 | | 153 | 286 | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | 286 | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | 286 | const auto* to_decimal_type = | 157 | 286 | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | 286 | ToDataType::check_type_precision(to_precision); | 160 | 286 |
| 161 | 0 | to_scale = to_decimal_type->get_scale(); | 162 | 0 | ToDataType::check_type_scale(to_scale); | 163 | 0 | } | 164 | 286 | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | 286 | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 0 | to_precision = to_max_digits; | 167 | 286 | } |
Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE9EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_12DataTypeDateESE_EEEEbSI_ function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE9EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_14DataTypeDateV2ESE_EEEEbSI_ Line | Count | Source | 114 | 58 | return false; | 115 | 58 | } | 116 | 58 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | | IsDatelikeV2Types<ToDataType> || | 123 | | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | | return false; | 125 | | } | 126 | | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | | using Types2 = std::decay_t<decltype(types2)>; | 129 | | using FromDataType = typename Types2::LeftType; | 130 | | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | | return false; | 134 | | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | | using FromFieldType = typename FromDataType::FieldType; | 137 | | using ToFieldType = typename ToDataType::FieldType; | 138 | | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | | | 141 | | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | | from_precision = | 145 | | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | | | 149 | | UInt32 to_max_digits = 0; | 150 | | UInt32 to_precision = 0; | 151 | | UInt32 to_scale = 0; | 152 | | | 153 | | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | | const auto* to_decimal_type = | 157 | | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | | ToDataType::check_type_precision(to_precision); | 160 | | | 161 | | to_scale = to_decimal_type->get_scale(); | 162 | | ToDataType::check_type_scale(to_scale); | 163 | | } | 164 | | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 58 | to_precision = to_max_digits; | 167 | 58 | } |
function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE9EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_18DataTypeDateTimeV2ESE_EEEEbSI_ Line | Count | Source | 114 | 7.80k | return false; | 115 | 7.80k | } | 116 | 7.80k | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | | IsDatelikeV2Types<ToDataType> || | 123 | | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | | return false; | 125 | | } | 126 | | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | | using Types2 = std::decay_t<decltype(types2)>; | 129 | | using FromDataType = typename Types2::LeftType; | 130 | | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | | return false; | 134 | | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | | using FromFieldType = typename FromDataType::FieldType; | 137 | | using ToFieldType = typename ToDataType::FieldType; | 138 | | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | | | 141 | | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | | from_precision = | 145 | | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | | | 149 | | UInt32 to_max_digits = 0; | 150 | | UInt32 to_precision = 0; | 151 | | UInt32 to_scale = 0; | 152 | | | 153 | | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | | const auto* to_decimal_type = | 157 | | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | | ToDataType::check_type_precision(to_precision); | 160 | | | 161 | | to_scale = to_decimal_type->get_scale(); | 162 | | ToDataType::check_type_scale(to_scale); | 163 | | } | 164 | | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 7.80k | to_precision = to_max_digits; | 167 | 7.80k | } |
Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE9EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_16DataTypeDateTimeESE_EEEEbSI_ function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE9EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_14DataTypeTimeV2ESE_EEEEbSI_ Line | Count | Source | 114 | 162 | return false; | 115 | 162 | } | 116 | 162 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | | IsDatelikeV2Types<ToDataType> || | 123 | | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | | return false; | 125 | | } | 126 | | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | | using Types2 = std::decay_t<decltype(types2)>; | 129 | | using FromDataType = typename Types2::LeftType; | 130 | | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | | return false; | 134 | | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | | using FromFieldType = typename FromDataType::FieldType; | 137 | | using ToFieldType = typename ToDataType::FieldType; | 138 | | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | | | 141 | | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | | from_precision = | 145 | | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | | | 149 | | UInt32 to_max_digits = 0; | 150 | | UInt32 to_precision = 0; | 151 | | UInt32 to_scale = 0; | 152 | | | 153 | | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | | const auto* to_decimal_type = | 157 | | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | | ToDataType::check_type_precision(to_precision); | 160 | | | 161 | | to_scale = to_decimal_type->get_scale(); | 162 | | ToDataType::check_type_scale(to_scale); | 163 | | } | 164 | | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 162 | to_precision = to_max_digits; | 167 | 162 | } |
Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE9EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_19DataTypeTimeStampTzESE_EEEEbSI_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE9EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_12DataTypeIPv4ESE_EEEEbSI_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE9EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_12DataTypeIPv6ESE_EEEEbSI_ function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE9EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_14DataTypeStringESE_EEEEbSI_ Line | Count | Source | 114 | 5.67k | return false; | 115 | 5.67k | } | 116 | 5.67k | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | 5.67k | using ToDataType = typename Types::LeftType; | 120 | 5.67k | | 121 | 5.67k | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | | IsDatelikeV2Types<ToDataType> || | 123 | | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | | return false; | 125 | | } | 126 | | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | | using Types2 = std::decay_t<decltype(types2)>; | 129 | | using FromDataType = typename Types2::LeftType; | 130 | | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | | return false; | 134 | | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | | using FromFieldType = typename FromDataType::FieldType; | 137 | | using ToFieldType = typename ToDataType::FieldType; | 138 | | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | | | 141 | | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | | from_precision = | 145 | | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | | | 149 | | UInt32 to_max_digits = 0; | 150 | | UInt32 to_precision = 0; | 151 | | UInt32 to_scale = 0; | 152 | | | 153 | | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | | const auto* to_decimal_type = | 157 | | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | | ToDataType::check_type_precision(to_precision); | 160 | | | 161 | | to_scale = to_decimal_type->get_scale(); | 162 | | ToDataType::check_type_scale(to_scale); | 163 | | } | 164 | | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 5.67k | to_precision = to_max_digits; | 167 | 5.67k | } |
function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_15DataTypeDecimalILNS_13PrimitiveTypeE28EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_14DataTypeNumberILSD_2EEESE_EEEEbSI_ Line | Count | Source | 114 | 19 | return false; | 115 | 19 | } | 116 | 19 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | 19 | IsDatelikeV2Types<ToDataType> || | 123 | 19 | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | 19 | return false; | 125 | 19 | } | 126 | 19 | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | | using Types2 = std::decay_t<decltype(types2)>; | 129 | | using FromDataType = typename Types2::LeftType; | 130 | | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | | return false; | 134 | | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | 19 | using FromFieldType = typename FromDataType::FieldType; | 137 | 19 | using ToFieldType = typename ToDataType::FieldType; | 138 | 19 | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | 19 | | 141 | 19 | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | 19 | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | 19 | from_precision = | 145 | 19 | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | 19 | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | 19 | | 149 | 19 | UInt32 to_max_digits = 0; | 150 | 19 | UInt32 to_precision = 0; | 151 | | UInt32 to_scale = 0; | 152 | | | 153 | | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | 19 | const auto* to_decimal_type = | 157 | 19 | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | 19 | ToDataType::check_type_precision(to_precision); | 160 | 19 | | 161 | 18 | to_scale = to_decimal_type->get_scale(); | 162 | 18 | ToDataType::check_type_scale(to_scale); | 163 | 18 | } | 164 | 19 | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | 19 | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 0 | to_precision = to_max_digits; | 167 | 19 | } |
function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_15DataTypeDecimalILNS_13PrimitiveTypeE28EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_14DataTypeNumberILSD_3EEESE_EEEEbSI_ Line | Count | Source | 114 | 357 | return false; | 115 | 357 | } | 116 | 357 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | 357 | IsDatelikeV2Types<ToDataType> || | 123 | 357 | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | 357 | return false; | 125 | 357 | } | 126 | 357 | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | | using Types2 = std::decay_t<decltype(types2)>; | 129 | | using FromDataType = typename Types2::LeftType; | 130 | | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | | return false; | 134 | | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | 357 | using FromFieldType = typename FromDataType::FieldType; | 137 | 357 | using ToFieldType = typename ToDataType::FieldType; | 138 | 357 | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | 357 | | 141 | 357 | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | 357 | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | 357 | from_precision = | 145 | 357 | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | 357 | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | 357 | | 149 | 357 | UInt32 to_max_digits = 0; | 150 | 357 | UInt32 to_precision = 0; | 151 | | UInt32 to_scale = 0; | 152 | | | 153 | | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | 357 | const auto* to_decimal_type = | 157 | 357 | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | 357 | ToDataType::check_type_precision(to_precision); | 160 | 357 | | 161 | 224 | to_scale = to_decimal_type->get_scale(); | 162 | 224 | ToDataType::check_type_scale(to_scale); | 163 | 224 | } | 164 | 357 | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | 357 | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 0 | to_precision = to_max_digits; | 167 | 357 | } |
function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_15DataTypeDecimalILNS_13PrimitiveTypeE28EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_14DataTypeNumberILSD_4EEESE_EEEEbSI_ Line | Count | Source | 114 | 353 | return false; | 115 | 353 | } | 116 | 353 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | 353 | IsDatelikeV2Types<ToDataType> || | 123 | 353 | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | 353 | return false; | 125 | 353 | } | 126 | 353 | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | | using Types2 = std::decay_t<decltype(types2)>; | 129 | | using FromDataType = typename Types2::LeftType; | 130 | | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | | return false; | 134 | | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | 353 | using FromFieldType = typename FromDataType::FieldType; | 137 | 353 | using ToFieldType = typename ToDataType::FieldType; | 138 | 353 | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | 353 | | 141 | 353 | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | 353 | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | 353 | from_precision = | 145 | 353 | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | 353 | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | 353 | | 149 | 353 | UInt32 to_max_digits = 0; | 150 | 353 | UInt32 to_precision = 0; | 151 | | UInt32 to_scale = 0; | 152 | | | 153 | | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | 353 | const auto* to_decimal_type = | 157 | 353 | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | 353 | ToDataType::check_type_precision(to_precision); | 160 | 353 | | 161 | 182 | to_scale = to_decimal_type->get_scale(); | 162 | 182 | ToDataType::check_type_scale(to_scale); | 163 | 182 | } | 164 | 353 | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | 353 | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 0 | to_precision = to_max_digits; | 167 | 353 | } |
function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_15DataTypeDecimalILNS_13PrimitiveTypeE28EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_14DataTypeNumberILSD_5EEESE_EEEEbSI_ Line | Count | Source | 114 | 365 | return false; | 115 | 365 | } | 116 | 365 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | 365 | IsDatelikeV2Types<ToDataType> || | 123 | 365 | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | 365 | return false; | 125 | 365 | } | 126 | 365 | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | | using Types2 = std::decay_t<decltype(types2)>; | 129 | | using FromDataType = typename Types2::LeftType; | 130 | | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | | return false; | 134 | | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | 365 | using FromFieldType = typename FromDataType::FieldType; | 137 | 365 | using ToFieldType = typename ToDataType::FieldType; | 138 | 365 | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | 365 | | 141 | 365 | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | 365 | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | 365 | from_precision = | 145 | 365 | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | 365 | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | 365 | | 149 | 365 | UInt32 to_max_digits = 0; | 150 | 365 | UInt32 to_precision = 0; | 151 | | UInt32 to_scale = 0; | 152 | | | 153 | | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | 365 | const auto* to_decimal_type = | 157 | 365 | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | 365 | ToDataType::check_type_precision(to_precision); | 160 | 365 | | 161 | 188 | to_scale = to_decimal_type->get_scale(); | 162 | 188 | ToDataType::check_type_scale(to_scale); | 163 | 188 | } | 164 | 365 | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | 365 | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 0 | to_precision = to_max_digits; | 167 | 365 | } |
function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_15DataTypeDecimalILNS_13PrimitiveTypeE28EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_14DataTypeNumberILSD_6EEESE_EEEEbSI_ Line | Count | Source | 114 | 423 | return false; | 115 | 423 | } | 116 | 423 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | 423 | IsDatelikeV2Types<ToDataType> || | 123 | 423 | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | 423 | return false; | 125 | 423 | } | 126 | 423 | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | | using Types2 = std::decay_t<decltype(types2)>; | 129 | | using FromDataType = typename Types2::LeftType; | 130 | | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | | return false; | 134 | | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | 423 | using FromFieldType = typename FromDataType::FieldType; | 137 | 423 | using ToFieldType = typename ToDataType::FieldType; | 138 | 423 | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | 423 | | 141 | 423 | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | 423 | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | 423 | from_precision = | 145 | 423 | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | 423 | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | 423 | | 149 | 423 | UInt32 to_max_digits = 0; | 150 | 423 | UInt32 to_precision = 0; | 151 | | UInt32 to_scale = 0; | 152 | | | 153 | | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | 423 | const auto* to_decimal_type = | 157 | 423 | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | 423 | ToDataType::check_type_precision(to_precision); | 160 | 423 | | 161 | 174 | to_scale = to_decimal_type->get_scale(); | 162 | 174 | ToDataType::check_type_scale(to_scale); | 163 | 174 | } | 164 | 423 | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | 423 | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 0 | to_precision = to_max_digits; | 167 | 423 | } |
function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_15DataTypeDecimalILNS_13PrimitiveTypeE28EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_14DataTypeNumberILSD_7EEESE_EEEEbSI_ Line | Count | Source | 114 | 361 | return false; | 115 | 361 | } | 116 | 361 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | 361 | IsDatelikeV2Types<ToDataType> || | 123 | 361 | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | 361 | return false; | 125 | 361 | } | 126 | 361 | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | | using Types2 = std::decay_t<decltype(types2)>; | 129 | | using FromDataType = typename Types2::LeftType; | 130 | | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | | return false; | 134 | | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | 361 | using FromFieldType = typename FromDataType::FieldType; | 137 | 361 | using ToFieldType = typename ToDataType::FieldType; | 138 | 361 | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | 361 | | 141 | 361 | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | 361 | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | 361 | from_precision = | 145 | 361 | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | 361 | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | 361 | | 149 | 361 | UInt32 to_max_digits = 0; | 150 | 361 | UInt32 to_precision = 0; | 151 | | UInt32 to_scale = 0; | 152 | | | 153 | | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | 361 | const auto* to_decimal_type = | 157 | 361 | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | 361 | ToDataType::check_type_precision(to_precision); | 160 | 361 | | 161 | 186 | to_scale = to_decimal_type->get_scale(); | 162 | 186 | ToDataType::check_type_scale(to_scale); | 163 | 186 | } | 164 | 361 | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | 361 | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 0 | to_precision = to_max_digits; | 167 | 361 | } |
function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_15DataTypeDecimalILNS_13PrimitiveTypeE28EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_14DataTypeNumberILSD_8EEESE_EEEEbSI_ Line | Count | Source | 114 | 104 | return false; | 115 | 104 | } | 116 | 104 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | 104 | IsDatelikeV2Types<ToDataType> || | 123 | 104 | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | 104 | return false; | 125 | 104 | } | 126 | 104 | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | | using Types2 = std::decay_t<decltype(types2)>; | 129 | | using FromDataType = typename Types2::LeftType; | 130 | | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | | return false; | 134 | | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | 104 | using FromFieldType = typename FromDataType::FieldType; | 137 | 104 | using ToFieldType = typename ToDataType::FieldType; | 138 | 104 | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | 104 | | 141 | 104 | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | 104 | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | 104 | from_precision = | 145 | 104 | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | 104 | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | 104 | | 149 | 104 | UInt32 to_max_digits = 0; | 150 | 104 | UInt32 to_precision = 0; | 151 | | UInt32 to_scale = 0; | 152 | | | 153 | | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | 104 | const auto* to_decimal_type = | 157 | 104 | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | 104 | ToDataType::check_type_precision(to_precision); | 160 | 104 | | 161 | 68 | to_scale = to_decimal_type->get_scale(); | 162 | 68 | ToDataType::check_type_scale(to_scale); | 163 | 68 | } | 164 | 104 | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | 104 | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 0 | to_precision = to_max_digits; | 167 | 104 | } |
function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_15DataTypeDecimalILNS_13PrimitiveTypeE28EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_14DataTypeNumberILSD_9EEESE_EEEEbSI_ Line | Count | Source | 114 | 308 | return false; | 115 | 308 | } | 116 | 308 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | 308 | IsDatelikeV2Types<ToDataType> || | 123 | 308 | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | 308 | return false; | 125 | 308 | } | 126 | 308 | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | | using Types2 = std::decay_t<decltype(types2)>; | 129 | | using FromDataType = typename Types2::LeftType; | 130 | | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | | return false; | 134 | | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | 308 | using FromFieldType = typename FromDataType::FieldType; | 137 | 308 | using ToFieldType = typename ToDataType::FieldType; | 138 | 308 | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | 308 | | 141 | 308 | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | 308 | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | 308 | from_precision = | 145 | 308 | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | 308 | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | 308 | | 149 | 308 | UInt32 to_max_digits = 0; | 150 | 308 | UInt32 to_precision = 0; | 151 | | UInt32 to_scale = 0; | 152 | | | 153 | | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | 308 | const auto* to_decimal_type = | 157 | 308 | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | 308 | ToDataType::check_type_precision(to_precision); | 160 | 308 | | 161 | 258 | to_scale = to_decimal_type->get_scale(); | 162 | 258 | ToDataType::check_type_scale(to_scale); | 163 | 258 | } | 164 | 308 | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | 308 | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 0 | to_precision = to_max_digits; | 167 | 308 | } |
function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_15DataTypeDecimalILNS_13PrimitiveTypeE28EEEvEEEEbRKT_ENKUlSI_E_clINSB_ISE_SE_EEEEbSI_ Line | Count | Source | 114 | 414 | return false; | 115 | 414 | } | 116 | 414 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | 414 | IsDatelikeV2Types<ToDataType> || | 123 | 414 | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | 414 | return false; | 125 | 414 | } | 126 | 414 | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | 414 | using Types2 = std::decay_t<decltype(types2)>; | 129 | 414 | using FromDataType = typename Types2::LeftType; | 130 | 414 | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | 414 | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | 414 | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | 414 | return false; | 134 | 414 | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | 414 | using FromFieldType = typename FromDataType::FieldType; | 137 | 414 | using ToFieldType = typename ToDataType::FieldType; | 138 | 414 | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | 414 | | 141 | 414 | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | 414 | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | 414 | from_precision = | 145 | 414 | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | 414 | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | 414 | | 149 | 414 | UInt32 to_max_digits = 0; | 150 | 414 | UInt32 to_precision = 0; | 151 | | UInt32 to_scale = 0; | 152 | | | 153 | | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | 414 | const auto* to_decimal_type = | 157 | 414 | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | 414 | ToDataType::check_type_precision(to_precision); | 160 | 414 | | 161 | 87 | to_scale = to_decimal_type->get_scale(); | 162 | 87 | ToDataType::check_type_scale(to_scale); | 163 | 87 | } | 164 | 414 | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | 414 | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 0 | to_precision = to_max_digits; | 167 | 414 | } |
function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_15DataTypeDecimalILNS_13PrimitiveTypeE28EEEvEEEEbRKT_ENKUlSI_E_clINSB_INSC_ILSD_29EEESE_EEEEbSI_ Line | Count | Source | 114 | 508 | return false; | 115 | 508 | } | 116 | 508 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | 508 | IsDatelikeV2Types<ToDataType> || | 123 | 508 | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | 508 | return false; | 125 | 508 | } | 126 | 508 | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | 508 | using Types2 = std::decay_t<decltype(types2)>; | 129 | 508 | using FromDataType = typename Types2::LeftType; | 130 | 508 | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | 508 | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | 508 | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | 508 | return false; | 134 | 508 | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | 508 | using FromFieldType = typename FromDataType::FieldType; | 137 | 508 | using ToFieldType = typename ToDataType::FieldType; | 138 | 508 | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | 508 | | 141 | 508 | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | 508 | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | 508 | from_precision = | 145 | 508 | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | 508 | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | 508 | | 149 | 508 | UInt32 to_max_digits = 0; | 150 | 508 | UInt32 to_precision = 0; | 151 | | UInt32 to_scale = 0; | 152 | | | 153 | | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | 508 | const auto* to_decimal_type = | 157 | 508 | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | 508 | ToDataType::check_type_precision(to_precision); | 160 | 508 | | 161 | 86 | to_scale = to_decimal_type->get_scale(); | 162 | 86 | ToDataType::check_type_scale(to_scale); | 163 | 86 | } | 164 | 508 | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | 508 | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 0 | to_precision = to_max_digits; | 167 | 508 | } |
function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_15DataTypeDecimalILNS_13PrimitiveTypeE28EEEvEEEEbRKT_ENKUlSI_E_clINSB_INSC_ILSD_20EEESE_EEEEbSI_ Line | Count | Source | 114 | 206 | return false; | 115 | 206 | } | 116 | 206 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | 206 | IsDatelikeV2Types<ToDataType> || | 123 | 206 | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | 206 | return false; | 125 | 206 | } | 126 | 206 | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | 206 | using Types2 = std::decay_t<decltype(types2)>; | 129 | 206 | using FromDataType = typename Types2::LeftType; | 130 | 206 | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | 206 | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | 206 | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | 206 | return false; | 134 | 206 | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | 206 | using FromFieldType = typename FromDataType::FieldType; | 137 | 206 | using ToFieldType = typename ToDataType::FieldType; | 138 | 206 | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | 206 | | 141 | 206 | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | 206 | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | 206 | from_precision = | 145 | 206 | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | 206 | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | 206 | | 149 | 206 | UInt32 to_max_digits = 0; | 150 | 206 | UInt32 to_precision = 0; | 151 | | UInt32 to_scale = 0; | 152 | | | 153 | | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | 206 | const auto* to_decimal_type = | 157 | 206 | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | 206 | ToDataType::check_type_precision(to_precision); | 160 | 206 |
| 161 | 0 | to_scale = to_decimal_type->get_scale(); | 162 | 0 | ToDataType::check_type_scale(to_scale); | 163 | 0 | } | 164 | 206 | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | 206 | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 0 | to_precision = to_max_digits; | 167 | 206 | } |
function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_15DataTypeDecimalILNS_13PrimitiveTypeE28EEEvEEEEbRKT_ENKUlSI_E_clINSB_INSC_ILSD_30EEESE_EEEEbSI_ Line | Count | Source | 114 | 326 | return false; | 115 | 326 | } | 116 | 326 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | 326 | IsDatelikeV2Types<ToDataType> || | 123 | 326 | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | 326 | return false; | 125 | 326 | } | 126 | 326 | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | 326 | using Types2 = std::decay_t<decltype(types2)>; | 129 | 326 | using FromDataType = typename Types2::LeftType; | 130 | 326 | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | 326 | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | 326 | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | 326 | return false; | 134 | 326 | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | 326 | using FromFieldType = typename FromDataType::FieldType; | 137 | 326 | using ToFieldType = typename ToDataType::FieldType; | 138 | 326 | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | 326 | | 141 | 326 | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | 326 | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | 326 | from_precision = | 145 | 326 | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | 326 | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | 326 | | 149 | 326 | UInt32 to_max_digits = 0; | 150 | 326 | UInt32 to_precision = 0; | 151 | | UInt32 to_scale = 0; | 152 | | | 153 | | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | 326 | const auto* to_decimal_type = | 157 | 326 | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | 326 | ToDataType::check_type_precision(to_precision); | 160 | 326 | | 161 | 85 | to_scale = to_decimal_type->get_scale(); | 162 | 85 | ToDataType::check_type_scale(to_scale); | 163 | 85 | } | 164 | 326 | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | 326 | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 0 | to_precision = to_max_digits; | 167 | 326 | } |
function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_15DataTypeDecimalILNS_13PrimitiveTypeE28EEEvEEEEbRKT_ENKUlSI_E_clINSB_INSC_ILSD_35EEESE_EEEEbSI_ Line | Count | Source | 114 | 303 | return false; | 115 | 303 | } | 116 | 303 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | 303 | IsDatelikeV2Types<ToDataType> || | 123 | 303 | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | 303 | return false; | 125 | 303 | } | 126 | 303 | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | 303 | using Types2 = std::decay_t<decltype(types2)>; | 129 | 303 | using FromDataType = typename Types2::LeftType; | 130 | 303 | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | 303 | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | 303 | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | 303 | return false; | 134 | 303 | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | 303 | using FromFieldType = typename FromDataType::FieldType; | 137 | 303 | using ToFieldType = typename ToDataType::FieldType; | 138 | 303 | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | 303 | | 141 | 303 | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | 303 | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | 303 | from_precision = | 145 | 303 | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | 303 | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | 303 | | 149 | 303 | UInt32 to_max_digits = 0; | 150 | 303 | UInt32 to_precision = 0; | 151 | | UInt32 to_scale = 0; | 152 | | | 153 | | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | 303 | const auto* to_decimal_type = | 157 | 303 | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | 303 | ToDataType::check_type_precision(to_precision); | 160 | 303 | | 161 | 79 | to_scale = to_decimal_type->get_scale(); | 162 | 79 | ToDataType::check_type_scale(to_scale); | 163 | 79 | } | 164 | 303 | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | 303 | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 0 | to_precision = to_max_digits; | 167 | 303 | } |
Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_15DataTypeDecimalILNS_13PrimitiveTypeE28EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_12DataTypeDateESE_EEEEbSI_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_15DataTypeDecimalILNS_13PrimitiveTypeE28EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_14DataTypeDateV2ESE_EEEEbSI_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_15DataTypeDecimalILNS_13PrimitiveTypeE28EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_18DataTypeDateTimeV2ESE_EEEEbSI_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_15DataTypeDecimalILNS_13PrimitiveTypeE28EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_16DataTypeDateTimeESE_EEEEbSI_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_15DataTypeDecimalILNS_13PrimitiveTypeE28EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_14DataTypeTimeV2ESE_EEEEbSI_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_15DataTypeDecimalILNS_13PrimitiveTypeE28EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_19DataTypeTimeStampTzESE_EEEEbSI_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_15DataTypeDecimalILNS_13PrimitiveTypeE28EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_12DataTypeIPv4ESE_EEEEbSI_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_15DataTypeDecimalILNS_13PrimitiveTypeE28EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_12DataTypeIPv6ESE_EEEEbSI_ function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_15DataTypeDecimalILNS_13PrimitiveTypeE28EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_14DataTypeStringESE_EEEEbSI_ Line | Count | Source | 114 | 2.50k | return false; | 115 | 2.50k | } | 116 | 2.50k | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | 2.50k | using ToDataType = typename Types::LeftType; | 120 | 2.50k | | 121 | 2.50k | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | 2.50k | IsDatelikeV2Types<ToDataType> || | 123 | 2.50k | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | 2.50k | return false; | 125 | 2.50k | } | 126 | 2.50k | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | | using Types2 = std::decay_t<decltype(types2)>; | 129 | | using FromDataType = typename Types2::LeftType; | 130 | | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | | return false; | 134 | | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | 2.50k | using FromFieldType = typename FromDataType::FieldType; | 137 | 2.50k | using ToFieldType = typename ToDataType::FieldType; | 138 | 2.50k | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | 2.50k | | 141 | 2.50k | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | 2.50k | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | 2.50k | from_precision = | 145 | 2.50k | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | 2.50k | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | 2.50k | | 149 | 2.50k | UInt32 to_max_digits = 0; | 150 | 2.50k | UInt32 to_precision = 0; | 151 | | UInt32 to_scale = 0; | 152 | | | 153 | | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | 2.50k | const auto* to_decimal_type = | 157 | 2.50k | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | 2.50k | ToDataType::check_type_precision(to_precision); | 160 | 2.50k |
| 161 | 0 | to_scale = to_decimal_type->get_scale(); | 162 | 0 | ToDataType::check_type_scale(to_scale); | 163 | 0 | } | 164 | 2.50k | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | 2.50k | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 0 | to_precision = to_max_digits; | 167 | 2.50k | } |
function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_15DataTypeDecimalILNS_13PrimitiveTypeE29EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_14DataTypeNumberILSD_2EEESE_EEEEbSI_ Line | Count | Source | 114 | 17 | return false; | 115 | 17 | } | 116 | 17 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | 17 | IsDatelikeV2Types<ToDataType> || | 123 | 17 | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | 17 | return false; | 125 | 17 | } | 126 | 17 | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | | using Types2 = std::decay_t<decltype(types2)>; | 129 | | using FromDataType = typename Types2::LeftType; | 130 | | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | | return false; | 134 | | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | 17 | using FromFieldType = typename FromDataType::FieldType; | 137 | 17 | using ToFieldType = typename ToDataType::FieldType; | 138 | 17 | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | 17 | | 141 | 17 | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | 17 | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | 17 | from_precision = | 145 | 17 | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | 17 | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | 17 | | 149 | 17 | UInt32 to_max_digits = 0; | 150 | 17 | UInt32 to_precision = 0; | 151 | | UInt32 to_scale = 0; | 152 | | | 153 | | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | 17 | const auto* to_decimal_type = | 157 | 17 | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | 17 | ToDataType::check_type_precision(to_precision); | 160 | 17 | | 161 | 16 | to_scale = to_decimal_type->get_scale(); | 162 | 16 | ToDataType::check_type_scale(to_scale); | 163 | 16 | } | 164 | 17 | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | 17 | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 0 | to_precision = to_max_digits; | 167 | 17 | } |
function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_15DataTypeDecimalILNS_13PrimitiveTypeE29EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_14DataTypeNumberILSD_3EEESE_EEEEbSI_ Line | Count | Source | 114 | 72 | return false; | 115 | 72 | } | 116 | 72 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | 72 | IsDatelikeV2Types<ToDataType> || | 123 | 72 | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | 72 | return false; | 125 | 72 | } | 126 | 72 | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | | using Types2 = std::decay_t<decltype(types2)>; | 129 | | using FromDataType = typename Types2::LeftType; | 130 | | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | | return false; | 134 | | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | 72 | using FromFieldType = typename FromDataType::FieldType; | 137 | 72 | using ToFieldType = typename ToDataType::FieldType; | 138 | 72 | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | 72 | | 141 | 72 | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | 72 | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | 72 | from_precision = | 145 | 72 | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | 72 | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | 72 | | 149 | 72 | UInt32 to_max_digits = 0; | 150 | 72 | UInt32 to_precision = 0; | 151 | | UInt32 to_scale = 0; | 152 | | | 153 | | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | 72 | const auto* to_decimal_type = | 157 | 72 | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | 72 | ToDataType::check_type_precision(to_precision); | 160 | 72 | | 161 | 59 | to_scale = to_decimal_type->get_scale(); | 162 | 59 | ToDataType::check_type_scale(to_scale); | 163 | 59 | } | 164 | 72 | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | 72 | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 0 | to_precision = to_max_digits; | 167 | 72 | } |
function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_15DataTypeDecimalILNS_13PrimitiveTypeE29EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_14DataTypeNumberILSD_4EEESE_EEEEbSI_ Line | Count | Source | 114 | 49 | return false; | 115 | 49 | } | 116 | 49 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | 49 | IsDatelikeV2Types<ToDataType> || | 123 | 49 | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | 49 | return false; | 125 | 49 | } | 126 | 49 | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | | using Types2 = std::decay_t<decltype(types2)>; | 129 | | using FromDataType = typename Types2::LeftType; | 130 | | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | | return false; | 134 | | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | 49 | using FromFieldType = typename FromDataType::FieldType; | 137 | 49 | using ToFieldType = typename ToDataType::FieldType; | 138 | 49 | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | 49 | | 141 | 49 | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | 49 | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | 49 | from_precision = | 145 | 49 | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | 49 | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | 49 | | 149 | 49 | UInt32 to_max_digits = 0; | 150 | 49 | UInt32 to_precision = 0; | 151 | | UInt32 to_scale = 0; | 152 | | | 153 | | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | 49 | const auto* to_decimal_type = | 157 | 49 | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | 49 | ToDataType::check_type_precision(to_precision); | 160 | 49 | | 161 | 38 | to_scale = to_decimal_type->get_scale(); | 162 | 38 | ToDataType::check_type_scale(to_scale); | 163 | 38 | } | 164 | 49 | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | 49 | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 0 | to_precision = to_max_digits; | 167 | 49 | } |
function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_15DataTypeDecimalILNS_13PrimitiveTypeE29EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_14DataTypeNumberILSD_5EEESE_EEEEbSI_ Line | Count | Source | 114 | 480 | return false; | 115 | 480 | } | 116 | 480 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | 480 | IsDatelikeV2Types<ToDataType> || | 123 | 480 | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | 480 | return false; | 125 | 480 | } | 126 | 480 | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | | using Types2 = std::decay_t<decltype(types2)>; | 129 | | using FromDataType = typename Types2::LeftType; | 130 | | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | | return false; | 134 | | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | 480 | using FromFieldType = typename FromDataType::FieldType; | 137 | 480 | using ToFieldType = typename ToDataType::FieldType; | 138 | 480 | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | 480 | | 141 | 480 | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | 480 | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | 480 | from_precision = | 145 | 480 | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | 480 | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | 480 | | 149 | 480 | UInt32 to_max_digits = 0; | 150 | 480 | UInt32 to_precision = 0; | 151 | | UInt32 to_scale = 0; | 152 | | | 153 | | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | 480 | const auto* to_decimal_type = | 157 | 480 | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | 480 | ToDataType::check_type_precision(to_precision); | 160 | 480 | | 161 | 319 | to_scale = to_decimal_type->get_scale(); | 162 | 319 | ToDataType::check_type_scale(to_scale); | 163 | 319 | } | 164 | 480 | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | 480 | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 0 | to_precision = to_max_digits; | 167 | 480 | } |
function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_15DataTypeDecimalILNS_13PrimitiveTypeE29EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_14DataTypeNumberILSD_6EEESE_EEEEbSI_ Line | Count | Source | 114 | 52 | return false; | 115 | 52 | } | 116 | 52 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | 52 | IsDatelikeV2Types<ToDataType> || | 123 | 52 | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | 52 | return false; | 125 | 52 | } | 126 | 52 | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | | using Types2 = std::decay_t<decltype(types2)>; | 129 | | using FromDataType = typename Types2::LeftType; | 130 | | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | | return false; | 134 | | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | 52 | using FromFieldType = typename FromDataType::FieldType; | 137 | 52 | using ToFieldType = typename ToDataType::FieldType; | 138 | 52 | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | 52 | | 141 | 52 | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | 52 | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | 52 | from_precision = | 145 | 52 | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | 52 | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | 52 | | 149 | 52 | UInt32 to_max_digits = 0; | 150 | 52 | UInt32 to_precision = 0; | 151 | | UInt32 to_scale = 0; | 152 | | | 153 | | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | 52 | const auto* to_decimal_type = | 157 | 52 | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | 52 | ToDataType::check_type_precision(to_precision); | 160 | 52 | | 161 | 31 | to_scale = to_decimal_type->get_scale(); | 162 | 31 | ToDataType::check_type_scale(to_scale); | 163 | 31 | } | 164 | 52 | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | 52 | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 0 | to_precision = to_max_digits; | 167 | 52 | } |
function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_15DataTypeDecimalILNS_13PrimitiveTypeE29EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_14DataTypeNumberILSD_7EEESE_EEEEbSI_ Line | Count | Source | 114 | 65 | return false; | 115 | 65 | } | 116 | 65 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | 65 | IsDatelikeV2Types<ToDataType> || | 123 | 65 | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | 65 | return false; | 125 | 65 | } | 126 | 65 | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | | using Types2 = std::decay_t<decltype(types2)>; | 129 | | using FromDataType = typename Types2::LeftType; | 130 | | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | | return false; | 134 | | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | 65 | using FromFieldType = typename FromDataType::FieldType; | 137 | 65 | using ToFieldType = typename ToDataType::FieldType; | 138 | 65 | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | 65 | | 141 | 65 | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | 65 | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | 65 | from_precision = | 145 | 65 | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | 65 | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | 65 | | 149 | 65 | UInt32 to_max_digits = 0; | 150 | 65 | UInt32 to_precision = 0; | 151 | | UInt32 to_scale = 0; | 152 | | | 153 | | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | 65 | const auto* to_decimal_type = | 157 | 65 | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | 65 | ToDataType::check_type_precision(to_precision); | 160 | 65 | | 161 | 39 | to_scale = to_decimal_type->get_scale(); | 162 | 39 | ToDataType::check_type_scale(to_scale); | 163 | 39 | } | 164 | 65 | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | 65 | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 0 | to_precision = to_max_digits; | 167 | 65 | } |
function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_15DataTypeDecimalILNS_13PrimitiveTypeE29EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_14DataTypeNumberILSD_8EEESE_EEEEbSI_ Line | Count | Source | 114 | 107 | return false; | 115 | 107 | } | 116 | 107 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | 107 | IsDatelikeV2Types<ToDataType> || | 123 | 107 | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | 107 | return false; | 125 | 107 | } | 126 | 107 | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | | using Types2 = std::decay_t<decltype(types2)>; | 129 | | using FromDataType = typename Types2::LeftType; | 130 | | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | | return false; | 134 | | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | 107 | using FromFieldType = typename FromDataType::FieldType; | 137 | 107 | using ToFieldType = typename ToDataType::FieldType; | 138 | 107 | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | 107 | | 141 | 107 | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | 107 | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | 107 | from_precision = | 145 | 107 | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | 107 | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | 107 | | 149 | 107 | UInt32 to_max_digits = 0; | 150 | 107 | UInt32 to_precision = 0; | 151 | | UInt32 to_scale = 0; | 152 | | | 153 | | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | 107 | const auto* to_decimal_type = | 157 | 107 | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | 107 | ToDataType::check_type_precision(to_precision); | 160 | 107 | | 161 | 65 | to_scale = to_decimal_type->get_scale(); | 162 | 65 | ToDataType::check_type_scale(to_scale); | 163 | 65 | } | 164 | 107 | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | 107 | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 0 | to_precision = to_max_digits; | 167 | 107 | } |
function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_15DataTypeDecimalILNS_13PrimitiveTypeE29EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_14DataTypeNumberILSD_9EEESE_EEEEbSI_ Line | Count | Source | 114 | 210 | return false; | 115 | 210 | } | 116 | 210 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | 210 | IsDatelikeV2Types<ToDataType> || | 123 | 210 | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | 210 | return false; | 125 | 210 | } | 126 | 210 | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | | using Types2 = std::decay_t<decltype(types2)>; | 129 | | using FromDataType = typename Types2::LeftType; | 130 | | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | | return false; | 134 | | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | 210 | using FromFieldType = typename FromDataType::FieldType; | 137 | 210 | using ToFieldType = typename ToDataType::FieldType; | 138 | 210 | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | 210 | | 141 | 210 | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | 210 | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | 210 | from_precision = | 145 | 210 | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | 210 | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | 210 | | 149 | 210 | UInt32 to_max_digits = 0; | 150 | 210 | UInt32 to_precision = 0; | 151 | | UInt32 to_scale = 0; | 152 | | | 153 | | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | 210 | const auto* to_decimal_type = | 157 | 210 | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | 210 | ToDataType::check_type_precision(to_precision); | 160 | 210 | | 161 | 177 | to_scale = to_decimal_type->get_scale(); | 162 | 177 | ToDataType::check_type_scale(to_scale); | 163 | 177 | } | 164 | 210 | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | 210 | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 0 | to_precision = to_max_digits; | 167 | 210 | } |
function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_15DataTypeDecimalILNS_13PrimitiveTypeE29EEEvEEEEbRKT_ENKUlSI_E_clINSB_INSC_ILSD_28EEESE_EEEEbSI_ Line | Count | Source | 114 | 1.11k | return false; | 115 | 1.11k | } | 116 | 1.11k | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | 1.11k | IsDatelikeV2Types<ToDataType> || | 123 | 1.11k | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | 1.11k | return false; | 125 | 1.11k | } | 126 | 1.11k | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | 1.11k | using Types2 = std::decay_t<decltype(types2)>; | 129 | 1.11k | using FromDataType = typename Types2::LeftType; | 130 | 1.11k | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | 1.11k | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | 1.11k | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | 1.11k | return false; | 134 | 1.11k | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | 1.11k | using FromFieldType = typename FromDataType::FieldType; | 137 | 1.11k | using ToFieldType = typename ToDataType::FieldType; | 138 | 1.11k | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | 1.11k | | 141 | 1.11k | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | 1.11k | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | 1.11k | from_precision = | 145 | 1.11k | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | 1.11k | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | 1.11k | | 149 | 1.11k | UInt32 to_max_digits = 0; | 150 | 1.11k | UInt32 to_precision = 0; | 151 | | UInt32 to_scale = 0; | 152 | | | 153 | | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | 1.11k | const auto* to_decimal_type = | 157 | 1.11k | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | 1.11k | ToDataType::check_type_precision(to_precision); | 160 | 1.11k | | 161 | 771 | to_scale = to_decimal_type->get_scale(); | 162 | 771 | ToDataType::check_type_scale(to_scale); | 163 | 771 | } | 164 | 1.11k | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | 1.11k | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 0 | to_precision = to_max_digits; | 167 | 1.11k | } |
function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_15DataTypeDecimalILNS_13PrimitiveTypeE29EEEvEEEEbRKT_ENKUlSI_E_clINSB_ISE_SE_EEEEbSI_ Line | Count | Source | 114 | 870 | return false; | 115 | 870 | } | 116 | 870 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | 870 | IsDatelikeV2Types<ToDataType> || | 123 | 870 | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | 870 | return false; | 125 | 870 | } | 126 | 870 | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | 870 | using Types2 = std::decay_t<decltype(types2)>; | 129 | 870 | using FromDataType = typename Types2::LeftType; | 130 | 870 | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | 870 | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | 870 | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | 870 | return false; | 134 | 870 | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | 870 | using FromFieldType = typename FromDataType::FieldType; | 137 | 870 | using ToFieldType = typename ToDataType::FieldType; | 138 | 870 | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | 870 | | 141 | 870 | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | 870 | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | 870 | from_precision = | 145 | 870 | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | 870 | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | 870 | | 149 | 870 | UInt32 to_max_digits = 0; | 150 | 870 | UInt32 to_precision = 0; | 151 | | UInt32 to_scale = 0; | 152 | | | 153 | | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | 870 | const auto* to_decimal_type = | 157 | 870 | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | 870 | ToDataType::check_type_precision(to_precision); | 160 | 870 | | 161 | 158 | to_scale = to_decimal_type->get_scale(); | 162 | 158 | ToDataType::check_type_scale(to_scale); | 163 | 158 | } | 164 | 870 | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | 870 | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 0 | to_precision = to_max_digits; | 167 | 870 | } |
function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_15DataTypeDecimalILNS_13PrimitiveTypeE29EEEvEEEEbRKT_ENKUlSI_E_clINSB_INSC_ILSD_20EEESE_EEEEbSI_ Line | Count | Source | 114 | 216 | return false; | 115 | 216 | } | 116 | 216 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | 216 | IsDatelikeV2Types<ToDataType> || | 123 | 216 | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | 216 | return false; | 125 | 216 | } | 126 | 216 | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | 216 | using Types2 = std::decay_t<decltype(types2)>; | 129 | 216 | using FromDataType = typename Types2::LeftType; | 130 | 216 | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | 216 | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | 216 | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | 216 | return false; | 134 | 216 | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | 216 | using FromFieldType = typename FromDataType::FieldType; | 137 | 216 | using ToFieldType = typename ToDataType::FieldType; | 138 | 216 | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | 216 | | 141 | 216 | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | 216 | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | 216 | from_precision = | 145 | 216 | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | 216 | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | 216 | | 149 | 216 | UInt32 to_max_digits = 0; | 150 | 216 | UInt32 to_precision = 0; | 151 | | UInt32 to_scale = 0; | 152 | | | 153 | | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | 216 | const auto* to_decimal_type = | 157 | 216 | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | 216 | ToDataType::check_type_precision(to_precision); | 160 | 216 | | 161 | 50 | to_scale = to_decimal_type->get_scale(); | 162 | 50 | ToDataType::check_type_scale(to_scale); | 163 | 50 | } | 164 | 216 | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | 216 | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 0 | to_precision = to_max_digits; | 167 | 216 | } |
function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_15DataTypeDecimalILNS_13PrimitiveTypeE29EEEvEEEEbRKT_ENKUlSI_E_clINSB_INSC_ILSD_30EEESE_EEEEbSI_ Line | Count | Source | 114 | 424 | return false; | 115 | 424 | } | 116 | 424 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | 424 | IsDatelikeV2Types<ToDataType> || | 123 | 424 | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | 424 | return false; | 125 | 424 | } | 126 | 424 | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | 424 | using Types2 = std::decay_t<decltype(types2)>; | 129 | 424 | using FromDataType = typename Types2::LeftType; | 130 | 424 | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | 424 | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | 424 | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | 424 | return false; | 134 | 424 | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | 424 | using FromFieldType = typename FromDataType::FieldType; | 137 | 424 | using ToFieldType = typename ToDataType::FieldType; | 138 | 424 | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | 424 | | 141 | 424 | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | 424 | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | 424 | from_precision = | 145 | 424 | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | 424 | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | 424 | | 149 | 424 | UInt32 to_max_digits = 0; | 150 | 424 | UInt32 to_precision = 0; | 151 | | UInt32 to_scale = 0; | 152 | | | 153 | | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | 424 | const auto* to_decimal_type = | 157 | 424 | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | 424 | ToDataType::check_type_precision(to_precision); | 160 | 424 | | 161 | 144 | to_scale = to_decimal_type->get_scale(); | 162 | 144 | ToDataType::check_type_scale(to_scale); | 163 | 144 | } | 164 | 424 | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | 424 | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 0 | to_precision = to_max_digits; | 167 | 424 | } |
function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_15DataTypeDecimalILNS_13PrimitiveTypeE29EEEvEEEEbRKT_ENKUlSI_E_clINSB_INSC_ILSD_35EEESE_EEEEbSI_ Line | Count | Source | 114 | 401 | return false; | 115 | 401 | } | 116 | 401 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | 401 | IsDatelikeV2Types<ToDataType> || | 123 | 401 | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | 401 | return false; | 125 | 401 | } | 126 | 401 | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | 401 | using Types2 = std::decay_t<decltype(types2)>; | 129 | 401 | using FromDataType = typename Types2::LeftType; | 130 | 401 | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | 401 | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | 401 | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | 401 | return false; | 134 | 401 | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | 401 | using FromFieldType = typename FromDataType::FieldType; | 137 | 401 | using ToFieldType = typename ToDataType::FieldType; | 138 | 401 | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | 401 | | 141 | 401 | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | 401 | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | 401 | from_precision = | 145 | 401 | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | 401 | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | 401 | | 149 | 401 | UInt32 to_max_digits = 0; | 150 | 401 | UInt32 to_precision = 0; | 151 | | UInt32 to_scale = 0; | 152 | | | 153 | | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | 401 | const auto* to_decimal_type = | 157 | 401 | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | 401 | ToDataType::check_type_precision(to_precision); | 160 | 401 | | 161 | 137 | to_scale = to_decimal_type->get_scale(); | 162 | 137 | ToDataType::check_type_scale(to_scale); | 163 | 137 | } | 164 | 401 | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | 401 | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 0 | to_precision = to_max_digits; | 167 | 401 | } |
Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_15DataTypeDecimalILNS_13PrimitiveTypeE29EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_12DataTypeDateESE_EEEEbSI_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_15DataTypeDecimalILNS_13PrimitiveTypeE29EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_14DataTypeDateV2ESE_EEEEbSI_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_15DataTypeDecimalILNS_13PrimitiveTypeE29EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_18DataTypeDateTimeV2ESE_EEEEbSI_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_15DataTypeDecimalILNS_13PrimitiveTypeE29EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_16DataTypeDateTimeESE_EEEEbSI_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_15DataTypeDecimalILNS_13PrimitiveTypeE29EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_14DataTypeTimeV2ESE_EEEEbSI_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_15DataTypeDecimalILNS_13PrimitiveTypeE29EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_19DataTypeTimeStampTzESE_EEEEbSI_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_15DataTypeDecimalILNS_13PrimitiveTypeE29EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_12DataTypeIPv4ESE_EEEEbSI_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_15DataTypeDecimalILNS_13PrimitiveTypeE29EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_12DataTypeIPv6ESE_EEEEbSI_ function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_15DataTypeDecimalILNS_13PrimitiveTypeE29EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_14DataTypeStringESE_EEEEbSI_ Line | Count | Source | 114 | 6.60k | return false; | 115 | 6.60k | } | 116 | 6.60k | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | 6.60k | using ToDataType = typename Types::LeftType; | 120 | 6.60k | | 121 | 6.60k | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | 6.60k | IsDatelikeV2Types<ToDataType> || | 123 | 6.60k | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | 6.60k | return false; | 125 | 6.60k | } | 126 | 6.60k | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | | using Types2 = std::decay_t<decltype(types2)>; | 129 | | using FromDataType = typename Types2::LeftType; | 130 | | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | | return false; | 134 | | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | 6.60k | using FromFieldType = typename FromDataType::FieldType; | 137 | 6.60k | using ToFieldType = typename ToDataType::FieldType; | 138 | 6.60k | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | 6.60k | | 141 | 6.60k | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | 6.60k | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | 6.60k | from_precision = | 145 | 6.60k | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | 6.60k | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | 6.60k | | 149 | 6.60k | UInt32 to_max_digits = 0; | 150 | 6.60k | UInt32 to_precision = 0; | 151 | | UInt32 to_scale = 0; | 152 | | | 153 | | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | 6.60k | const auto* to_decimal_type = | 157 | 6.60k | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | 6.60k | ToDataType::check_type_precision(to_precision); | 160 | 6.60k |
| 161 | 0 | to_scale = to_decimal_type->get_scale(); | 162 | 0 | ToDataType::check_type_scale(to_scale); | 163 | 0 | } | 164 | 6.60k | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | 6.60k | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 0 | to_precision = to_max_digits; | 167 | 6.60k | } |
function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_15DataTypeDecimalILNS_13PrimitiveTypeE20EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_14DataTypeNumberILSD_2EEESE_EEEEbSI_ Line | Count | Source | 114 | 20 | return false; | 115 | 20 | } | 116 | 20 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | 20 | IsDatelikeV2Types<ToDataType> || | 123 | 20 | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | 20 | return false; | 125 | 20 | } | 126 | 20 | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | | using Types2 = std::decay_t<decltype(types2)>; | 129 | | using FromDataType = typename Types2::LeftType; | 130 | | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | | return false; | 134 | | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | 20 | using FromFieldType = typename FromDataType::FieldType; | 137 | 20 | using ToFieldType = typename ToDataType::FieldType; | 138 | 20 | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | 20 | | 141 | 20 | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | 20 | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | 20 | from_precision = | 145 | 20 | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | 20 | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | 20 | | 149 | 20 | UInt32 to_max_digits = 0; | 150 | 20 | UInt32 to_precision = 0; | 151 | | UInt32 to_scale = 0; | 152 | | | 153 | | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | 20 | const auto* to_decimal_type = | 157 | 20 | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | 20 | ToDataType::check_type_precision(to_precision); | 160 | 20 | | 161 | 20 | to_scale = to_decimal_type->get_scale(); | 162 | 20 | ToDataType::check_type_scale(to_scale); | 163 | 20 | } | 164 | 20 | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | 20 | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 0 | to_precision = to_max_digits; | 167 | 20 | } |
function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_15DataTypeDecimalILNS_13PrimitiveTypeE20EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_14DataTypeNumberILSD_3EEESE_EEEEbSI_ Line | Count | Source | 114 | 16 | return false; | 115 | 16 | } | 116 | 16 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | 16 | IsDatelikeV2Types<ToDataType> || | 123 | 16 | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | 16 | return false; | 125 | 16 | } | 126 | 16 | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | | using Types2 = std::decay_t<decltype(types2)>; | 129 | | using FromDataType = typename Types2::LeftType; | 130 | | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | | return false; | 134 | | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | 16 | using FromFieldType = typename FromDataType::FieldType; | 137 | 16 | using ToFieldType = typename ToDataType::FieldType; | 138 | 16 | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | 16 | | 141 | 16 | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | 16 | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | 16 | from_precision = | 145 | 16 | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | 16 | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | 16 | | 149 | 16 | UInt32 to_max_digits = 0; | 150 | 16 | UInt32 to_precision = 0; | 151 | | UInt32 to_scale = 0; | 152 | | | 153 | | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | 16 | const auto* to_decimal_type = | 157 | 16 | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | 16 | ToDataType::check_type_precision(to_precision); | 160 | 16 | | 161 | 16 | to_scale = to_decimal_type->get_scale(); | 162 | 16 | ToDataType::check_type_scale(to_scale); | 163 | 16 | } | 164 | 16 | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | 16 | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 0 | to_precision = to_max_digits; | 167 | 16 | } |
function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_15DataTypeDecimalILNS_13PrimitiveTypeE20EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_14DataTypeNumberILSD_4EEESE_EEEEbSI_ Line | Count | Source | 114 | 16 | return false; | 115 | 16 | } | 116 | 16 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | 16 | IsDatelikeV2Types<ToDataType> || | 123 | 16 | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | 16 | return false; | 125 | 16 | } | 126 | 16 | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | | using Types2 = std::decay_t<decltype(types2)>; | 129 | | using FromDataType = typename Types2::LeftType; | 130 | | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | | return false; | 134 | | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | 16 | using FromFieldType = typename FromDataType::FieldType; | 137 | 16 | using ToFieldType = typename ToDataType::FieldType; | 138 | 16 | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | 16 | | 141 | 16 | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | 16 | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | 16 | from_precision = | 145 | 16 | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | 16 | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | 16 | | 149 | 16 | UInt32 to_max_digits = 0; | 150 | 16 | UInt32 to_precision = 0; | 151 | | UInt32 to_scale = 0; | 152 | | | 153 | | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | 16 | const auto* to_decimal_type = | 157 | 16 | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | 16 | ToDataType::check_type_precision(to_precision); | 160 | 16 | | 161 | 16 | to_scale = to_decimal_type->get_scale(); | 162 | 16 | ToDataType::check_type_scale(to_scale); | 163 | 16 | } | 164 | 16 | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | 16 | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 0 | to_precision = to_max_digits; | 167 | 16 | } |
function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_15DataTypeDecimalILNS_13PrimitiveTypeE20EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_14DataTypeNumberILSD_5EEESE_EEEEbSI_ Line | Count | Source | 114 | 16 | return false; | 115 | 16 | } | 116 | 16 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | 16 | IsDatelikeV2Types<ToDataType> || | 123 | 16 | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | 16 | return false; | 125 | 16 | } | 126 | 16 | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | | using Types2 = std::decay_t<decltype(types2)>; | 129 | | using FromDataType = typename Types2::LeftType; | 130 | | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | | return false; | 134 | | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | 16 | using FromFieldType = typename FromDataType::FieldType; | 137 | 16 | using ToFieldType = typename ToDataType::FieldType; | 138 | 16 | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | 16 | | 141 | 16 | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | 16 | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | 16 | from_precision = | 145 | 16 | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | 16 | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | 16 | | 149 | 16 | UInt32 to_max_digits = 0; | 150 | 16 | UInt32 to_precision = 0; | 151 | | UInt32 to_scale = 0; | 152 | | | 153 | | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | 16 | const auto* to_decimal_type = | 157 | 16 | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | 16 | ToDataType::check_type_precision(to_precision); | 160 | 16 | | 161 | 16 | to_scale = to_decimal_type->get_scale(); | 162 | 16 | ToDataType::check_type_scale(to_scale); | 163 | 16 | } | 164 | 16 | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | 16 | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 0 | to_precision = to_max_digits; | 167 | 16 | } |
Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_15DataTypeDecimalILNS_13PrimitiveTypeE20EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_14DataTypeNumberILSD_6EEESE_EEEEbSI_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_15DataTypeDecimalILNS_13PrimitiveTypeE20EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_14DataTypeNumberILSD_7EEESE_EEEEbSI_ function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_15DataTypeDecimalILNS_13PrimitiveTypeE20EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_14DataTypeNumberILSD_8EEESE_EEEEbSI_ Line | Count | Source | 114 | 31 | return false; | 115 | 31 | } | 116 | 31 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | 31 | IsDatelikeV2Types<ToDataType> || | 123 | 31 | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | 31 | return false; | 125 | 31 | } | 126 | 31 | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | | using Types2 = std::decay_t<decltype(types2)>; | 129 | | using FromDataType = typename Types2::LeftType; | 130 | | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | | return false; | 134 | | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | 31 | using FromFieldType = typename FromDataType::FieldType; | 137 | 31 | using ToFieldType = typename ToDataType::FieldType; | 138 | 31 | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | 31 | | 141 | 31 | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | 31 | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | 31 | from_precision = | 145 | 31 | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | 31 | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | 31 | | 149 | 31 | UInt32 to_max_digits = 0; | 150 | 31 | UInt32 to_precision = 0; | 151 | | UInt32 to_scale = 0; | 152 | | | 153 | | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | 31 | const auto* to_decimal_type = | 157 | 31 | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | 31 | ToDataType::check_type_precision(to_precision); | 160 | 32 | | 161 | 32 | to_scale = to_decimal_type->get_scale(); | 162 | 32 | ToDataType::check_type_scale(to_scale); | 163 | 32 | } | 164 | 31 | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | 31 | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 0 | to_precision = to_max_digits; | 167 | 31 | } |
function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_15DataTypeDecimalILNS_13PrimitiveTypeE20EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_14DataTypeNumberILSD_9EEESE_EEEEbSI_ Line | Count | Source | 114 | 127 | return false; | 115 | 127 | } | 116 | 127 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | 127 | IsDatelikeV2Types<ToDataType> || | 123 | 127 | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | 127 | return false; | 125 | 127 | } | 126 | 127 | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | | using Types2 = std::decay_t<decltype(types2)>; | 129 | | using FromDataType = typename Types2::LeftType; | 130 | | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | | return false; | 134 | | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | 127 | using FromFieldType = typename FromDataType::FieldType; | 137 | 127 | using ToFieldType = typename ToDataType::FieldType; | 138 | 127 | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | 127 | | 141 | 127 | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | 127 | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | 127 | from_precision = | 145 | 127 | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | 127 | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | 127 | | 149 | 127 | UInt32 to_max_digits = 0; | 150 | 127 | UInt32 to_precision = 0; | 151 | | UInt32 to_scale = 0; | 152 | | | 153 | | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | 127 | const auto* to_decimal_type = | 157 | 128 | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | 127 | ToDataType::check_type_precision(to_precision); | 160 | 128 | | 161 | 128 | to_scale = to_decimal_type->get_scale(); | 162 | 128 | ToDataType::check_type_scale(to_scale); | 163 | 128 | } | 164 | 127 | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | 127 | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 0 | to_precision = to_max_digits; | 167 | 127 | } |
Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_15DataTypeDecimalILNS_13PrimitiveTypeE20EEEvEEEEbRKT_ENKUlSI_E_clINSB_INSC_ILSD_28EEESE_EEEEbSI_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_15DataTypeDecimalILNS_13PrimitiveTypeE20EEEvEEEEbRKT_ENKUlSI_E_clINSB_INSC_ILSD_29EEESE_EEEEbSI_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_15DataTypeDecimalILNS_13PrimitiveTypeE20EEEvEEEEbRKT_ENKUlSI_E_clINSB_ISE_SE_EEEEbSI_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_15DataTypeDecimalILNS_13PrimitiveTypeE20EEEvEEEEbRKT_ENKUlSI_E_clINSB_INSC_ILSD_30EEESE_EEEEbSI_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_15DataTypeDecimalILNS_13PrimitiveTypeE20EEEvEEEEbRKT_ENKUlSI_E_clINSB_INSC_ILSD_35EEESE_EEEEbSI_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_15DataTypeDecimalILNS_13PrimitiveTypeE20EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_12DataTypeDateESE_EEEEbSI_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_15DataTypeDecimalILNS_13PrimitiveTypeE20EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_14DataTypeDateV2ESE_EEEEbSI_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_15DataTypeDecimalILNS_13PrimitiveTypeE20EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_18DataTypeDateTimeV2ESE_EEEEbSI_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_15DataTypeDecimalILNS_13PrimitiveTypeE20EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_16DataTypeDateTimeESE_EEEEbSI_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_15DataTypeDecimalILNS_13PrimitiveTypeE20EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_14DataTypeTimeV2ESE_EEEEbSI_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_15DataTypeDecimalILNS_13PrimitiveTypeE20EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_19DataTypeTimeStampTzESE_EEEEbSI_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_15DataTypeDecimalILNS_13PrimitiveTypeE20EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_12DataTypeIPv4ESE_EEEEbSI_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_15DataTypeDecimalILNS_13PrimitiveTypeE20EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_12DataTypeIPv6ESE_EEEEbSI_ function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_15DataTypeDecimalILNS_13PrimitiveTypeE20EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_14DataTypeStringESE_EEEEbSI_ Line | Count | Source | 114 | 1 | return false; | 115 | 1 | } | 116 | 1 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | 1 | using ToDataType = typename Types::LeftType; | 120 | 1 | | 121 | 1 | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | 1 | IsDatelikeV2Types<ToDataType> || | 123 | 1 | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | 1 | return false; | 125 | 1 | } | 126 | 1 | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | | using Types2 = std::decay_t<decltype(types2)>; | 129 | | using FromDataType = typename Types2::LeftType; | 130 | | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | | return false; | 134 | | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | 1 | using FromFieldType = typename FromDataType::FieldType; | 137 | 1 | using ToFieldType = typename ToDataType::FieldType; | 138 | 1 | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | 1 | | 141 | 1 | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | 1 | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | 1 | from_precision = | 145 | 1 | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | 1 | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | 1 | | 149 | 1 | UInt32 to_max_digits = 0; | 150 | 1 | UInt32 to_precision = 0; | 151 | | UInt32 to_scale = 0; | 152 | | | 153 | | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | 1 | const auto* to_decimal_type = | 157 | 1 | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | 1 | ToDataType::check_type_precision(to_precision); | 160 | 1 |
| 161 | 0 | to_scale = to_decimal_type->get_scale(); | 162 | 0 | ToDataType::check_type_scale(to_scale); | 163 | 0 | } | 164 | 1 | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | 1 | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 0 | to_precision = to_max_digits; | 167 | 1 | } |
function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_15DataTypeDecimalILNS_13PrimitiveTypeE30EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_14DataTypeNumberILSD_2EEESE_EEEEbSI_ Line | Count | Source | 114 | 23 | return false; | 115 | 23 | } | 116 | 23 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | 23 | IsDatelikeV2Types<ToDataType> || | 123 | 23 | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | 23 | return false; | 125 | 23 | } | 126 | 23 | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | | using Types2 = std::decay_t<decltype(types2)>; | 129 | | using FromDataType = typename Types2::LeftType; | 130 | | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | | return false; | 134 | | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | 23 | using FromFieldType = typename FromDataType::FieldType; | 137 | 23 | using ToFieldType = typename ToDataType::FieldType; | 138 | 23 | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | 23 | | 141 | 23 | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | 23 | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | 23 | from_precision = | 145 | 23 | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | 23 | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | 23 | | 149 | 23 | UInt32 to_max_digits = 0; | 150 | 23 | UInt32 to_precision = 0; | 151 | | UInt32 to_scale = 0; | 152 | | | 153 | | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | 23 | const auto* to_decimal_type = | 157 | 23 | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | 23 | ToDataType::check_type_precision(to_precision); | 160 | 23 | | 161 | 21 | to_scale = to_decimal_type->get_scale(); | 162 | 21 | ToDataType::check_type_scale(to_scale); | 163 | 21 | } | 164 | 23 | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | 23 | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 0 | to_precision = to_max_digits; | 167 | 23 | } |
function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_15DataTypeDecimalILNS_13PrimitiveTypeE30EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_14DataTypeNumberILSD_3EEESE_EEEEbSI_ Line | Count | Source | 114 | 125 | return false; | 115 | 125 | } | 116 | 125 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | 125 | IsDatelikeV2Types<ToDataType> || | 123 | 125 | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | 125 | return false; | 125 | 125 | } | 126 | 125 | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | | using Types2 = std::decay_t<decltype(types2)>; | 129 | | using FromDataType = typename Types2::LeftType; | 130 | | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | | return false; | 134 | | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | 125 | using FromFieldType = typename FromDataType::FieldType; | 137 | 125 | using ToFieldType = typename ToDataType::FieldType; | 138 | 125 | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | 125 | | 141 | 125 | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | 125 | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | 125 | from_precision = | 145 | 125 | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | 125 | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | 125 | | 149 | 125 | UInt32 to_max_digits = 0; | 150 | 125 | UInt32 to_precision = 0; | 151 | | UInt32 to_scale = 0; | 152 | | | 153 | | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | 125 | const auto* to_decimal_type = | 157 | 125 | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | 125 | ToDataType::check_type_precision(to_precision); | 160 | 125 | | 161 | 92 | to_scale = to_decimal_type->get_scale(); | 162 | 92 | ToDataType::check_type_scale(to_scale); | 163 | 92 | } | 164 | 125 | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | 125 | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 0 | to_precision = to_max_digits; | 167 | 125 | } |
function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_15DataTypeDecimalILNS_13PrimitiveTypeE30EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_14DataTypeNumberILSD_4EEESE_EEEEbSI_ Line | Count | Source | 114 | 112 | return false; | 115 | 112 | } | 116 | 112 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | 112 | IsDatelikeV2Types<ToDataType> || | 123 | 112 | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | 112 | return false; | 125 | 112 | } | 126 | 112 | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | | using Types2 = std::decay_t<decltype(types2)>; | 129 | | using FromDataType = typename Types2::LeftType; | 130 | | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | | return false; | 134 | | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | 112 | using FromFieldType = typename FromDataType::FieldType; | 137 | 112 | using ToFieldType = typename ToDataType::FieldType; | 138 | 112 | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | 112 | | 141 | 112 | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | 112 | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | 112 | from_precision = | 145 | 112 | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | 112 | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | 112 | | 149 | 112 | UInt32 to_max_digits = 0; | 150 | 112 | UInt32 to_precision = 0; | 151 | | UInt32 to_scale = 0; | 152 | | | 153 | | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | 112 | const auto* to_decimal_type = | 157 | 112 | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | 112 | ToDataType::check_type_precision(to_precision); | 160 | 112 | | 161 | 79 | to_scale = to_decimal_type->get_scale(); | 162 | 79 | ToDataType::check_type_scale(to_scale); | 163 | 79 | } | 164 | 112 | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | 112 | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 0 | to_precision = to_max_digits; | 167 | 112 | } |
function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_15DataTypeDecimalILNS_13PrimitiveTypeE30EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_14DataTypeNumberILSD_5EEESE_EEEEbSI_ Line | Count | Source | 114 | 384 | return false; | 115 | 384 | } | 116 | 384 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | 384 | IsDatelikeV2Types<ToDataType> || | 123 | 384 | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | 384 | return false; | 125 | 384 | } | 126 | 384 | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | | using Types2 = std::decay_t<decltype(types2)>; | 129 | | using FromDataType = typename Types2::LeftType; | 130 | | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | | return false; | 134 | | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | 384 | using FromFieldType = typename FromDataType::FieldType; | 137 | 384 | using ToFieldType = typename ToDataType::FieldType; | 138 | 384 | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | 384 | | 141 | 384 | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | 384 | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | 384 | from_precision = | 145 | 384 | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | 384 | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | 384 | | 149 | 384 | UInt32 to_max_digits = 0; | 150 | 384 | UInt32 to_precision = 0; | 151 | | UInt32 to_scale = 0; | 152 | | | 153 | | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | 384 | const auto* to_decimal_type = | 157 | 384 | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | 384 | ToDataType::check_type_precision(to_precision); | 160 | 384 | | 161 | 346 | to_scale = to_decimal_type->get_scale(); | 162 | 346 | ToDataType::check_type_scale(to_scale); | 163 | 346 | } | 164 | 384 | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | 384 | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 0 | to_precision = to_max_digits; | 167 | 384 | } |
function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_15DataTypeDecimalILNS_13PrimitiveTypeE30EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_14DataTypeNumberILSD_6EEESE_EEEEbSI_ Line | Count | Source | 114 | 879 | return false; | 115 | 879 | } | 116 | 879 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | 879 | IsDatelikeV2Types<ToDataType> || | 123 | 879 | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | 879 | return false; | 125 | 879 | } | 126 | 879 | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | | using Types2 = std::decay_t<decltype(types2)>; | 129 | | using FromDataType = typename Types2::LeftType; | 130 | | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | | return false; | 134 | | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | 879 | using FromFieldType = typename FromDataType::FieldType; | 137 | 879 | using ToFieldType = typename ToDataType::FieldType; | 138 | 879 | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | 879 | | 141 | 879 | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | 879 | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | 879 | from_precision = | 145 | 879 | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | 879 | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | 879 | | 149 | 879 | UInt32 to_max_digits = 0; | 150 | 879 | UInt32 to_precision = 0; | 151 | | UInt32 to_scale = 0; | 152 | | | 153 | | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | 879 | const auto* to_decimal_type = | 157 | 879 | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | 879 | ToDataType::check_type_precision(to_precision); | 160 | 879 | | 161 | 392 | to_scale = to_decimal_type->get_scale(); | 162 | 392 | ToDataType::check_type_scale(to_scale); | 163 | 392 | } | 164 | 879 | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | 879 | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 0 | to_precision = to_max_digits; | 167 | 879 | } |
function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_15DataTypeDecimalILNS_13PrimitiveTypeE30EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_14DataTypeNumberILSD_7EEESE_EEEEbSI_ Line | Count | Source | 114 | 289 | return false; | 115 | 289 | } | 116 | 289 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | 289 | IsDatelikeV2Types<ToDataType> || | 123 | 289 | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | 289 | return false; | 125 | 289 | } | 126 | 289 | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | | using Types2 = std::decay_t<decltype(types2)>; | 129 | | using FromDataType = typename Types2::LeftType; | 130 | | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | | return false; | 134 | | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | 289 | using FromFieldType = typename FromDataType::FieldType; | 137 | 289 | using ToFieldType = typename ToDataType::FieldType; | 138 | 289 | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | 289 | | 141 | 289 | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | 289 | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | 289 | from_precision = | 145 | 289 | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | 289 | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | 289 | | 149 | 289 | UInt32 to_max_digits = 0; | 150 | 289 | UInt32 to_precision = 0; | 151 | | UInt32 to_scale = 0; | 152 | | | 153 | | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | 289 | const auto* to_decimal_type = | 157 | 289 | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | 289 | ToDataType::check_type_precision(to_precision); | 160 | 289 | | 161 | 148 | to_scale = to_decimal_type->get_scale(); | 162 | 148 | ToDataType::check_type_scale(to_scale); | 163 | 148 | } | 164 | 289 | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | 289 | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 0 | to_precision = to_max_digits; | 167 | 289 | } |
function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_15DataTypeDecimalILNS_13PrimitiveTypeE30EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_14DataTypeNumberILSD_8EEESE_EEEEbSI_ Line | Count | Source | 114 | 206 | return false; | 115 | 206 | } | 116 | 206 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | 206 | IsDatelikeV2Types<ToDataType> || | 123 | 206 | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | 206 | return false; | 125 | 206 | } | 126 | 206 | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | | using Types2 = std::decay_t<decltype(types2)>; | 129 | | using FromDataType = typename Types2::LeftType; | 130 | | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | | return false; | 134 | | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | 206 | using FromFieldType = typename FromDataType::FieldType; | 137 | 206 | using ToFieldType = typename ToDataType::FieldType; | 138 | 206 | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | 206 | | 141 | 206 | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | 206 | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | 206 | from_precision = | 145 | 206 | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | 206 | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | 206 | | 149 | 206 | UInt32 to_max_digits = 0; | 150 | 206 | UInt32 to_precision = 0; | 151 | | UInt32 to_scale = 0; | 152 | | | 153 | | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | 206 | const auto* to_decimal_type = | 157 | 206 | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | 206 | ToDataType::check_type_precision(to_precision); | 160 | 206 | | 161 | 118 | to_scale = to_decimal_type->get_scale(); | 162 | 118 | ToDataType::check_type_scale(to_scale); | 163 | 118 | } | 164 | 206 | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | 206 | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 0 | to_precision = to_max_digits; | 167 | 206 | } |
function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_15DataTypeDecimalILNS_13PrimitiveTypeE30EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_14DataTypeNumberILSD_9EEESE_EEEEbSI_ Line | Count | Source | 114 | 448 | return false; | 115 | 448 | } | 116 | 448 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | 448 | IsDatelikeV2Types<ToDataType> || | 123 | 448 | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | 448 | return false; | 125 | 448 | } | 126 | 448 | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | | using Types2 = std::decay_t<decltype(types2)>; | 129 | | using FromDataType = typename Types2::LeftType; | 130 | | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | | return false; | 134 | | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | 448 | using FromFieldType = typename FromDataType::FieldType; | 137 | 448 | using ToFieldType = typename ToDataType::FieldType; | 138 | 448 | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | 448 | | 141 | 448 | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | 448 | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | 448 | from_precision = | 145 | 448 | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | 448 | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | 448 | | 149 | 448 | UInt32 to_max_digits = 0; | 150 | 448 | UInt32 to_precision = 0; | 151 | | UInt32 to_scale = 0; | 152 | | | 153 | | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | 448 | const auto* to_decimal_type = | 157 | 448 | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | 448 | ToDataType::check_type_precision(to_precision); | 160 | 448 | | 161 | 368 | to_scale = to_decimal_type->get_scale(); | 162 | 368 | ToDataType::check_type_scale(to_scale); | 163 | 368 | } | 164 | 448 | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | 448 | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 0 | to_precision = to_max_digits; | 167 | 448 | } |
function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_15DataTypeDecimalILNS_13PrimitiveTypeE30EEEvEEEEbRKT_ENKUlSI_E_clINSB_INSC_ILSD_28EEESE_EEEEbSI_ Line | Count | Source | 114 | 621 | return false; | 115 | 621 | } | 116 | 621 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | 621 | IsDatelikeV2Types<ToDataType> || | 123 | 621 | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | 621 | return false; | 125 | 621 | } | 126 | 621 | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | 621 | using Types2 = std::decay_t<decltype(types2)>; | 129 | 621 | using FromDataType = typename Types2::LeftType; | 130 | 621 | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | 621 | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | 621 | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | 621 | return false; | 134 | 621 | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | 621 | using FromFieldType = typename FromDataType::FieldType; | 137 | 621 | using ToFieldType = typename ToDataType::FieldType; | 138 | 621 | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | 621 | | 141 | 621 | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | 621 | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | 621 | from_precision = | 145 | 621 | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | 621 | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | 621 | | 149 | 621 | UInt32 to_max_digits = 0; | 150 | 621 | UInt32 to_precision = 0; | 151 | | UInt32 to_scale = 0; | 152 | | | 153 | | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | 621 | const auto* to_decimal_type = | 157 | 621 | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | 621 | ToDataType::check_type_precision(to_precision); | 160 | 621 | | 161 | 469 | to_scale = to_decimal_type->get_scale(); | 162 | 469 | ToDataType::check_type_scale(to_scale); | 163 | 469 | } | 164 | 621 | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | 621 | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 0 | to_precision = to_max_digits; | 167 | 621 | } |
function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_15DataTypeDecimalILNS_13PrimitiveTypeE30EEEvEEEEbRKT_ENKUlSI_E_clINSB_INSC_ILSD_29EEESE_EEEEbSI_ Line | Count | Source | 114 | 796 | return false; | 115 | 796 | } | 116 | 796 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | 796 | IsDatelikeV2Types<ToDataType> || | 123 | 796 | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | 796 | return false; | 125 | 796 | } | 126 | 796 | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | 796 | using Types2 = std::decay_t<decltype(types2)>; | 129 | 796 | using FromDataType = typename Types2::LeftType; | 130 | 796 | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | 796 | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | 796 | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | 796 | return false; | 134 | 796 | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | 796 | using FromFieldType = typename FromDataType::FieldType; | 137 | 796 | using ToFieldType = typename ToDataType::FieldType; | 138 | 796 | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | 796 | | 141 | 796 | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | 796 | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | 796 | from_precision = | 145 | 796 | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | 796 | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | 796 | | 149 | 796 | UInt32 to_max_digits = 0; | 150 | 796 | UInt32 to_precision = 0; | 151 | | UInt32 to_scale = 0; | 152 | | | 153 | | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | 796 | const auto* to_decimal_type = | 157 | 796 | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | 796 | ToDataType::check_type_precision(to_precision); | 160 | 796 | | 161 | 470 | to_scale = to_decimal_type->get_scale(); | 162 | 470 | ToDataType::check_type_scale(to_scale); | 163 | 470 | } | 164 | 796 | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | 796 | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 0 | to_precision = to_max_digits; | 167 | 796 | } |
function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_15DataTypeDecimalILNS_13PrimitiveTypeE30EEEvEEEEbRKT_ENKUlSI_E_clINSB_INSC_ILSD_20EEESE_EEEEbSI_ Line | Count | Source | 114 | 257 | return false; | 115 | 257 | } | 116 | 257 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | 257 | IsDatelikeV2Types<ToDataType> || | 123 | 257 | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | 257 | return false; | 125 | 257 | } | 126 | 257 | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | 257 | using Types2 = std::decay_t<decltype(types2)>; | 129 | 257 | using FromDataType = typename Types2::LeftType; | 130 | 257 | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | 257 | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | 257 | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | 257 | return false; | 134 | 257 | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | 257 | using FromFieldType = typename FromDataType::FieldType; | 137 | 257 | using ToFieldType = typename ToDataType::FieldType; | 138 | 257 | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | 257 | | 141 | 257 | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | 257 | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | 257 | from_precision = | 145 | 257 | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | 257 | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | 257 | | 149 | 257 | UInt32 to_max_digits = 0; | 150 | 257 | UInt32 to_precision = 0; | 151 | | UInt32 to_scale = 0; | 152 | | | 153 | | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | 257 | const auto* to_decimal_type = | 157 | 257 | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | 257 | ToDataType::check_type_precision(to_precision); | 160 | 257 | | 161 | 71 | to_scale = to_decimal_type->get_scale(); | 162 | 71 | ToDataType::check_type_scale(to_scale); | 163 | 71 | } | 164 | 257 | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | 257 | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 0 | to_precision = to_max_digits; | 167 | 257 | } |
function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_15DataTypeDecimalILNS_13PrimitiveTypeE30EEEvEEEEbRKT_ENKUlSI_E_clINSB_ISE_SE_EEEEbSI_ Line | Count | Source | 114 | 1.15k | return false; | 115 | 1.15k | } | 116 | 1.15k | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | 1.15k | IsDatelikeV2Types<ToDataType> || | 123 | 1.15k | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | 1.15k | return false; | 125 | 1.15k | } | 126 | 1.15k | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | 1.15k | using Types2 = std::decay_t<decltype(types2)>; | 129 | 1.15k | using FromDataType = typename Types2::LeftType; | 130 | 1.15k | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | 1.15k | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | 1.15k | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | 1.15k | return false; | 134 | 1.15k | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | 1.15k | using FromFieldType = typename FromDataType::FieldType; | 137 | 1.15k | using ToFieldType = typename ToDataType::FieldType; | 138 | 1.15k | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | 1.15k | | 141 | 1.15k | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | 1.15k | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | 1.15k | from_precision = | 145 | 1.15k | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | 1.15k | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | 1.15k | | 149 | 1.15k | UInt32 to_max_digits = 0; | 150 | 1.15k | UInt32 to_precision = 0; | 151 | | UInt32 to_scale = 0; | 152 | | | 153 | | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | 1.15k | const auto* to_decimal_type = | 157 | 1.15k | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | 1.15k | ToDataType::check_type_precision(to_precision); | 160 | 1.15k | | 161 | 579 | to_scale = to_decimal_type->get_scale(); | 162 | 579 | ToDataType::check_type_scale(to_scale); | 163 | 579 | } | 164 | 1.15k | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | 1.15k | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 0 | to_precision = to_max_digits; | 167 | 1.15k | } |
function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_15DataTypeDecimalILNS_13PrimitiveTypeE30EEEvEEEEbRKT_ENKUlSI_E_clINSB_INSC_ILSD_35EEESE_EEEEbSI_ Line | Count | Source | 114 | 700 | return false; | 115 | 700 | } | 116 | 700 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | 700 | IsDatelikeV2Types<ToDataType> || | 123 | 700 | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | 700 | return false; | 125 | 700 | } | 126 | 700 | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | 700 | using Types2 = std::decay_t<decltype(types2)>; | 129 | 700 | using FromDataType = typename Types2::LeftType; | 130 | 700 | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | 700 | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | 700 | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | 700 | return false; | 134 | 700 | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | 700 | using FromFieldType = typename FromDataType::FieldType; | 137 | 700 | using ToFieldType = typename ToDataType::FieldType; | 138 | 700 | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | 700 | | 141 | 700 | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | 700 | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | 700 | from_precision = | 145 | 700 | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | 700 | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | 700 | | 149 | 700 | UInt32 to_max_digits = 0; | 150 | 700 | UInt32 to_precision = 0; | 151 | | UInt32 to_scale = 0; | 152 | | | 153 | | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | 700 | const auto* to_decimal_type = | 157 | 700 | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | 700 | ToDataType::check_type_precision(to_precision); | 160 | 700 | | 161 | 274 | to_scale = to_decimal_type->get_scale(); | 162 | 274 | ToDataType::check_type_scale(to_scale); | 163 | 274 | } | 164 | 700 | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | 700 | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 0 | to_precision = to_max_digits; | 167 | 700 | } |
Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_15DataTypeDecimalILNS_13PrimitiveTypeE30EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_12DataTypeDateESE_EEEEbSI_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_15DataTypeDecimalILNS_13PrimitiveTypeE30EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_14DataTypeDateV2ESE_EEEEbSI_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_15DataTypeDecimalILNS_13PrimitiveTypeE30EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_18DataTypeDateTimeV2ESE_EEEEbSI_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_15DataTypeDecimalILNS_13PrimitiveTypeE30EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_16DataTypeDateTimeESE_EEEEbSI_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_15DataTypeDecimalILNS_13PrimitiveTypeE30EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_14DataTypeTimeV2ESE_EEEEbSI_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_15DataTypeDecimalILNS_13PrimitiveTypeE30EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_19DataTypeTimeStampTzESE_EEEEbSI_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_15DataTypeDecimalILNS_13PrimitiveTypeE30EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_12DataTypeIPv4ESE_EEEEbSI_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_15DataTypeDecimalILNS_13PrimitiveTypeE30EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_12DataTypeIPv6ESE_EEEEbSI_ function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_15DataTypeDecimalILNS_13PrimitiveTypeE30EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_14DataTypeStringESE_EEEEbSI_ Line | Count | Source | 114 | 3.84k | return false; | 115 | 3.84k | } | 116 | 3.84k | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | 3.84k | using ToDataType = typename Types::LeftType; | 120 | 3.84k | | 121 | 3.84k | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | 3.84k | IsDatelikeV2Types<ToDataType> || | 123 | 3.84k | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | 3.84k | return false; | 125 | 3.84k | } | 126 | 3.84k | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | | using Types2 = std::decay_t<decltype(types2)>; | 129 | | using FromDataType = typename Types2::LeftType; | 130 | | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | | return false; | 134 | | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | 3.84k | using FromFieldType = typename FromDataType::FieldType; | 137 | 3.84k | using ToFieldType = typename ToDataType::FieldType; | 138 | 3.84k | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | 3.84k | | 141 | 3.84k | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | 3.84k | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | 3.84k | from_precision = | 145 | 3.84k | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | 3.84k | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | 3.84k | | 149 | 3.84k | UInt32 to_max_digits = 0; | 150 | 3.84k | UInt32 to_precision = 0; | 151 | | UInt32 to_scale = 0; | 152 | | | 153 | | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | 3.84k | const auto* to_decimal_type = | 157 | 3.84k | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | 3.84k | ToDataType::check_type_precision(to_precision); | 160 | 3.84k |
| 161 | 0 | to_scale = to_decimal_type->get_scale(); | 162 | 0 | ToDataType::check_type_scale(to_scale); | 163 | 0 | } | 164 | 3.84k | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | 3.84k | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 0 | to_precision = to_max_digits; | 167 | 3.84k | } |
function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_15DataTypeDecimalILNS_13PrimitiveTypeE35EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_14DataTypeNumberILSD_2EEESE_EEEEbSI_ Line | Count | Source | 114 | 7 | return false; | 115 | 7 | } | 116 | 7 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | 7 | IsDatelikeV2Types<ToDataType> || | 123 | 7 | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | 7 | return false; | 125 | 7 | } | 126 | 7 | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | | using Types2 = std::decay_t<decltype(types2)>; | 129 | | using FromDataType = typename Types2::LeftType; | 130 | | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | | return false; | 134 | | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | 7 | using FromFieldType = typename FromDataType::FieldType; | 137 | 7 | using ToFieldType = typename ToDataType::FieldType; | 138 | 7 | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | 7 | | 141 | 7 | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | 7 | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | 7 | from_precision = | 145 | 7 | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | 7 | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | 7 | | 149 | 7 | UInt32 to_max_digits = 0; | 150 | 7 | UInt32 to_precision = 0; | 151 | | UInt32 to_scale = 0; | 152 | | | 153 | | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | 7 | const auto* to_decimal_type = | 157 | 7 | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | 7 | ToDataType::check_type_precision(to_precision); | 160 | 7 | | 161 | 6 | to_scale = to_decimal_type->get_scale(); | 162 | 6 | ToDataType::check_type_scale(to_scale); | 163 | 6 | } | 164 | 7 | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | 7 | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 0 | to_precision = to_max_digits; | 167 | 7 | } |
function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_15DataTypeDecimalILNS_13PrimitiveTypeE35EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_14DataTypeNumberILSD_3EEESE_EEEEbSI_ Line | Count | Source | 114 | 106 | return false; | 115 | 106 | } | 116 | 106 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | 106 | IsDatelikeV2Types<ToDataType> || | 123 | 106 | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | 106 | return false; | 125 | 106 | } | 126 | 106 | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | | using Types2 = std::decay_t<decltype(types2)>; | 129 | | using FromDataType = typename Types2::LeftType; | 130 | | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | | return false; | 134 | | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | 106 | using FromFieldType = typename FromDataType::FieldType; | 137 | 106 | using ToFieldType = typename ToDataType::FieldType; | 138 | 106 | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | 106 | | 141 | 106 | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | 106 | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | 106 | from_precision = | 145 | 106 | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | 106 | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | 106 | | 149 | 106 | UInt32 to_max_digits = 0; | 150 | 106 | UInt32 to_precision = 0; | 151 | | UInt32 to_scale = 0; | 152 | | | 153 | | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | 106 | const auto* to_decimal_type = | 157 | 106 | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | 106 | ToDataType::check_type_precision(to_precision); | 160 | 106 | | 161 | 73 | to_scale = to_decimal_type->get_scale(); | 162 | 73 | ToDataType::check_type_scale(to_scale); | 163 | 73 | } | 164 | 106 | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | 106 | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 0 | to_precision = to_max_digits; | 167 | 106 | } |
function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_15DataTypeDecimalILNS_13PrimitiveTypeE35EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_14DataTypeNumberILSD_4EEESE_EEEEbSI_ Line | Count | Source | 114 | 104 | return false; | 115 | 104 | } | 116 | 104 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | 104 | IsDatelikeV2Types<ToDataType> || | 123 | 104 | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | 104 | return false; | 125 | 104 | } | 126 | 104 | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | | using Types2 = std::decay_t<decltype(types2)>; | 129 | | using FromDataType = typename Types2::LeftType; | 130 | | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | | return false; | 134 | | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | 104 | using FromFieldType = typename FromDataType::FieldType; | 137 | 104 | using ToFieldType = typename ToDataType::FieldType; | 138 | 104 | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | 104 | | 141 | 104 | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | 104 | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | 104 | from_precision = | 145 | 104 | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | 104 | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | 104 | | 149 | 104 | UInt32 to_max_digits = 0; | 150 | 104 | UInt32 to_precision = 0; | 151 | | UInt32 to_scale = 0; | 152 | | | 153 | | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | 104 | const auto* to_decimal_type = | 157 | 104 | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | 104 | ToDataType::check_type_precision(to_precision); | 160 | 104 | | 161 | 71 | to_scale = to_decimal_type->get_scale(); | 162 | 71 | ToDataType::check_type_scale(to_scale); | 163 | 71 | } | 164 | 104 | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | 104 | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 0 | to_precision = to_max_digits; | 167 | 104 | } |
function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_15DataTypeDecimalILNS_13PrimitiveTypeE35EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_14DataTypeNumberILSD_5EEESE_EEEEbSI_ Line | Count | Source | 114 | 122 | return false; | 115 | 122 | } | 116 | 122 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | 122 | IsDatelikeV2Types<ToDataType> || | 123 | 122 | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | 122 | return false; | 125 | 122 | } | 126 | 122 | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | | using Types2 = std::decay_t<decltype(types2)>; | 129 | | using FromDataType = typename Types2::LeftType; | 130 | | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | | return false; | 134 | | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | 122 | using FromFieldType = typename FromDataType::FieldType; | 137 | 122 | using ToFieldType = typename ToDataType::FieldType; | 138 | 122 | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | 122 | | 141 | 122 | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | 122 | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | 122 | from_precision = | 145 | 122 | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | 122 | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | 122 | | 149 | 122 | UInt32 to_max_digits = 0; | 150 | 122 | UInt32 to_precision = 0; | 151 | | UInt32 to_scale = 0; | 152 | | | 153 | | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | 122 | const auto* to_decimal_type = | 157 | 122 | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | 122 | ToDataType::check_type_precision(to_precision); | 160 | 122 | | 161 | 84 | to_scale = to_decimal_type->get_scale(); | 162 | 84 | ToDataType::check_type_scale(to_scale); | 163 | 84 | } | 164 | 122 | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | 122 | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 0 | to_precision = to_max_digits; | 167 | 122 | } |
function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_15DataTypeDecimalILNS_13PrimitiveTypeE35EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_14DataTypeNumberILSD_6EEESE_EEEEbSI_ Line | Count | Source | 114 | 104 | return false; | 115 | 104 | } | 116 | 104 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | 104 | IsDatelikeV2Types<ToDataType> || | 123 | 104 | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | 104 | return false; | 125 | 104 | } | 126 | 104 | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | | using Types2 = std::decay_t<decltype(types2)>; | 129 | | using FromDataType = typename Types2::LeftType; | 130 | | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | | return false; | 134 | | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | 104 | using FromFieldType = typename FromDataType::FieldType; | 137 | 104 | using ToFieldType = typename ToDataType::FieldType; | 138 | 104 | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | 104 | | 141 | 104 | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | 104 | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | 104 | from_precision = | 145 | 104 | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | 104 | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | 104 | | 149 | 104 | UInt32 to_max_digits = 0; | 150 | 104 | UInt32 to_precision = 0; | 151 | | UInt32 to_scale = 0; | 152 | | | 153 | | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | 104 | const auto* to_decimal_type = | 157 | 104 | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | 104 | ToDataType::check_type_precision(to_precision); | 160 | 104 | | 161 | 71 | to_scale = to_decimal_type->get_scale(); | 162 | 71 | ToDataType::check_type_scale(to_scale); | 163 | 71 | } | 164 | 104 | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | 104 | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 0 | to_precision = to_max_digits; | 167 | 104 | } |
function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_15DataTypeDecimalILNS_13PrimitiveTypeE35EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_14DataTypeNumberILSD_7EEESE_EEEEbSI_ Line | Count | Source | 114 | 166 | return false; | 115 | 166 | } | 116 | 166 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | 166 | IsDatelikeV2Types<ToDataType> || | 123 | 166 | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | 166 | return false; | 125 | 166 | } | 126 | 166 | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | | using Types2 = std::decay_t<decltype(types2)>; | 129 | | using FromDataType = typename Types2::LeftType; | 130 | | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | | return false; | 134 | | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | 166 | using FromFieldType = typename FromDataType::FieldType; | 137 | 166 | using ToFieldType = typename ToDataType::FieldType; | 138 | 166 | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | 166 | | 141 | 166 | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | 166 | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | 166 | from_precision = | 145 | 166 | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | 166 | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | 166 | | 149 | 166 | UInt32 to_max_digits = 0; | 150 | 166 | UInt32 to_precision = 0; | 151 | | UInt32 to_scale = 0; | 152 | | | 153 | | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | 166 | const auto* to_decimal_type = | 157 | 166 | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | 166 | ToDataType::check_type_precision(to_precision); | 160 | 166 | | 161 | 122 | to_scale = to_decimal_type->get_scale(); | 162 | 122 | ToDataType::check_type_scale(to_scale); | 163 | 122 | } | 164 | 166 | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | 166 | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 0 | to_precision = to_max_digits; | 167 | 166 | } |
function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_15DataTypeDecimalILNS_13PrimitiveTypeE35EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_14DataTypeNumberILSD_8EEESE_EEEEbSI_ Line | Count | Source | 114 | 180 | return false; | 115 | 180 | } | 116 | 180 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | 180 | IsDatelikeV2Types<ToDataType> || | 123 | 180 | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | 180 | return false; | 125 | 180 | } | 126 | 180 | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | | using Types2 = std::decay_t<decltype(types2)>; | 129 | | using FromDataType = typename Types2::LeftType; | 130 | | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | | return false; | 134 | | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | 180 | using FromFieldType = typename FromDataType::FieldType; | 137 | 180 | using ToFieldType = typename ToDataType::FieldType; | 138 | 180 | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | 180 | | 141 | 180 | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | 180 | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | 180 | from_precision = | 145 | 180 | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | 180 | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | 180 | | 149 | 180 | UInt32 to_max_digits = 0; | 150 | 180 | UInt32 to_precision = 0; | 151 | | UInt32 to_scale = 0; | 152 | | | 153 | | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | 180 | const auto* to_decimal_type = | 157 | 180 | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | 180 | ToDataType::check_type_precision(to_precision); | 160 | 180 | | 161 | 114 | to_scale = to_decimal_type->get_scale(); | 162 | 114 | ToDataType::check_type_scale(to_scale); | 163 | 114 | } | 164 | 180 | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | 180 | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 0 | to_precision = to_max_digits; | 167 | 180 | } |
function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_15DataTypeDecimalILNS_13PrimitiveTypeE35EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_14DataTypeNumberILSD_9EEESE_EEEEbSI_ Line | Count | Source | 114 | 276 | return false; | 115 | 276 | } | 116 | 276 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | 276 | IsDatelikeV2Types<ToDataType> || | 123 | 276 | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | 276 | return false; | 125 | 276 | } | 126 | 276 | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | | using Types2 = std::decay_t<decltype(types2)>; | 129 | | using FromDataType = typename Types2::LeftType; | 130 | | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | | return false; | 134 | | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | 276 | using FromFieldType = typename FromDataType::FieldType; | 137 | 276 | using ToFieldType = typename ToDataType::FieldType; | 138 | 276 | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | 276 | | 141 | 276 | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | 276 | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | 276 | from_precision = | 145 | 276 | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | 276 | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | 276 | | 149 | 276 | UInt32 to_max_digits = 0; | 150 | 276 | UInt32 to_precision = 0; | 151 | | UInt32 to_scale = 0; | 152 | | | 153 | | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | 276 | const auto* to_decimal_type = | 157 | 276 | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | 276 | ToDataType::check_type_precision(to_precision); | 160 | 276 | | 161 | 196 | to_scale = to_decimal_type->get_scale(); | 162 | 196 | ToDataType::check_type_scale(to_scale); | 163 | 196 | } | 164 | 276 | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | 276 | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 0 | to_precision = to_max_digits; | 167 | 276 | } |
function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_15DataTypeDecimalILNS_13PrimitiveTypeE35EEEvEEEEbRKT_ENKUlSI_E_clINSB_INSC_ILSD_28EEESE_EEEEbSI_ Line | Count | Source | 114 | 429 | return false; | 115 | 429 | } | 116 | 429 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | 429 | IsDatelikeV2Types<ToDataType> || | 123 | 429 | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | 429 | return false; | 125 | 429 | } | 126 | 429 | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | 429 | using Types2 = std::decay_t<decltype(types2)>; | 129 | 429 | using FromDataType = typename Types2::LeftType; | 130 | 429 | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | 429 | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | 429 | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | 429 | return false; | 134 | 429 | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | 429 | using FromFieldType = typename FromDataType::FieldType; | 137 | 429 | using ToFieldType = typename ToDataType::FieldType; | 138 | 429 | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | 429 | | 141 | 429 | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | 429 | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | 429 | from_precision = | 145 | 429 | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | 429 | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | 429 | | 149 | 429 | UInt32 to_max_digits = 0; | 150 | 429 | UInt32 to_precision = 0; | 151 | | UInt32 to_scale = 0; | 152 | | | 153 | | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | 429 | const auto* to_decimal_type = | 157 | 429 | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | 429 | ToDataType::check_type_precision(to_precision); | 160 | 429 | | 161 | 361 | to_scale = to_decimal_type->get_scale(); | 162 | 361 | ToDataType::check_type_scale(to_scale); | 163 | 361 | } | 164 | 429 | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | 429 | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 0 | to_precision = to_max_digits; | 167 | 429 | } |
function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_15DataTypeDecimalILNS_13PrimitiveTypeE35EEEvEEEEbRKT_ENKUlSI_E_clINSB_INSC_ILSD_29EEESE_EEEEbSI_ Line | Count | Source | 114 | 671 | return false; | 115 | 671 | } | 116 | 671 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | 671 | IsDatelikeV2Types<ToDataType> || | 123 | 671 | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | 671 | return false; | 125 | 671 | } | 126 | 671 | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | 671 | using Types2 = std::decay_t<decltype(types2)>; | 129 | 671 | using FromDataType = typename Types2::LeftType; | 130 | 671 | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | 671 | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | 671 | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | 671 | return false; | 134 | 671 | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | 671 | using FromFieldType = typename FromDataType::FieldType; | 137 | 671 | using ToFieldType = typename ToDataType::FieldType; | 138 | 671 | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | 671 | | 141 | 671 | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | 671 | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | 671 | from_precision = | 145 | 671 | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | 671 | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | 671 | | 149 | 671 | UInt32 to_max_digits = 0; | 150 | 671 | UInt32 to_precision = 0; | 151 | | UInt32 to_scale = 0; | 152 | | | 153 | | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | 671 | const auto* to_decimal_type = | 157 | 671 | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | 671 | ToDataType::check_type_precision(to_precision); | 160 | 671 | | 161 | 544 | to_scale = to_decimal_type->get_scale(); | 162 | 544 | ToDataType::check_type_scale(to_scale); | 163 | 544 | } | 164 | 671 | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | 671 | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 0 | to_precision = to_max_digits; | 167 | 671 | } |
function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_15DataTypeDecimalILNS_13PrimitiveTypeE35EEEvEEEEbRKT_ENKUlSI_E_clINSB_INSC_ILSD_20EEESE_EEEEbSI_ Line | Count | Source | 114 | 148 | return false; | 115 | 148 | } | 116 | 148 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | 148 | IsDatelikeV2Types<ToDataType> || | 123 | 148 | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | 148 | return false; | 125 | 148 | } | 126 | 148 | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | 148 | using Types2 = std::decay_t<decltype(types2)>; | 129 | 148 | using FromDataType = typename Types2::LeftType; | 130 | 148 | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | 148 | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | 148 | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | 148 | return false; | 134 | 148 | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | 148 | using FromFieldType = typename FromDataType::FieldType; | 137 | 148 | using ToFieldType = typename ToDataType::FieldType; | 138 | 148 | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | 148 | | 141 | 148 | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | 148 | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | 148 | from_precision = | 145 | 148 | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | 148 | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | 148 | | 149 | 148 | UInt32 to_max_digits = 0; | 150 | 148 | UInt32 to_precision = 0; | 151 | | UInt32 to_scale = 0; | 152 | | | 153 | | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | 148 | const auto* to_decimal_type = | 157 | 148 | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | 148 | ToDataType::check_type_precision(to_precision); | 160 | 148 | | 161 | 84 | to_scale = to_decimal_type->get_scale(); | 162 | 84 | ToDataType::check_type_scale(to_scale); | 163 | 84 | } | 164 | 148 | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | 148 | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 0 | to_precision = to_max_digits; | 167 | 148 | } |
function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_15DataTypeDecimalILNS_13PrimitiveTypeE35EEEvEEEEbRKT_ENKUlSI_E_clINSB_INSC_ILSD_30EEESE_EEEEbSI_ Line | Count | Source | 114 | 961 | return false; | 115 | 961 | } | 116 | 961 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | 961 | IsDatelikeV2Types<ToDataType> || | 123 | 961 | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | 961 | return false; | 125 | 961 | } | 126 | 961 | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | 961 | using Types2 = std::decay_t<decltype(types2)>; | 129 | 961 | using FromDataType = typename Types2::LeftType; | 130 | 961 | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | 961 | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | 961 | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | 961 | return false; | 134 | 961 | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | 961 | using FromFieldType = typename FromDataType::FieldType; | 137 | 961 | using ToFieldType = typename ToDataType::FieldType; | 138 | 961 | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | 961 | | 141 | 961 | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | 961 | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | 961 | from_precision = | 145 | 961 | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | 961 | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | 961 | | 149 | 961 | UInt32 to_max_digits = 0; | 150 | 961 | UInt32 to_precision = 0; | 151 | | UInt32 to_scale = 0; | 152 | | | 153 | | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | 961 | const auto* to_decimal_type = | 157 | 961 | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | 961 | ToDataType::check_type_precision(to_precision); | 160 | 961 | | 161 | 506 | to_scale = to_decimal_type->get_scale(); | 162 | 506 | ToDataType::check_type_scale(to_scale); | 163 | 506 | } | 164 | 961 | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | 961 | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 0 | to_precision = to_max_digits; | 167 | 961 | } |
function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_15DataTypeDecimalILNS_13PrimitiveTypeE35EEEvEEEEbRKT_ENKUlSI_E_clINSB_ISE_SE_EEEEbSI_ Line | Count | Source | 114 | 681 | return false; | 115 | 681 | } | 116 | 681 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | 681 | IsDatelikeV2Types<ToDataType> || | 123 | 681 | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | 681 | return false; | 125 | 681 | } | 126 | 681 | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | 681 | using Types2 = std::decay_t<decltype(types2)>; | 129 | 681 | using FromDataType = typename Types2::LeftType; | 130 | 681 | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | 681 | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | 681 | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | 681 | return false; | 134 | 681 | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | 681 | using FromFieldType = typename FromDataType::FieldType; | 137 | 681 | using ToFieldType = typename ToDataType::FieldType; | 138 | 681 | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | 681 | | 141 | 681 | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | 681 | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | 681 | from_precision = | 145 | 681 | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | 681 | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | 681 | | 149 | 681 | UInt32 to_max_digits = 0; | 150 | 681 | UInt32 to_precision = 0; | 151 | | UInt32 to_scale = 0; | 152 | | | 153 | | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | 681 | const auto* to_decimal_type = | 157 | 681 | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | 681 | ToDataType::check_type_precision(to_precision); | 160 | 681 | | 161 | 335 | to_scale = to_decimal_type->get_scale(); | 162 | 335 | ToDataType::check_type_scale(to_scale); | 163 | 335 | } | 164 | 681 | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | 681 | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 0 | to_precision = to_max_digits; | 167 | 681 | } |
Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_15DataTypeDecimalILNS_13PrimitiveTypeE35EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_12DataTypeDateESE_EEEEbSI_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_15DataTypeDecimalILNS_13PrimitiveTypeE35EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_14DataTypeDateV2ESE_EEEEbSI_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_15DataTypeDecimalILNS_13PrimitiveTypeE35EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_18DataTypeDateTimeV2ESE_EEEEbSI_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_15DataTypeDecimalILNS_13PrimitiveTypeE35EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_16DataTypeDateTimeESE_EEEEbSI_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_15DataTypeDecimalILNS_13PrimitiveTypeE35EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_14DataTypeTimeV2ESE_EEEEbSI_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_15DataTypeDecimalILNS_13PrimitiveTypeE35EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_19DataTypeTimeStampTzESE_EEEEbSI_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_15DataTypeDecimalILNS_13PrimitiveTypeE35EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_12DataTypeIPv4ESE_EEEEbSI_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_15DataTypeDecimalILNS_13PrimitiveTypeE35EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_12DataTypeIPv6ESE_EEEEbSI_ function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_15DataTypeDecimalILNS_13PrimitiveTypeE35EEEvEEEEbRKT_ENKUlSI_E_clINSB_INS_14DataTypeStringESE_EEEEbSI_ Line | Count | Source | 114 | 3.57k | return false; | 115 | 3.57k | } | 116 | 3.57k | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | 3.57k | using ToDataType = typename Types::LeftType; | 120 | 3.57k | | 121 | 3.57k | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | 3.57k | IsDatelikeV2Types<ToDataType> || | 123 | 3.57k | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | 3.57k | return false; | 125 | 3.57k | } | 126 | 3.57k | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | | using Types2 = std::decay_t<decltype(types2)>; | 129 | | using FromDataType = typename Types2::LeftType; | 130 | | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | | return false; | 134 | | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | 3.57k | using FromFieldType = typename FromDataType::FieldType; | 137 | 3.57k | using ToFieldType = typename ToDataType::FieldType; | 138 | 3.57k | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | 3.57k | | 141 | 3.57k | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | 3.57k | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | 3.57k | from_precision = | 145 | 3.57k | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | 3.57k | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | 3.57k | | 149 | 3.57k | UInt32 to_max_digits = 0; | 150 | 3.57k | UInt32 to_precision = 0; | 151 | | UInt32 to_scale = 0; | 152 | | | 153 | | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | 3.57k | const auto* to_decimal_type = | 157 | 3.57k | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | 3.57k | ToDataType::check_type_precision(to_precision); | 160 | 3.57k |
| 161 | 0 | to_scale = to_decimal_type->get_scale(); | 162 | 0 | ToDataType::check_type_scale(to_scale); | 163 | 0 | } | 164 | 3.57k | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | 3.57k | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 0 | to_precision = to_max_digits; | 167 | 3.57k | } |
Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_12DataTypeDateEvEEEEbRKT_ENKUlSG_E_clINSB_INS_14DataTypeNumberILNS_13PrimitiveTypeE2EEESC_EEEEbSG_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_12DataTypeDateEvEEEEbRKT_ENKUlSG_E_clINSB_INS_14DataTypeNumberILNS_13PrimitiveTypeE3EEESC_EEEEbSG_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_12DataTypeDateEvEEEEbRKT_ENKUlSG_E_clINSB_INS_14DataTypeNumberILNS_13PrimitiveTypeE4EEESC_EEEEbSG_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_12DataTypeDateEvEEEEbRKT_ENKUlSG_E_clINSB_INS_14DataTypeNumberILNS_13PrimitiveTypeE5EEESC_EEEEbSG_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_12DataTypeDateEvEEEEbRKT_ENKUlSG_E_clINSB_INS_14DataTypeNumberILNS_13PrimitiveTypeE6EEESC_EEEEbSG_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_12DataTypeDateEvEEEEbRKT_ENKUlSG_E_clINSB_INS_14DataTypeNumberILNS_13PrimitiveTypeE7EEESC_EEEEbSG_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_12DataTypeDateEvEEEEbRKT_ENKUlSG_E_clINSB_INS_14DataTypeNumberILNS_13PrimitiveTypeE8EEESC_EEEEbSG_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_12DataTypeDateEvEEEEbRKT_ENKUlSG_E_clINSB_INS_14DataTypeNumberILNS_13PrimitiveTypeE9EEESC_EEEEbSG_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_12DataTypeDateEvEEEEbRKT_ENKUlSG_E_clINSB_INS_15DataTypeDecimalILNS_13PrimitiveTypeE28EEESC_EEEEbSG_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_12DataTypeDateEvEEEEbRKT_ENKUlSG_E_clINSB_INS_15DataTypeDecimalILNS_13PrimitiveTypeE29EEESC_EEEEbSG_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_12DataTypeDateEvEEEEbRKT_ENKUlSG_E_clINSB_INS_15DataTypeDecimalILNS_13PrimitiveTypeE20EEESC_EEEEbSG_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_12DataTypeDateEvEEEEbRKT_ENKUlSG_E_clINSB_INS_15DataTypeDecimalILNS_13PrimitiveTypeE30EEESC_EEEEbSG_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_12DataTypeDateEvEEEEbRKT_ENKUlSG_E_clINSB_INS_15DataTypeDecimalILNS_13PrimitiveTypeE35EEESC_EEEEbSG_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_12DataTypeDateEvEEEEbRKT_ENKUlSG_E_clINSB_ISC_SC_EEEEbSG_ function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_12DataTypeDateEvEEEEbRKT_ENKUlSG_E_clINSB_INS_14DataTypeDateV2ESC_EEEEbSG_ Line | Count | Source | 114 | 1 | return false; | 115 | 1 | } | 116 | 1 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | | IsDatelikeV2Types<ToDataType> || | 123 | | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | | return false; | 125 | | } | 126 | | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | | using Types2 = std::decay_t<decltype(types2)>; | 129 | | using FromDataType = typename Types2::LeftType; | 130 | | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | | return false; | 134 | | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | | using FromFieldType = typename FromDataType::FieldType; | 137 | | using ToFieldType = typename ToDataType::FieldType; | 138 | | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | | | 141 | | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | | from_precision = | 145 | | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | | | 149 | | UInt32 to_max_digits = 0; | 150 | | UInt32 to_precision = 0; | 151 | | UInt32 to_scale = 0; | 152 | | | 153 | | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | | const auto* to_decimal_type = | 157 | | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | | ToDataType::check_type_precision(to_precision); | 160 | | | 161 | | to_scale = to_decimal_type->get_scale(); | 162 | | ToDataType::check_type_scale(to_scale); | 163 | | } | 164 | | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 1 | to_precision = to_max_digits; | 167 | 1 | } |
Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_12DataTypeDateEvEEEEbRKT_ENKUlSG_E_clINSB_INS_18DataTypeDateTimeV2ESC_EEEEbSG_ function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_12DataTypeDateEvEEEEbRKT_ENKUlSG_E_clINSB_INS_16DataTypeDateTimeESC_EEEEbSG_ Line | Count | Source | 114 | 3 | return false; | 115 | 3 | } | 116 | 3 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | | IsDatelikeV2Types<ToDataType> || | 123 | | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | | return false; | 125 | | } | 126 | | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | | using Types2 = std::decay_t<decltype(types2)>; | 129 | | using FromDataType = typename Types2::LeftType; | 130 | | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | | return false; | 134 | | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | | using FromFieldType = typename FromDataType::FieldType; | 137 | | using ToFieldType = typename ToDataType::FieldType; | 138 | | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | | | 141 | | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | | from_precision = | 145 | | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | | | 149 | | UInt32 to_max_digits = 0; | 150 | | UInt32 to_precision = 0; | 151 | | UInt32 to_scale = 0; | 152 | | | 153 | | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | | const auto* to_decimal_type = | 157 | | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | | ToDataType::check_type_precision(to_precision); | 160 | | | 161 | | to_scale = to_decimal_type->get_scale(); | 162 | | ToDataType::check_type_scale(to_scale); | 163 | | } | 164 | | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 3 | to_precision = to_max_digits; | 167 | 3 | } |
Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_12DataTypeDateEvEEEEbRKT_ENKUlSG_E_clINSB_INS_14DataTypeTimeV2ESC_EEEEbSG_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_12DataTypeDateEvEEEEbRKT_ENKUlSG_E_clINSB_INS_19DataTypeTimeStampTzESC_EEEEbSG_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_12DataTypeDateEvEEEEbRKT_ENKUlSG_E_clINSB_INS_12DataTypeIPv4ESC_EEEEbSG_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_12DataTypeDateEvEEEEbRKT_ENKUlSG_E_clINSB_INS_12DataTypeIPv6ESC_EEEEbSG_ function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_12DataTypeDateEvEEEEbRKT_ENKUlSG_E_clINSB_INS_14DataTypeStringESC_EEEEbSG_ Line | Count | Source | 114 | 26 | return false; | 115 | 26 | } | 116 | 26 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | 26 | using ToDataType = typename Types::LeftType; | 120 | 26 | | 121 | 26 | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | | IsDatelikeV2Types<ToDataType> || | 123 | | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | | return false; | 125 | | } | 126 | | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | | using Types2 = std::decay_t<decltype(types2)>; | 129 | | using FromDataType = typename Types2::LeftType; | 130 | | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | | return false; | 134 | | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | | using FromFieldType = typename FromDataType::FieldType; | 137 | | using ToFieldType = typename ToDataType::FieldType; | 138 | | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | | | 141 | | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | | from_precision = | 145 | | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | | | 149 | | UInt32 to_max_digits = 0; | 150 | | UInt32 to_precision = 0; | 151 | | UInt32 to_scale = 0; | 152 | | | 153 | | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | | const auto* to_decimal_type = | 157 | | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | | ToDataType::check_type_precision(to_precision); | 160 | | | 161 | | to_scale = to_decimal_type->get_scale(); | 162 | | ToDataType::check_type_scale(to_scale); | 163 | | } | 164 | | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 26 | to_precision = to_max_digits; | 167 | 26 | } |
Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeDateV2EvEEEEbRKT_ENKUlSG_E_clINSB_INS_14DataTypeNumberILNS_13PrimitiveTypeE2EEESC_EEEEbSG_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeDateV2EvEEEEbRKT_ENKUlSG_E_clINSB_INS_14DataTypeNumberILNS_13PrimitiveTypeE3EEESC_EEEEbSG_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeDateV2EvEEEEbRKT_ENKUlSG_E_clINSB_INS_14DataTypeNumberILNS_13PrimitiveTypeE4EEESC_EEEEbSG_ function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeDateV2EvEEEEbRKT_ENKUlSG_E_clINSB_INS_14DataTypeNumberILNS_13PrimitiveTypeE5EEESC_EEEEbSG_ Line | Count | Source | 114 | 10 | return false; | 115 | 10 | } | 116 | 10 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | | IsDatelikeV2Types<ToDataType> || | 123 | | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | | return false; | 125 | | } | 126 | | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | | using Types2 = std::decay_t<decltype(types2)>; | 129 | | using FromDataType = typename Types2::LeftType; | 130 | | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | | return false; | 134 | | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | | using FromFieldType = typename FromDataType::FieldType; | 137 | | using ToFieldType = typename ToDataType::FieldType; | 138 | | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | | | 141 | | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | | from_precision = | 145 | | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | | | 149 | | UInt32 to_max_digits = 0; | 150 | | UInt32 to_precision = 0; | 151 | | UInt32 to_scale = 0; | 152 | | | 153 | | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | | const auto* to_decimal_type = | 157 | | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | | ToDataType::check_type_precision(to_precision); | 160 | | | 161 | | to_scale = to_decimal_type->get_scale(); | 162 | | ToDataType::check_type_scale(to_scale); | 163 | | } | 164 | | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 10 | to_precision = to_max_digits; | 167 | 10 | } |
function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeDateV2EvEEEEbRKT_ENKUlSG_E_clINSB_INS_14DataTypeNumberILNS_13PrimitiveTypeE6EEESC_EEEEbSG_ Line | Count | Source | 114 | 7 | return false; | 115 | 7 | } | 116 | 7 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | | IsDatelikeV2Types<ToDataType> || | 123 | | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | | return false; | 125 | | } | 126 | | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | | using Types2 = std::decay_t<decltype(types2)>; | 129 | | using FromDataType = typename Types2::LeftType; | 130 | | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | | return false; | 134 | | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | | using FromFieldType = typename FromDataType::FieldType; | 137 | | using ToFieldType = typename ToDataType::FieldType; | 138 | | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | | | 141 | | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | | from_precision = | 145 | | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | | | 149 | | UInt32 to_max_digits = 0; | 150 | | UInt32 to_precision = 0; | 151 | | UInt32 to_scale = 0; | 152 | | | 153 | | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | | const auto* to_decimal_type = | 157 | | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | | ToDataType::check_type_precision(to_precision); | 160 | | | 161 | | to_scale = to_decimal_type->get_scale(); | 162 | | ToDataType::check_type_scale(to_scale); | 163 | | } | 164 | | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 7 | to_precision = to_max_digits; | 167 | 7 | } |
Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeDateV2EvEEEEbRKT_ENKUlSG_E_clINSB_INS_14DataTypeNumberILNS_13PrimitiveTypeE7EEESC_EEEEbSG_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeDateV2EvEEEEbRKT_ENKUlSG_E_clINSB_INS_14DataTypeNumberILNS_13PrimitiveTypeE8EEESC_EEEEbSG_ function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeDateV2EvEEEEbRKT_ENKUlSG_E_clINSB_INS_14DataTypeNumberILNS_13PrimitiveTypeE9EEESC_EEEEbSG_ Line | Count | Source | 114 | 7 | return false; | 115 | 7 | } | 116 | 7 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | | IsDatelikeV2Types<ToDataType> || | 123 | | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | | return false; | 125 | | } | 126 | | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | | using Types2 = std::decay_t<decltype(types2)>; | 129 | | using FromDataType = typename Types2::LeftType; | 130 | | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | | return false; | 134 | | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | | using FromFieldType = typename FromDataType::FieldType; | 137 | | using ToFieldType = typename ToDataType::FieldType; | 138 | | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | | | 141 | | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | | from_precision = | 145 | | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | | | 149 | | UInt32 to_max_digits = 0; | 150 | | UInt32 to_precision = 0; | 151 | | UInt32 to_scale = 0; | 152 | | | 153 | | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | | const auto* to_decimal_type = | 157 | | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | | ToDataType::check_type_precision(to_precision); | 160 | | | 161 | | to_scale = to_decimal_type->get_scale(); | 162 | | ToDataType::check_type_scale(to_scale); | 163 | | } | 164 | | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 7 | to_precision = to_max_digits; | 167 | 7 | } |
Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeDateV2EvEEEEbRKT_ENKUlSG_E_clINSB_INS_15DataTypeDecimalILNS_13PrimitiveTypeE28EEESC_EEEEbSG_ function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeDateV2EvEEEEbRKT_ENKUlSG_E_clINSB_INS_15DataTypeDecimalILNS_13PrimitiveTypeE29EEESC_EEEEbSG_ Line | Count | Source | 114 | 2 | return false; | 115 | 2 | } | 116 | 2 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | 2 | IsDatelikeV2Types<ToDataType> || | 123 | 2 | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | 2 | return false; | 125 | 2 | } | 126 | 2 | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | 2 | using Types2 = std::decay_t<decltype(types2)>; | 129 | 2 | using FromDataType = typename Types2::LeftType; | 130 | 2 | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | 2 | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | 2 | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | 2 | return false; | 134 | 2 | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | 2 | using FromFieldType = typename FromDataType::FieldType; | 137 | 2 | using ToFieldType = typename ToDataType::FieldType; | 138 | 2 | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | | | 141 | | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | | from_precision = | 145 | | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | | | 149 | | UInt32 to_max_digits = 0; | 150 | | UInt32 to_precision = 0; | 151 | | UInt32 to_scale = 0; | 152 | | | 153 | | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | 2 | const auto* to_decimal_type = | 157 | 2 | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | 2 | ToDataType::check_type_precision(to_precision); | 160 | 2 |
| 161 | 0 | to_scale = to_decimal_type->get_scale(); | 162 | 0 | ToDataType::check_type_scale(to_scale); | 163 | 0 | } | 164 | 2 | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | 2 | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 0 | to_precision = to_max_digits; | 167 | 2 | } |
Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeDateV2EvEEEEbRKT_ENKUlSG_E_clINSB_INS_15DataTypeDecimalILNS_13PrimitiveTypeE20EEESC_EEEEbSG_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeDateV2EvEEEEbRKT_ENKUlSG_E_clINSB_INS_15DataTypeDecimalILNS_13PrimitiveTypeE30EEESC_EEEEbSG_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeDateV2EvEEEEbRKT_ENKUlSG_E_clINSB_INS_15DataTypeDecimalILNS_13PrimitiveTypeE35EEESC_EEEEbSG_ function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeDateV2EvEEEEbRKT_ENKUlSG_E_clINSB_INS_12DataTypeDateESC_EEEEbSG_ Line | Count | Source | 114 | 131 | return false; | 115 | 131 | } | 116 | 131 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | | IsDatelikeV2Types<ToDataType> || | 123 | | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | | return false; | 125 | | } | 126 | | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | | using Types2 = std::decay_t<decltype(types2)>; | 129 | | using FromDataType = typename Types2::LeftType; | 130 | | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | | return false; | 134 | | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | | using FromFieldType = typename FromDataType::FieldType; | 137 | | using ToFieldType = typename ToDataType::FieldType; | 138 | | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | | | 141 | | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | | from_precision = | 145 | | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | | | 149 | | UInt32 to_max_digits = 0; | 150 | | UInt32 to_precision = 0; | 151 | | UInt32 to_scale = 0; | 152 | | | 153 | | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | | const auto* to_decimal_type = | 157 | | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | | ToDataType::check_type_precision(to_precision); | 160 | | | 161 | | to_scale = to_decimal_type->get_scale(); | 162 | | ToDataType::check_type_scale(to_scale); | 163 | | } | 164 | | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 131 | to_precision = to_max_digits; | 167 | 131 | } |
Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeDateV2EvEEEEbRKT_ENKUlSG_E_clINSB_ISC_SC_EEEEbSG_ function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeDateV2EvEEEEbRKT_ENKUlSG_E_clINSB_INS_18DataTypeDateTimeV2ESC_EEEEbSG_ Line | Count | Source | 114 | 212 | return false; | 115 | 212 | } | 116 | 212 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | | IsDatelikeV2Types<ToDataType> || | 123 | | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | | return false; | 125 | | } | 126 | | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | | using Types2 = std::decay_t<decltype(types2)>; | 129 | | using FromDataType = typename Types2::LeftType; | 130 | | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | | return false; | 134 | | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | | using FromFieldType = typename FromDataType::FieldType; | 137 | | using ToFieldType = typename ToDataType::FieldType; | 138 | | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | | | 141 | | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | | from_precision = | 145 | | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | | | 149 | | UInt32 to_max_digits = 0; | 150 | | UInt32 to_precision = 0; | 151 | | UInt32 to_scale = 0; | 152 | | | 153 | | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | | const auto* to_decimal_type = | 157 | | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | | ToDataType::check_type_precision(to_precision); | 160 | | | 161 | | to_scale = to_decimal_type->get_scale(); | 162 | | ToDataType::check_type_scale(to_scale); | 163 | | } | 164 | | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 212 | to_precision = to_max_digits; | 167 | 212 | } |
function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeDateV2EvEEEEbRKT_ENKUlSG_E_clINSB_INS_16DataTypeDateTimeESC_EEEEbSG_ Line | Count | Source | 114 | 1 | return false; | 115 | 1 | } | 116 | 1 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | | IsDatelikeV2Types<ToDataType> || | 123 | | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | | return false; | 125 | | } | 126 | | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | | using Types2 = std::decay_t<decltype(types2)>; | 129 | | using FromDataType = typename Types2::LeftType; | 130 | | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | | return false; | 134 | | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | | using FromFieldType = typename FromDataType::FieldType; | 137 | | using ToFieldType = typename ToDataType::FieldType; | 138 | | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | | | 141 | | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | | from_precision = | 145 | | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | | | 149 | | UInt32 to_max_digits = 0; | 150 | | UInt32 to_precision = 0; | 151 | | UInt32 to_scale = 0; | 152 | | | 153 | | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | | const auto* to_decimal_type = | 157 | | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | | ToDataType::check_type_precision(to_precision); | 160 | | | 161 | | to_scale = to_decimal_type->get_scale(); | 162 | | ToDataType::check_type_scale(to_scale); | 163 | | } | 164 | | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 1 | to_precision = to_max_digits; | 167 | 1 | } |
function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeDateV2EvEEEEbRKT_ENKUlSG_E_clINSB_INS_14DataTypeTimeV2ESC_EEEEbSG_ Line | Count | Source | 114 | 2 | return false; | 115 | 2 | } | 116 | 2 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | | IsDatelikeV2Types<ToDataType> || | 123 | | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | | return false; | 125 | | } | 126 | | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | | using Types2 = std::decay_t<decltype(types2)>; | 129 | | using FromDataType = typename Types2::LeftType; | 130 | | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | | return false; | 134 | | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | | using FromFieldType = typename FromDataType::FieldType; | 137 | | using ToFieldType = typename ToDataType::FieldType; | 138 | | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | | | 141 | | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | | from_precision = | 145 | | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | | | 149 | | UInt32 to_max_digits = 0; | 150 | | UInt32 to_precision = 0; | 151 | | UInt32 to_scale = 0; | 152 | | | 153 | | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | | const auto* to_decimal_type = | 157 | | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | | ToDataType::check_type_precision(to_precision); | 160 | | | 161 | | to_scale = to_decimal_type->get_scale(); | 162 | | ToDataType::check_type_scale(to_scale); | 163 | | } | 164 | | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 2 | to_precision = to_max_digits; | 167 | 2 | } |
Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeDateV2EvEEEEbRKT_ENKUlSG_E_clINSB_INS_19DataTypeTimeStampTzESC_EEEEbSG_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeDateV2EvEEEEbRKT_ENKUlSG_E_clINSB_INS_12DataTypeIPv4ESC_EEEEbSG_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeDateV2EvEEEEbRKT_ENKUlSG_E_clINSB_INS_12DataTypeIPv6ESC_EEEEbSG_ function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeDateV2EvEEEEbRKT_ENKUlSG_E_clINSB_INS_14DataTypeStringESC_EEEEbSG_ Line | Count | Source | 114 | 5.26k | return false; | 115 | 5.26k | } | 116 | 5.26k | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | 5.26k | using ToDataType = typename Types::LeftType; | 120 | 5.26k | | 121 | 5.26k | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | | IsDatelikeV2Types<ToDataType> || | 123 | | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | | return false; | 125 | | } | 126 | | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | | using Types2 = std::decay_t<decltype(types2)>; | 129 | | using FromDataType = typename Types2::LeftType; | 130 | | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | | return false; | 134 | | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | | using FromFieldType = typename FromDataType::FieldType; | 137 | | using ToFieldType = typename ToDataType::FieldType; | 138 | | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | | | 141 | | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | | from_precision = | 145 | | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | | | 149 | | UInt32 to_max_digits = 0; | 150 | | UInt32 to_precision = 0; | 151 | | UInt32 to_scale = 0; | 152 | | | 153 | | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | | const auto* to_decimal_type = | 157 | | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | | ToDataType::check_type_precision(to_precision); | 160 | | | 161 | | to_scale = to_decimal_type->get_scale(); | 162 | | ToDataType::check_type_scale(to_scale); | 163 | | } | 164 | | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 5.26k | to_precision = to_max_digits; | 167 | 5.26k | } |
Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_18DataTypeDateTimeV2EvEEEEbRKT_ENKUlSG_E_clINSB_INS_14DataTypeNumberILNS_13PrimitiveTypeE2EEESC_EEEEbSG_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_18DataTypeDateTimeV2EvEEEEbRKT_ENKUlSG_E_clINSB_INS_14DataTypeNumberILNS_13PrimitiveTypeE3EEESC_EEEEbSG_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_18DataTypeDateTimeV2EvEEEEbRKT_ENKUlSG_E_clINSB_INS_14DataTypeNumberILNS_13PrimitiveTypeE4EEESC_EEEEbSG_ function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_18DataTypeDateTimeV2EvEEEEbRKT_ENKUlSG_E_clINSB_INS_14DataTypeNumberILNS_13PrimitiveTypeE5EEESC_EEEEbSG_ Line | Count | Source | 114 | 12 | return false; | 115 | 12 | } | 116 | 12 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | | IsDatelikeV2Types<ToDataType> || | 123 | | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | | return false; | 125 | | } | 126 | | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | | using Types2 = std::decay_t<decltype(types2)>; | 129 | | using FromDataType = typename Types2::LeftType; | 130 | | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | | return false; | 134 | | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | | using FromFieldType = typename FromDataType::FieldType; | 137 | | using ToFieldType = typename ToDataType::FieldType; | 138 | | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | | | 141 | | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | | from_precision = | 145 | | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | | | 149 | | UInt32 to_max_digits = 0; | 150 | | UInt32 to_precision = 0; | 151 | | UInt32 to_scale = 0; | 152 | | | 153 | | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | | const auto* to_decimal_type = | 157 | | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | | ToDataType::check_type_precision(to_precision); | 160 | | | 161 | | to_scale = to_decimal_type->get_scale(); | 162 | | ToDataType::check_type_scale(to_scale); | 163 | | } | 164 | | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 12 | to_precision = to_max_digits; | 167 | 12 | } |
function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_18DataTypeDateTimeV2EvEEEEbRKT_ENKUlSG_E_clINSB_INS_14DataTypeNumberILNS_13PrimitiveTypeE6EEESC_EEEEbSG_ Line | Count | Source | 114 | 32 | return false; | 115 | 32 | } | 116 | 32 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | | IsDatelikeV2Types<ToDataType> || | 123 | | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | | return false; | 125 | | } | 126 | | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | | using Types2 = std::decay_t<decltype(types2)>; | 129 | | using FromDataType = typename Types2::LeftType; | 130 | | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | | return false; | 134 | | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | | using FromFieldType = typename FromDataType::FieldType; | 137 | | using ToFieldType = typename ToDataType::FieldType; | 138 | | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | | | 141 | | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | | from_precision = | 145 | | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | | | 149 | | UInt32 to_max_digits = 0; | 150 | | UInt32 to_precision = 0; | 151 | | UInt32 to_scale = 0; | 152 | | | 153 | | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | | const auto* to_decimal_type = | 157 | | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | | ToDataType::check_type_precision(to_precision); | 160 | | | 161 | | to_scale = to_decimal_type->get_scale(); | 162 | | ToDataType::check_type_scale(to_scale); | 163 | | } | 164 | | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 32 | to_precision = to_max_digits; | 167 | 32 | } |
Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_18DataTypeDateTimeV2EvEEEEbRKT_ENKUlSG_E_clINSB_INS_14DataTypeNumberILNS_13PrimitiveTypeE7EEESC_EEEEbSG_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_18DataTypeDateTimeV2EvEEEEbRKT_ENKUlSG_E_clINSB_INS_14DataTypeNumberILNS_13PrimitiveTypeE8EEESC_EEEEbSG_ function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_18DataTypeDateTimeV2EvEEEEbRKT_ENKUlSG_E_clINSB_INS_14DataTypeNumberILNS_13PrimitiveTypeE9EEESC_EEEEbSG_ Line | Count | Source | 114 | 12 | return false; | 115 | 12 | } | 116 | 12 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | | IsDatelikeV2Types<ToDataType> || | 123 | | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | | return false; | 125 | | } | 126 | | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | | using Types2 = std::decay_t<decltype(types2)>; | 129 | | using FromDataType = typename Types2::LeftType; | 130 | | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | | return false; | 134 | | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | | using FromFieldType = typename FromDataType::FieldType; | 137 | | using ToFieldType = typename ToDataType::FieldType; | 138 | | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | | | 141 | | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | | from_precision = | 145 | | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | | | 149 | | UInt32 to_max_digits = 0; | 150 | | UInt32 to_precision = 0; | 151 | | UInt32 to_scale = 0; | 152 | | | 153 | | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | | const auto* to_decimal_type = | 157 | | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | | ToDataType::check_type_precision(to_precision); | 160 | | | 161 | | to_scale = to_decimal_type->get_scale(); | 162 | | ToDataType::check_type_scale(to_scale); | 163 | | } | 164 | | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 12 | to_precision = to_max_digits; | 167 | 12 | } |
function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_18DataTypeDateTimeV2EvEEEEbRKT_ENKUlSG_E_clINSB_INS_15DataTypeDecimalILNS_13PrimitiveTypeE28EEESC_EEEEbSG_ Line | Count | Source | 114 | 18 | return false; | 115 | 18 | } | 116 | 18 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | 18 | IsDatelikeV2Types<ToDataType> || | 123 | 18 | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | 18 | return false; | 125 | 18 | } | 126 | 18 | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | 18 | using Types2 = std::decay_t<decltype(types2)>; | 129 | 18 | using FromDataType = typename Types2::LeftType; | 130 | 18 | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | 18 | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | 18 | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | 18 | return false; | 134 | 18 | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | 18 | using FromFieldType = typename FromDataType::FieldType; | 137 | 18 | using ToFieldType = typename ToDataType::FieldType; | 138 | 18 | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | | | 141 | | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | | from_precision = | 145 | | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | | | 149 | | UInt32 to_max_digits = 0; | 150 | | UInt32 to_precision = 0; | 151 | | UInt32 to_scale = 0; | 152 | | | 153 | | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | 18 | const auto* to_decimal_type = | 157 | 18 | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | 18 | ToDataType::check_type_precision(to_precision); | 160 | 18 |
| 161 | 0 | to_scale = to_decimal_type->get_scale(); | 162 | 0 | ToDataType::check_type_scale(to_scale); | 163 | 0 | } | 164 | 18 | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | 18 | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 0 | to_precision = to_max_digits; | 167 | 18 | } |
function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_18DataTypeDateTimeV2EvEEEEbRKT_ENKUlSG_E_clINSB_INS_15DataTypeDecimalILNS_13PrimitiveTypeE29EEESC_EEEEbSG_ Line | Count | Source | 114 | 14 | return false; | 115 | 14 | } | 116 | 14 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | 14 | IsDatelikeV2Types<ToDataType> || | 123 | 14 | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | 14 | return false; | 125 | 14 | } | 126 | 14 | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | 14 | using Types2 = std::decay_t<decltype(types2)>; | 129 | 14 | using FromDataType = typename Types2::LeftType; | 130 | 14 | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | 14 | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | 14 | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | 14 | return false; | 134 | 14 | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | 14 | using FromFieldType = typename FromDataType::FieldType; | 137 | 14 | using ToFieldType = typename ToDataType::FieldType; | 138 | 14 | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | | | 141 | | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | | from_precision = | 145 | | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | | | 149 | | UInt32 to_max_digits = 0; | 150 | | UInt32 to_precision = 0; | 151 | | UInt32 to_scale = 0; | 152 | | | 153 | | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | 14 | const auto* to_decimal_type = | 157 | 14 | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | 14 | ToDataType::check_type_precision(to_precision); | 160 | 14 |
| 161 | 0 | to_scale = to_decimal_type->get_scale(); | 162 | 0 | ToDataType::check_type_scale(to_scale); | 163 | 0 | } | 164 | 14 | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | 14 | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 0 | to_precision = to_max_digits; | 167 | 14 | } |
Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_18DataTypeDateTimeV2EvEEEEbRKT_ENKUlSG_E_clINSB_INS_15DataTypeDecimalILNS_13PrimitiveTypeE20EEESC_EEEEbSG_ function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_18DataTypeDateTimeV2EvEEEEbRKT_ENKUlSG_E_clINSB_INS_15DataTypeDecimalILNS_13PrimitiveTypeE30EEESC_EEEEbSG_ Line | Count | Source | 114 | 5 | return false; | 115 | 5 | } | 116 | 5 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | 5 | IsDatelikeV2Types<ToDataType> || | 123 | 5 | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | 5 | return false; | 125 | 5 | } | 126 | 5 | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | 5 | using Types2 = std::decay_t<decltype(types2)>; | 129 | 5 | using FromDataType = typename Types2::LeftType; | 130 | 5 | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | 5 | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | 5 | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | 5 | return false; | 134 | 5 | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | 5 | using FromFieldType = typename FromDataType::FieldType; | 137 | 5 | using ToFieldType = typename ToDataType::FieldType; | 138 | 5 | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | | | 141 | | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | | from_precision = | 145 | | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | | | 149 | | UInt32 to_max_digits = 0; | 150 | | UInt32 to_precision = 0; | 151 | | UInt32 to_scale = 0; | 152 | | | 153 | | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | 5 | const auto* to_decimal_type = | 157 | 5 | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | 5 | ToDataType::check_type_precision(to_precision); | 160 | 5 |
| 161 | 0 | to_scale = to_decimal_type->get_scale(); | 162 | 0 | ToDataType::check_type_scale(to_scale); | 163 | 0 | } | 164 | 5 | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | 5 | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 0 | to_precision = to_max_digits; | 167 | 5 | } |
Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_18DataTypeDateTimeV2EvEEEEbRKT_ENKUlSG_E_clINSB_INS_15DataTypeDecimalILNS_13PrimitiveTypeE35EEESC_EEEEbSG_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_18DataTypeDateTimeV2EvEEEEbRKT_ENKUlSG_E_clINSB_INS_12DataTypeDateESC_EEEEbSG_ function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_18DataTypeDateTimeV2EvEEEEbRKT_ENKUlSG_E_clINSB_INS_14DataTypeDateV2ESC_EEEEbSG_ Line | Count | Source | 114 | 376 | return false; | 115 | 376 | } | 116 | 376 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | | IsDatelikeV2Types<ToDataType> || | 123 | | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | | return false; | 125 | | } | 126 | | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | | using Types2 = std::decay_t<decltype(types2)>; | 129 | | using FromDataType = typename Types2::LeftType; | 130 | | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | | return false; | 134 | | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | | using FromFieldType = typename FromDataType::FieldType; | 137 | | using ToFieldType = typename ToDataType::FieldType; | 138 | | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | | | 141 | | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | | from_precision = | 145 | | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | | | 149 | | UInt32 to_max_digits = 0; | 150 | | UInt32 to_precision = 0; | 151 | | UInt32 to_scale = 0; | 152 | | | 153 | | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | | const auto* to_decimal_type = | 157 | | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | | ToDataType::check_type_precision(to_precision); | 160 | | | 161 | | to_scale = to_decimal_type->get_scale(); | 162 | | ToDataType::check_type_scale(to_scale); | 163 | | } | 164 | | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 376 | to_precision = to_max_digits; | 167 | 376 | } |
function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_18DataTypeDateTimeV2EvEEEEbRKT_ENKUlSG_E_clINSB_ISC_SC_EEEEbSG_ Line | Count | Source | 114 | 105 | return false; | 115 | 105 | } | 116 | 105 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | | IsDatelikeV2Types<ToDataType> || | 123 | | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | | return false; | 125 | | } | 126 | | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | | using Types2 = std::decay_t<decltype(types2)>; | 129 | | using FromDataType = typename Types2::LeftType; | 130 | | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | | return false; | 134 | | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | | using FromFieldType = typename FromDataType::FieldType; | 137 | | using ToFieldType = typename ToDataType::FieldType; | 138 | | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | | | 141 | | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | | from_precision = | 145 | | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | | | 149 | | UInt32 to_max_digits = 0; | 150 | | UInt32 to_precision = 0; | 151 | | UInt32 to_scale = 0; | 152 | | | 153 | | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | | const auto* to_decimal_type = | 157 | | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | | ToDataType::check_type_precision(to_precision); | 160 | | | 161 | | to_scale = to_decimal_type->get_scale(); | 162 | | ToDataType::check_type_scale(to_scale); | 163 | | } | 164 | | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 105 | to_precision = to_max_digits; | 167 | 105 | } |
function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_18DataTypeDateTimeV2EvEEEEbRKT_ENKUlSG_E_clINSB_INS_16DataTypeDateTimeESC_EEEEbSG_ Line | Count | Source | 114 | 138 | return false; | 115 | 138 | } | 116 | 138 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | | IsDatelikeV2Types<ToDataType> || | 123 | | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | | return false; | 125 | | } | 126 | | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | | using Types2 = std::decay_t<decltype(types2)>; | 129 | | using FromDataType = typename Types2::LeftType; | 130 | | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | | return false; | 134 | | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | | using FromFieldType = typename FromDataType::FieldType; | 137 | | using ToFieldType = typename ToDataType::FieldType; | 138 | | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | | | 141 | | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | | from_precision = | 145 | | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | | | 149 | | UInt32 to_max_digits = 0; | 150 | | UInt32 to_precision = 0; | 151 | | UInt32 to_scale = 0; | 152 | | | 153 | | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | | const auto* to_decimal_type = | 157 | | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | | ToDataType::check_type_precision(to_precision); | 160 | | | 161 | | to_scale = to_decimal_type->get_scale(); | 162 | | ToDataType::check_type_scale(to_scale); | 163 | | } | 164 | | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 138 | to_precision = to_max_digits; | 167 | 138 | } |
function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_18DataTypeDateTimeV2EvEEEEbRKT_ENKUlSG_E_clINSB_INS_14DataTypeTimeV2ESC_EEEEbSG_ Line | Count | Source | 114 | 4 | return false; | 115 | 4 | } | 116 | 4 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | | IsDatelikeV2Types<ToDataType> || | 123 | | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | | return false; | 125 | | } | 126 | | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | | using Types2 = std::decay_t<decltype(types2)>; | 129 | | using FromDataType = typename Types2::LeftType; | 130 | | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | | return false; | 134 | | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | | using FromFieldType = typename FromDataType::FieldType; | 137 | | using ToFieldType = typename ToDataType::FieldType; | 138 | | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | | | 141 | | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | | from_precision = | 145 | | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | | | 149 | | UInt32 to_max_digits = 0; | 150 | | UInt32 to_precision = 0; | 151 | | UInt32 to_scale = 0; | 152 | | | 153 | | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | | const auto* to_decimal_type = | 157 | | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | | ToDataType::check_type_precision(to_precision); | 160 | | | 161 | | to_scale = to_decimal_type->get_scale(); | 162 | | ToDataType::check_type_scale(to_scale); | 163 | | } | 164 | | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 4 | to_precision = to_max_digits; | 167 | 4 | } |
function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_18DataTypeDateTimeV2EvEEEEbRKT_ENKUlSG_E_clINSB_INS_19DataTypeTimeStampTzESC_EEEEbSG_ Line | Count | Source | 114 | 46 | return false; | 115 | 46 | } | 116 | 46 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | 46 | using ToDataType = typename Types::LeftType; | 120 | 46 | | 121 | 46 | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | | IsDatelikeV2Types<ToDataType> || | 123 | | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | | return false; | 125 | | } | 126 | | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | | using Types2 = std::decay_t<decltype(types2)>; | 129 | | using FromDataType = typename Types2::LeftType; | 130 | | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | | return false; | 134 | | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | | using FromFieldType = typename FromDataType::FieldType; | 137 | | using ToFieldType = typename ToDataType::FieldType; | 138 | | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | | | 141 | | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | | from_precision = | 145 | | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | | | 149 | | UInt32 to_max_digits = 0; | 150 | | UInt32 to_precision = 0; | 151 | | UInt32 to_scale = 0; | 152 | | | 153 | | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | | const auto* to_decimal_type = | 157 | | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | | ToDataType::check_type_precision(to_precision); | 160 | | | 161 | | to_scale = to_decimal_type->get_scale(); | 162 | | ToDataType::check_type_scale(to_scale); | 163 | | } | 164 | | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 46 | to_precision = to_max_digits; | 167 | 46 | } |
Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_18DataTypeDateTimeV2EvEEEEbRKT_ENKUlSG_E_clINSB_INS_12DataTypeIPv4ESC_EEEEbSG_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_18DataTypeDateTimeV2EvEEEEbRKT_ENKUlSG_E_clINSB_INS_12DataTypeIPv6ESC_EEEEbSG_ function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_18DataTypeDateTimeV2EvEEEEbRKT_ENKUlSG_E_clINSB_INS_14DataTypeStringESC_EEEEbSG_ Line | Count | Source | 114 | 2.78k | return false; | 115 | 2.78k | } | 116 | 2.78k | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | 2.78k | using ToDataType = typename Types::LeftType; | 120 | 2.78k | | 121 | 2.78k | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | | IsDatelikeV2Types<ToDataType> || | 123 | | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | | return false; | 125 | | } | 126 | | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | | using Types2 = std::decay_t<decltype(types2)>; | 129 | | using FromDataType = typename Types2::LeftType; | 130 | | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | | return false; | 134 | | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | | using FromFieldType = typename FromDataType::FieldType; | 137 | | using ToFieldType = typename ToDataType::FieldType; | 138 | | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | | | 141 | | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | | from_precision = | 145 | | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | | | 149 | | UInt32 to_max_digits = 0; | 150 | | UInt32 to_precision = 0; | 151 | | UInt32 to_scale = 0; | 152 | | | 153 | | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | | const auto* to_decimal_type = | 157 | | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | | ToDataType::check_type_precision(to_precision); | 160 | | | 161 | | to_scale = to_decimal_type->get_scale(); | 162 | | ToDataType::check_type_scale(to_scale); | 163 | | } | 164 | | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 2.78k | to_precision = to_max_digits; | 167 | 2.78k | } |
Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_16DataTypeDateTimeEvEEEEbRKT_ENKUlSG_E_clINSB_INS_14DataTypeNumberILNS_13PrimitiveTypeE2EEESC_EEEEbSG_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_16DataTypeDateTimeEvEEEEbRKT_ENKUlSG_E_clINSB_INS_14DataTypeNumberILNS_13PrimitiveTypeE3EEESC_EEEEbSG_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_16DataTypeDateTimeEvEEEEbRKT_ENKUlSG_E_clINSB_INS_14DataTypeNumberILNS_13PrimitiveTypeE4EEESC_EEEEbSG_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_16DataTypeDateTimeEvEEEEbRKT_ENKUlSG_E_clINSB_INS_14DataTypeNumberILNS_13PrimitiveTypeE5EEESC_EEEEbSG_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_16DataTypeDateTimeEvEEEEbRKT_ENKUlSG_E_clINSB_INS_14DataTypeNumberILNS_13PrimitiveTypeE6EEESC_EEEEbSG_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_16DataTypeDateTimeEvEEEEbRKT_ENKUlSG_E_clINSB_INS_14DataTypeNumberILNS_13PrimitiveTypeE7EEESC_EEEEbSG_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_16DataTypeDateTimeEvEEEEbRKT_ENKUlSG_E_clINSB_INS_14DataTypeNumberILNS_13PrimitiveTypeE8EEESC_EEEEbSG_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_16DataTypeDateTimeEvEEEEbRKT_ENKUlSG_E_clINSB_INS_14DataTypeNumberILNS_13PrimitiveTypeE9EEESC_EEEEbSG_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_16DataTypeDateTimeEvEEEEbRKT_ENKUlSG_E_clINSB_INS_15DataTypeDecimalILNS_13PrimitiveTypeE28EEESC_EEEEbSG_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_16DataTypeDateTimeEvEEEEbRKT_ENKUlSG_E_clINSB_INS_15DataTypeDecimalILNS_13PrimitiveTypeE29EEESC_EEEEbSG_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_16DataTypeDateTimeEvEEEEbRKT_ENKUlSG_E_clINSB_INS_15DataTypeDecimalILNS_13PrimitiveTypeE20EEESC_EEEEbSG_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_16DataTypeDateTimeEvEEEEbRKT_ENKUlSG_E_clINSB_INS_15DataTypeDecimalILNS_13PrimitiveTypeE30EEESC_EEEEbSG_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_16DataTypeDateTimeEvEEEEbRKT_ENKUlSG_E_clINSB_INS_15DataTypeDecimalILNS_13PrimitiveTypeE35EEESC_EEEEbSG_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_16DataTypeDateTimeEvEEEEbRKT_ENKUlSG_E_clINSB_INS_12DataTypeDateESC_EEEEbSG_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_16DataTypeDateTimeEvEEEEbRKT_ENKUlSG_E_clINSB_INS_14DataTypeDateV2ESC_EEEEbSG_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_16DataTypeDateTimeEvEEEEbRKT_ENKUlSG_E_clINSB_INS_18DataTypeDateTimeV2ESC_EEEEbSG_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_16DataTypeDateTimeEvEEEEbRKT_ENKUlSG_E_clINSB_ISC_SC_EEEEbSG_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_16DataTypeDateTimeEvEEEEbRKT_ENKUlSG_E_clINSB_INS_14DataTypeTimeV2ESC_EEEEbSG_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_16DataTypeDateTimeEvEEEEbRKT_ENKUlSG_E_clINSB_INS_19DataTypeTimeStampTzESC_EEEEbSG_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_16DataTypeDateTimeEvEEEEbRKT_ENKUlSG_E_clINSB_INS_12DataTypeIPv4ESC_EEEEbSG_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_16DataTypeDateTimeEvEEEEbRKT_ENKUlSG_E_clINSB_INS_12DataTypeIPv6ESC_EEEEbSG_ function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_16DataTypeDateTimeEvEEEEbRKT_ENKUlSG_E_clINSB_INS_14DataTypeStringESC_EEEEbSG_ Line | Count | Source | 114 | 25 | return false; | 115 | 25 | } | 116 | 25 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | 25 | using ToDataType = typename Types::LeftType; | 120 | 25 | | 121 | 25 | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | | IsDatelikeV2Types<ToDataType> || | 123 | | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | | return false; | 125 | | } | 126 | | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | | using Types2 = std::decay_t<decltype(types2)>; | 129 | | using FromDataType = typename Types2::LeftType; | 130 | | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | | return false; | 134 | | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | | using FromFieldType = typename FromDataType::FieldType; | 137 | | using ToFieldType = typename ToDataType::FieldType; | 138 | | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | | | 141 | | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | | from_precision = | 145 | | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | | | 149 | | UInt32 to_max_digits = 0; | 150 | | UInt32 to_precision = 0; | 151 | | UInt32 to_scale = 0; | 152 | | | 153 | | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | | const auto* to_decimal_type = | 157 | | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | | ToDataType::check_type_precision(to_precision); | 160 | | | 161 | | to_scale = to_decimal_type->get_scale(); | 162 | | ToDataType::check_type_scale(to_scale); | 163 | | } | 164 | | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 25 | to_precision = to_max_digits; | 167 | 25 | } |
Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeTimeV2EvEEEEbRKT_ENKUlSG_E_clINSB_INS_14DataTypeNumberILNS_13PrimitiveTypeE2EEESC_EEEEbSG_ function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeTimeV2EvEEEEbRKT_ENKUlSG_E_clINSB_INS_14DataTypeNumberILNS_13PrimitiveTypeE3EEESC_EEEEbSG_ Line | Count | Source | 114 | 28 | return false; | 115 | 28 | } | 116 | 28 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | | IsDatelikeV2Types<ToDataType> || | 123 | | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | | return false; | 125 | | } | 126 | | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | | using Types2 = std::decay_t<decltype(types2)>; | 129 | | using FromDataType = typename Types2::LeftType; | 130 | | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | | return false; | 134 | | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | | using FromFieldType = typename FromDataType::FieldType; | 137 | | using ToFieldType = typename ToDataType::FieldType; | 138 | | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | | | 141 | | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | | from_precision = | 145 | | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | | | 149 | | UInt32 to_max_digits = 0; | 150 | | UInt32 to_precision = 0; | 151 | | UInt32 to_scale = 0; | 152 | | | 153 | | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | | const auto* to_decimal_type = | 157 | | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | | ToDataType::check_type_precision(to_precision); | 160 | | | 161 | | to_scale = to_decimal_type->get_scale(); | 162 | | ToDataType::check_type_scale(to_scale); | 163 | | } | 164 | | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 28 | to_precision = to_max_digits; | 167 | 28 | } |
function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeTimeV2EvEEEEbRKT_ENKUlSG_E_clINSB_INS_14DataTypeNumberILNS_13PrimitiveTypeE4EEESC_EEEEbSG_ Line | Count | Source | 114 | 21 | return false; | 115 | 21 | } | 116 | 21 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | | IsDatelikeV2Types<ToDataType> || | 123 | | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | | return false; | 125 | | } | 126 | | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | | using Types2 = std::decay_t<decltype(types2)>; | 129 | | using FromDataType = typename Types2::LeftType; | 130 | | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | | return false; | 134 | | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | | using FromFieldType = typename FromDataType::FieldType; | 137 | | using ToFieldType = typename ToDataType::FieldType; | 138 | | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | | | 141 | | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | | from_precision = | 145 | | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | | | 149 | | UInt32 to_max_digits = 0; | 150 | | UInt32 to_precision = 0; | 151 | | UInt32 to_scale = 0; | 152 | | | 153 | | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | | const auto* to_decimal_type = | 157 | | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | | ToDataType::check_type_precision(to_precision); | 160 | | | 161 | | to_scale = to_decimal_type->get_scale(); | 162 | | ToDataType::check_type_scale(to_scale); | 163 | | } | 164 | | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 21 | to_precision = to_max_digits; | 167 | 21 | } |
function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeTimeV2EvEEEEbRKT_ENKUlSG_E_clINSB_INS_14DataTypeNumberILNS_13PrimitiveTypeE5EEESC_EEEEbSG_ Line | Count | Source | 114 | 33 | return false; | 115 | 33 | } | 116 | 33 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | | IsDatelikeV2Types<ToDataType> || | 123 | | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | | return false; | 125 | | } | 126 | | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | | using Types2 = std::decay_t<decltype(types2)>; | 129 | | using FromDataType = typename Types2::LeftType; | 130 | | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | | return false; | 134 | | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | | using FromFieldType = typename FromDataType::FieldType; | 137 | | using ToFieldType = typename ToDataType::FieldType; | 138 | | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | | | 141 | | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | | from_precision = | 145 | | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | | | 149 | | UInt32 to_max_digits = 0; | 150 | | UInt32 to_precision = 0; | 151 | | UInt32 to_scale = 0; | 152 | | | 153 | | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | | const auto* to_decimal_type = | 157 | | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | | ToDataType::check_type_precision(to_precision); | 160 | | | 161 | | to_scale = to_decimal_type->get_scale(); | 162 | | ToDataType::check_type_scale(to_scale); | 163 | | } | 164 | | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 33 | to_precision = to_max_digits; | 167 | 33 | } |
function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeTimeV2EvEEEEbRKT_ENKUlSG_E_clINSB_INS_14DataTypeNumberILNS_13PrimitiveTypeE6EEESC_EEEEbSG_ Line | Count | Source | 114 | 9 | return false; | 115 | 9 | } | 116 | 9 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | | IsDatelikeV2Types<ToDataType> || | 123 | | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | | return false; | 125 | | } | 126 | | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | | using Types2 = std::decay_t<decltype(types2)>; | 129 | | using FromDataType = typename Types2::LeftType; | 130 | | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | | return false; | 134 | | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | | using FromFieldType = typename FromDataType::FieldType; | 137 | | using ToFieldType = typename ToDataType::FieldType; | 138 | | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | | | 141 | | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | | from_precision = | 145 | | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | | | 149 | | UInt32 to_max_digits = 0; | 150 | | UInt32 to_precision = 0; | 151 | | UInt32 to_scale = 0; | 152 | | | 153 | | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | | const auto* to_decimal_type = | 157 | | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | | ToDataType::check_type_precision(to_precision); | 160 | | | 161 | | to_scale = to_decimal_type->get_scale(); | 162 | | ToDataType::check_type_scale(to_scale); | 163 | | } | 164 | | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 9 | to_precision = to_max_digits; | 167 | 9 | } |
function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeTimeV2EvEEEEbRKT_ENKUlSG_E_clINSB_INS_14DataTypeNumberILNS_13PrimitiveTypeE7EEESC_EEEEbSG_ Line | Count | Source | 114 | 3 | return false; | 115 | 3 | } | 116 | 3 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | | IsDatelikeV2Types<ToDataType> || | 123 | | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | | return false; | 125 | | } | 126 | | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | | using Types2 = std::decay_t<decltype(types2)>; | 129 | | using FromDataType = typename Types2::LeftType; | 130 | | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | | return false; | 134 | | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | | using FromFieldType = typename FromDataType::FieldType; | 137 | | using ToFieldType = typename ToDataType::FieldType; | 138 | | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | | | 141 | | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | | from_precision = | 145 | | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | | | 149 | | UInt32 to_max_digits = 0; | 150 | | UInt32 to_precision = 0; | 151 | | UInt32 to_scale = 0; | 152 | | | 153 | | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | | const auto* to_decimal_type = | 157 | | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | | ToDataType::check_type_precision(to_precision); | 160 | | | 161 | | to_scale = to_decimal_type->get_scale(); | 162 | | ToDataType::check_type_scale(to_scale); | 163 | | } | 164 | | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 3 | to_precision = to_max_digits; | 167 | 3 | } |
function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeTimeV2EvEEEEbRKT_ENKUlSG_E_clINSB_INS_14DataTypeNumberILNS_13PrimitiveTypeE8EEESC_EEEEbSG_ Line | Count | Source | 114 | 7 | return false; | 115 | 7 | } | 116 | 7 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | | IsDatelikeV2Types<ToDataType> || | 123 | | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | | return false; | 125 | | } | 126 | | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | | using Types2 = std::decay_t<decltype(types2)>; | 129 | | using FromDataType = typename Types2::LeftType; | 130 | | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | | return false; | 134 | | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | | using FromFieldType = typename FromDataType::FieldType; | 137 | | using ToFieldType = typename ToDataType::FieldType; | 138 | | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | | | 141 | | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | | from_precision = | 145 | | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | | | 149 | | UInt32 to_max_digits = 0; | 150 | | UInt32 to_precision = 0; | 151 | | UInt32 to_scale = 0; | 152 | | | 153 | | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | | const auto* to_decimal_type = | 157 | | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | | ToDataType::check_type_precision(to_precision); | 160 | | | 161 | | to_scale = to_decimal_type->get_scale(); | 162 | | ToDataType::check_type_scale(to_scale); | 163 | | } | 164 | | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 7 | to_precision = to_max_digits; | 167 | 7 | } |
function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeTimeV2EvEEEEbRKT_ENKUlSG_E_clINSB_INS_14DataTypeNumberILNS_13PrimitiveTypeE9EEESC_EEEEbSG_ Line | Count | Source | 114 | 18 | return false; | 115 | 18 | } | 116 | 18 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | | IsDatelikeV2Types<ToDataType> || | 123 | | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | | return false; | 125 | | } | 126 | | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | | using Types2 = std::decay_t<decltype(types2)>; | 129 | | using FromDataType = typename Types2::LeftType; | 130 | | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | | return false; | 134 | | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | | using FromFieldType = typename FromDataType::FieldType; | 137 | | using ToFieldType = typename ToDataType::FieldType; | 138 | | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | | | 141 | | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | | from_precision = | 145 | | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | | | 149 | | UInt32 to_max_digits = 0; | 150 | | UInt32 to_precision = 0; | 151 | | UInt32 to_scale = 0; | 152 | | | 153 | | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | | const auto* to_decimal_type = | 157 | | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | | ToDataType::check_type_precision(to_precision); | 160 | | | 161 | | to_scale = to_decimal_type->get_scale(); | 162 | | ToDataType::check_type_scale(to_scale); | 163 | | } | 164 | | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 18 | to_precision = to_max_digits; | 167 | 18 | } |
function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeTimeV2EvEEEEbRKT_ENKUlSG_E_clINSB_INS_15DataTypeDecimalILNS_13PrimitiveTypeE28EEESC_EEEEbSG_ Line | Count | Source | 114 | 2 | return false; | 115 | 2 | } | 116 | 2 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | 2 | IsDatelikeV2Types<ToDataType> || | 123 | 2 | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | 2 | return false; | 125 | 2 | } | 126 | 2 | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | 2 | using Types2 = std::decay_t<decltype(types2)>; | 129 | 2 | using FromDataType = typename Types2::LeftType; | 130 | 2 | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | 2 | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | 2 | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | 2 | return false; | 134 | 2 | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | 2 | using FromFieldType = typename FromDataType::FieldType; | 137 | 2 | using ToFieldType = typename ToDataType::FieldType; | 138 | 2 | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | | | 141 | | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | | from_precision = | 145 | | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | | | 149 | | UInt32 to_max_digits = 0; | 150 | | UInt32 to_precision = 0; | 151 | 2 | UInt32 to_scale = 0; | 152 | 2 | | 153 | 2 | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | 2 | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | 2 | const auto* to_decimal_type = | 157 | 2 | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | 2 | ToDataType::check_type_precision(to_precision); | 160 | 2 |
| 161 | 0 | to_scale = to_decimal_type->get_scale(); | 162 | 0 | ToDataType::check_type_scale(to_scale); | 163 | 0 | } | 164 | 2 | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | 2 | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 0 | to_precision = to_max_digits; | 167 | 2 | } |
function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeTimeV2EvEEEEbRKT_ENKUlSG_E_clINSB_INS_15DataTypeDecimalILNS_13PrimitiveTypeE29EEESC_EEEEbSG_ Line | Count | Source | 114 | 1 | return false; | 115 | 1 | } | 116 | 1 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | 1 | IsDatelikeV2Types<ToDataType> || | 123 | 1 | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | 1 | return false; | 125 | 1 | } | 126 | 1 | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | 1 | using Types2 = std::decay_t<decltype(types2)>; | 129 | 1 | using FromDataType = typename Types2::LeftType; | 130 | 1 | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | 1 | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | 1 | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | 1 | return false; | 134 | 1 | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | 1 | using FromFieldType = typename FromDataType::FieldType; | 137 | 1 | using ToFieldType = typename ToDataType::FieldType; | 138 | 1 | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | | | 141 | | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | | from_precision = | 145 | | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | | | 149 | | UInt32 to_max_digits = 0; | 150 | | UInt32 to_precision = 0; | 151 | 1 | UInt32 to_scale = 0; | 152 | 1 | | 153 | 1 | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | 1 | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | 1 | const auto* to_decimal_type = | 157 | 1 | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | 1 | ToDataType::check_type_precision(to_precision); | 160 | 1 |
| 161 | 0 | to_scale = to_decimal_type->get_scale(); | 162 | 0 | ToDataType::check_type_scale(to_scale); | 163 | 0 | } | 164 | 1 | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | 1 | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 0 | to_precision = to_max_digits; | 167 | 1 | } |
function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeTimeV2EvEEEEbRKT_ENKUlSG_E_clINSB_INS_15DataTypeDecimalILNS_13PrimitiveTypeE20EEESC_EEEEbSG_ Line | Count | Source | 114 | 1 | return false; | 115 | 1 | } | 116 | 1 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | 1 | IsDatelikeV2Types<ToDataType> || | 123 | 1 | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | 1 | return false; | 125 | 1 | } | 126 | 1 | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | 1 | using Types2 = std::decay_t<decltype(types2)>; | 129 | 1 | using FromDataType = typename Types2::LeftType; | 130 | 1 | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | 1 | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | 1 | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | 1 | return false; | 134 | 1 | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | 1 | using FromFieldType = typename FromDataType::FieldType; | 137 | 1 | using ToFieldType = typename ToDataType::FieldType; | 138 | 1 | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | | | 141 | | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | | from_precision = | 145 | | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | | | 149 | | UInt32 to_max_digits = 0; | 150 | | UInt32 to_precision = 0; | 151 | 1 | UInt32 to_scale = 0; | 152 | 1 | | 153 | 1 | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | 1 | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | 1 | const auto* to_decimal_type = | 157 | 1 | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | 1 | ToDataType::check_type_precision(to_precision); | 160 | 1 |
| 161 | 0 | to_scale = to_decimal_type->get_scale(); | 162 | 0 | ToDataType::check_type_scale(to_scale); | 163 | 0 | } | 164 | 1 | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | 1 | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 0 | to_precision = to_max_digits; | 167 | 1 | } |
function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeTimeV2EvEEEEbRKT_ENKUlSG_E_clINSB_INS_15DataTypeDecimalILNS_13PrimitiveTypeE30EEESC_EEEEbSG_ Line | Count | Source | 114 | 11 | return false; | 115 | 11 | } | 116 | 11 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | 11 | IsDatelikeV2Types<ToDataType> || | 123 | 11 | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | 11 | return false; | 125 | 11 | } | 126 | 11 | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | 11 | using Types2 = std::decay_t<decltype(types2)>; | 129 | 11 | using FromDataType = typename Types2::LeftType; | 130 | 11 | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | 11 | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | 11 | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | 11 | return false; | 134 | 11 | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | 11 | using FromFieldType = typename FromDataType::FieldType; | 137 | 11 | using ToFieldType = typename ToDataType::FieldType; | 138 | 11 | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | | | 141 | | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | | from_precision = | 145 | | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | | | 149 | | UInt32 to_max_digits = 0; | 150 | | UInt32 to_precision = 0; | 151 | 11 | UInt32 to_scale = 0; | 152 | 11 | | 153 | 11 | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | 11 | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | 11 | const auto* to_decimal_type = | 157 | 11 | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | 11 | ToDataType::check_type_precision(to_precision); | 160 | 11 |
| 161 | 0 | to_scale = to_decimal_type->get_scale(); | 162 | 0 | ToDataType::check_type_scale(to_scale); | 163 | 0 | } | 164 | 11 | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | 11 | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 0 | to_precision = to_max_digits; | 167 | 11 | } |
Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeTimeV2EvEEEEbRKT_ENKUlSG_E_clINSB_INS_15DataTypeDecimalILNS_13PrimitiveTypeE35EEESC_EEEEbSG_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeTimeV2EvEEEEbRKT_ENKUlSG_E_clINSB_INS_12DataTypeDateESC_EEEEbSG_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeTimeV2EvEEEEbRKT_ENKUlSG_E_clINSB_INS_14DataTypeDateV2ESC_EEEEbSG_ function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeTimeV2EvEEEEbRKT_ENKUlSG_E_clINSB_INS_18DataTypeDateTimeV2ESC_EEEEbSG_ Line | Count | Source | 114 | 8 | return false; | 115 | 8 | } | 116 | 8 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | | IsDatelikeV2Types<ToDataType> || | 123 | | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | | return false; | 125 | | } | 126 | | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | | using Types2 = std::decay_t<decltype(types2)>; | 129 | | using FromDataType = typename Types2::LeftType; | 130 | | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | | return false; | 134 | | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | | using FromFieldType = typename FromDataType::FieldType; | 137 | | using ToFieldType = typename ToDataType::FieldType; | 138 | | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | | | 141 | | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | | from_precision = | 145 | | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | | | 149 | | UInt32 to_max_digits = 0; | 150 | | UInt32 to_precision = 0; | 151 | | UInt32 to_scale = 0; | 152 | | | 153 | | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | | const auto* to_decimal_type = | 157 | | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | | ToDataType::check_type_precision(to_precision); | 160 | | | 161 | | to_scale = to_decimal_type->get_scale(); | 162 | | ToDataType::check_type_scale(to_scale); | 163 | | } | 164 | | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 8 | to_precision = to_max_digits; | 167 | 8 | } |
Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeTimeV2EvEEEEbRKT_ENKUlSG_E_clINSB_INS_16DataTypeDateTimeESC_EEEEbSG_ function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeTimeV2EvEEEEbRKT_ENKUlSG_E_clINSB_ISC_SC_EEEEbSG_ Line | Count | Source | 114 | 19 | return false; | 115 | 19 | } | 116 | 19 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | | using ToDataType = typename Types::LeftType; | 120 | | | 121 | | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | | IsDatelikeV2Types<ToDataType> || | 123 | | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | | return false; | 125 | | } | 126 | | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | | using Types2 = std::decay_t<decltype(types2)>; | 129 | | using FromDataType = typename Types2::LeftType; | 130 | | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | | return false; | 134 | | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | | using FromFieldType = typename FromDataType::FieldType; | 137 | | using ToFieldType = typename ToDataType::FieldType; | 138 | | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | | | 141 | | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | | from_precision = | 145 | | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | | | 149 | | UInt32 to_max_digits = 0; | 150 | | UInt32 to_precision = 0; | 151 | | UInt32 to_scale = 0; | 152 | | | 153 | | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | | const auto* to_decimal_type = | 157 | | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | | ToDataType::check_type_precision(to_precision); | 160 | | | 161 | | to_scale = to_decimal_type->get_scale(); | 162 | | ToDataType::check_type_scale(to_scale); | 163 | | } | 164 | | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 19 | to_precision = to_max_digits; | 167 | 19 | } |
Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeTimeV2EvEEEEbRKT_ENKUlSG_E_clINSB_INS_19DataTypeTimeStampTzESC_EEEEbSG_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeTimeV2EvEEEEbRKT_ENKUlSG_E_clINSB_INS_12DataTypeIPv4ESC_EEEEbSG_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeTimeV2EvEEEEbRKT_ENKUlSG_E_clINSB_INS_12DataTypeIPv6ESC_EEEEbSG_ function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeTimeV2EvEEEEbRKT_ENKUlSG_E_clINSB_INS_14DataTypeStringESC_EEEEbSG_ Line | Count | Source | 114 | 231 | return false; | 115 | 231 | } | 116 | 231 | | 117 | | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | | using Types = std::decay_t<decltype(types)>; | 119 | 231 | using ToDataType = typename Types::LeftType; | 120 | 231 | | 121 | 231 | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | | IsDatelikeV2Types<ToDataType> || | 123 | | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | | return false; | 125 | | } | 126 | | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | | using Types2 = std::decay_t<decltype(types2)>; | 129 | | using FromDataType = typename Types2::LeftType; | 130 | | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | | return false; | 134 | | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | | using FromFieldType = typename FromDataType::FieldType; | 137 | | using ToFieldType = typename ToDataType::FieldType; | 138 | | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | | | 141 | | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | | from_precision = | 145 | | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | | | 149 | | UInt32 to_max_digits = 0; | 150 | | UInt32 to_precision = 0; | 151 | | UInt32 to_scale = 0; | 152 | | | 153 | | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | | const auto* to_decimal_type = | 157 | | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | | ToDataType::check_type_precision(to_precision); | 160 | | | 161 | | to_scale = to_decimal_type->get_scale(); | 162 | | ToDataType::check_type_scale(to_scale); | 163 | | } | 164 | | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 231 | to_precision = to_max_digits; | 167 | 231 | } |
Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_19DataTypeTimeStampTzEvEEEEbRKT_ENKUlSG_E_clINSB_INS_14DataTypeNumberILNS_13PrimitiveTypeE2EEESC_EEEEbSG_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_19DataTypeTimeStampTzEvEEEEbRKT_ENKUlSG_E_clINSB_INS_14DataTypeNumberILNS_13PrimitiveTypeE3EEESC_EEEEbSG_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_19DataTypeTimeStampTzEvEEEEbRKT_ENKUlSG_E_clINSB_INS_14DataTypeNumberILNS_13PrimitiveTypeE4EEESC_EEEEbSG_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_19DataTypeTimeStampTzEvEEEEbRKT_ENKUlSG_E_clINSB_INS_14DataTypeNumberILNS_13PrimitiveTypeE5EEESC_EEEEbSG_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_19DataTypeTimeStampTzEvEEEEbRKT_ENKUlSG_E_clINSB_INS_14DataTypeNumberILNS_13PrimitiveTypeE6EEESC_EEEEbSG_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_19DataTypeTimeStampTzEvEEEEbRKT_ENKUlSG_E_clINSB_INS_14DataTypeNumberILNS_13PrimitiveTypeE7EEESC_EEEEbSG_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_19DataTypeTimeStampTzEvEEEEbRKT_ENKUlSG_E_clINSB_INS_14DataTypeNumberILNS_13PrimitiveTypeE8EEESC_EEEEbSG_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_19DataTypeTimeStampTzEvEEEEbRKT_ENKUlSG_E_clINSB_INS_14DataTypeNumberILNS_13PrimitiveTypeE9EEESC_EEEEbSG_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_19DataTypeTimeStampTzEvEEEEbRKT_ENKUlSG_E_clINSB_INS_15DataTypeDecimalILNS_13PrimitiveTypeE28EEESC_EEEEbSG_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_19DataTypeTimeStampTzEvEEEEbRKT_ENKUlSG_E_clINSB_INS_15DataTypeDecimalILNS_13PrimitiveTypeE29EEESC_EEEEbSG_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_19DataTypeTimeStampTzEvEEEEbRKT_ENKUlSG_E_clINSB_INS_15DataTypeDecimalILNS_13PrimitiveTypeE20EEESC_EEEEbSG_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_19DataTypeTimeStampTzEvEEEEbRKT_ENKUlSG_E_clINSB_INS_15DataTypeDecimalILNS_13PrimitiveTypeE30EEESC_EEEEbSG_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_19DataTypeTimeStampTzEvEEEEbRKT_ENKUlSG_E_clINSB_INS_15DataTypeDecimalILNS_13PrimitiveTypeE35EEESC_EEEEbSG_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_19DataTypeTimeStampTzEvEEEEbRKT_ENKUlSG_E_clINSB_INS_12DataTypeDateESC_EEEEbSG_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_19DataTypeTimeStampTzEvEEEEbRKT_ENKUlSG_E_clINSB_INS_14DataTypeDateV2ESC_EEEEbSG_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_19DataTypeTimeStampTzEvEEEEbRKT_ENKUlSG_E_clINSB_INS_18DataTypeDateTimeV2ESC_EEEEbSG_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_19DataTypeTimeStampTzEvEEEEbRKT_ENKUlSG_E_clINSB_INS_16DataTypeDateTimeESC_EEEEbSG_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_19DataTypeTimeStampTzEvEEEEbRKT_ENKUlSG_E_clINSB_INS_14DataTypeTimeV2ESC_EEEEbSG_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_19DataTypeTimeStampTzEvEEEEbRKT_ENKUlSG_E_clINSB_ISC_SC_EEEEbSG_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_19DataTypeTimeStampTzEvEEEEbRKT_ENKUlSG_E_clINSB_INS_12DataTypeIPv4ESC_EEEEbSG_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_19DataTypeTimeStampTzEvEEEEbRKT_ENKUlSG_E_clINSB_INS_12DataTypeIPv6ESC_EEEEbSG_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_19DataTypeTimeStampTzEvEEEEbRKT_ENKUlSG_E_clINSB_INS_14DataTypeStringESC_EEEEbSG_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_12DataTypeIPv4EvEEEEbRKT_ENKUlSG_E_clINSB_INS_14DataTypeNumberILNS_13PrimitiveTypeE2EEESC_EEEEbSG_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_12DataTypeIPv4EvEEEEbRKT_ENKUlSG_E_clINSB_INS_14DataTypeNumberILNS_13PrimitiveTypeE3EEESC_EEEEbSG_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_12DataTypeIPv4EvEEEEbRKT_ENKUlSG_E_clINSB_INS_14DataTypeNumberILNS_13PrimitiveTypeE4EEESC_EEEEbSG_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_12DataTypeIPv4EvEEEEbRKT_ENKUlSG_E_clINSB_INS_14DataTypeNumberILNS_13PrimitiveTypeE5EEESC_EEEEbSG_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_12DataTypeIPv4EvEEEEbRKT_ENKUlSG_E_clINSB_INS_14DataTypeNumberILNS_13PrimitiveTypeE6EEESC_EEEEbSG_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_12DataTypeIPv4EvEEEEbRKT_ENKUlSG_E_clINSB_INS_14DataTypeNumberILNS_13PrimitiveTypeE7EEESC_EEEEbSG_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_12DataTypeIPv4EvEEEEbRKT_ENKUlSG_E_clINSB_INS_14DataTypeNumberILNS_13PrimitiveTypeE8EEESC_EEEEbSG_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_12DataTypeIPv4EvEEEEbRKT_ENKUlSG_E_clINSB_INS_14DataTypeNumberILNS_13PrimitiveTypeE9EEESC_EEEEbSG_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_12DataTypeIPv4EvEEEEbRKT_ENKUlSG_E_clINSB_INS_15DataTypeDecimalILNS_13PrimitiveTypeE28EEESC_EEEEbSG_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_12DataTypeIPv4EvEEEEbRKT_ENKUlSG_E_clINSB_INS_15DataTypeDecimalILNS_13PrimitiveTypeE29EEESC_EEEEbSG_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_12DataTypeIPv4EvEEEEbRKT_ENKUlSG_E_clINSB_INS_15DataTypeDecimalILNS_13PrimitiveTypeE20EEESC_EEEEbSG_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_12DataTypeIPv4EvEEEEbRKT_ENKUlSG_E_clINSB_INS_15DataTypeDecimalILNS_13PrimitiveTypeE30EEESC_EEEEbSG_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_12DataTypeIPv4EvEEEEbRKT_ENKUlSG_E_clINSB_INS_15DataTypeDecimalILNS_13PrimitiveTypeE35EEESC_EEEEbSG_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_12DataTypeIPv4EvEEEEbRKT_ENKUlSG_E_clINSB_INS_12DataTypeDateESC_EEEEbSG_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_12DataTypeIPv4EvEEEEbRKT_ENKUlSG_E_clINSB_INS_14DataTypeDateV2ESC_EEEEbSG_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_12DataTypeIPv4EvEEEEbRKT_ENKUlSG_E_clINSB_INS_18DataTypeDateTimeV2ESC_EEEEbSG_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_12DataTypeIPv4EvEEEEbRKT_ENKUlSG_E_clINSB_INS_16DataTypeDateTimeESC_EEEEbSG_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_12DataTypeIPv4EvEEEEbRKT_ENKUlSG_E_clINSB_INS_14DataTypeTimeV2ESC_EEEEbSG_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_12DataTypeIPv4EvEEEEbRKT_ENKUlSG_E_clINSB_INS_19DataTypeTimeStampTzESC_EEEEbSG_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_12DataTypeIPv4EvEEEEbRKT_ENKUlSG_E_clINSB_ISC_SC_EEEEbSG_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_12DataTypeIPv4EvEEEEbRKT_ENKUlSG_E_clINSB_INS_12DataTypeIPv6ESC_EEEEbSG_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_12DataTypeIPv4EvEEEEbRKT_ENKUlSG_E_clINSB_INS_14DataTypeStringESC_EEEEbSG_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_12DataTypeIPv6EvEEEEbRKT_ENKUlSG_E_clINSB_INS_14DataTypeNumberILNS_13PrimitiveTypeE2EEESC_EEEEbSG_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_12DataTypeIPv6EvEEEEbRKT_ENKUlSG_E_clINSB_INS_14DataTypeNumberILNS_13PrimitiveTypeE3EEESC_EEEEbSG_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_12DataTypeIPv6EvEEEEbRKT_ENKUlSG_E_clINSB_INS_14DataTypeNumberILNS_13PrimitiveTypeE4EEESC_EEEEbSG_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_12DataTypeIPv6EvEEEEbRKT_ENKUlSG_E_clINSB_INS_14DataTypeNumberILNS_13PrimitiveTypeE5EEESC_EEEEbSG_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_12DataTypeIPv6EvEEEEbRKT_ENKUlSG_E_clINSB_INS_14DataTypeNumberILNS_13PrimitiveTypeE6EEESC_EEEEbSG_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_12DataTypeIPv6EvEEEEbRKT_ENKUlSG_E_clINSB_INS_14DataTypeNumberILNS_13PrimitiveTypeE7EEESC_EEEEbSG_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_12DataTypeIPv6EvEEEEbRKT_ENKUlSG_E_clINSB_INS_14DataTypeNumberILNS_13PrimitiveTypeE8EEESC_EEEEbSG_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_12DataTypeIPv6EvEEEEbRKT_ENKUlSG_E_clINSB_INS_14DataTypeNumberILNS_13PrimitiveTypeE9EEESC_EEEEbSG_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_12DataTypeIPv6EvEEEEbRKT_ENKUlSG_E_clINSB_INS_15DataTypeDecimalILNS_13PrimitiveTypeE28EEESC_EEEEbSG_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_12DataTypeIPv6EvEEEEbRKT_ENKUlSG_E_clINSB_INS_15DataTypeDecimalILNS_13PrimitiveTypeE29EEESC_EEEEbSG_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_12DataTypeIPv6EvEEEEbRKT_ENKUlSG_E_clINSB_INS_15DataTypeDecimalILNS_13PrimitiveTypeE20EEESC_EEEEbSG_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_12DataTypeIPv6EvEEEEbRKT_ENKUlSG_E_clINSB_INS_15DataTypeDecimalILNS_13PrimitiveTypeE30EEESC_EEEEbSG_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_12DataTypeIPv6EvEEEEbRKT_ENKUlSG_E_clINSB_INS_15DataTypeDecimalILNS_13PrimitiveTypeE35EEESC_EEEEbSG_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_12DataTypeIPv6EvEEEEbRKT_ENKUlSG_E_clINSB_INS_12DataTypeDateESC_EEEEbSG_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_12DataTypeIPv6EvEEEEbRKT_ENKUlSG_E_clINSB_INS_14DataTypeDateV2ESC_EEEEbSG_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_12DataTypeIPv6EvEEEEbRKT_ENKUlSG_E_clINSB_INS_18DataTypeDateTimeV2ESC_EEEEbSG_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_12DataTypeIPv6EvEEEEbRKT_ENKUlSG_E_clINSB_INS_16DataTypeDateTimeESC_EEEEbSG_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_12DataTypeIPv6EvEEEEbRKT_ENKUlSG_E_clINSB_INS_14DataTypeTimeV2ESC_EEEEbSG_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_12DataTypeIPv6EvEEEEbRKT_ENKUlSG_E_clINSB_INS_19DataTypeTimeStampTzESC_EEEEbSG_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_12DataTypeIPv6EvEEEEbRKT_ENKUlSG_E_clINSB_INS_12DataTypeIPv4ESC_EEEEbSG_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_12DataTypeIPv6EvEEEEbRKT_ENKUlSG_E_clINSB_ISC_SC_EEEEbSG_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_12DataTypeIPv6EvEEEEbRKT_ENKUlSG_E_clINSB_INS_14DataTypeStringESC_EEEEbSG_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeStringEvEEEEbRKT_ENKUlSG_E_clINSB_INS_14DataTypeNumberILNS_13PrimitiveTypeE2EEESC_EEEEbSG_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeStringEvEEEEbRKT_ENKUlSG_E_clINSB_INS_14DataTypeNumberILNS_13PrimitiveTypeE3EEESC_EEEEbSG_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeStringEvEEEEbRKT_ENKUlSG_E_clINSB_INS_14DataTypeNumberILNS_13PrimitiveTypeE4EEESC_EEEEbSG_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeStringEvEEEEbRKT_ENKUlSG_E_clINSB_INS_14DataTypeNumberILNS_13PrimitiveTypeE5EEESC_EEEEbSG_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeStringEvEEEEbRKT_ENKUlSG_E_clINSB_INS_14DataTypeNumberILNS_13PrimitiveTypeE6EEESC_EEEEbSG_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeStringEvEEEEbRKT_ENKUlSG_E_clINSB_INS_14DataTypeNumberILNS_13PrimitiveTypeE7EEESC_EEEEbSG_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeStringEvEEEEbRKT_ENKUlSG_E_clINSB_INS_14DataTypeNumberILNS_13PrimitiveTypeE8EEESC_EEEEbSG_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeStringEvEEEEbRKT_ENKUlSG_E_clINSB_INS_14DataTypeNumberILNS_13PrimitiveTypeE9EEESC_EEEEbSG_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeStringEvEEEEbRKT_ENKUlSG_E_clINSB_INS_15DataTypeDecimalILNS_13PrimitiveTypeE28EEESC_EEEEbSG_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeStringEvEEEEbRKT_ENKUlSG_E_clINSB_INS_15DataTypeDecimalILNS_13PrimitiveTypeE29EEESC_EEEEbSG_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeStringEvEEEEbRKT_ENKUlSG_E_clINSB_INS_15DataTypeDecimalILNS_13PrimitiveTypeE20EEESC_EEEEbSG_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeStringEvEEEEbRKT_ENKUlSG_E_clINSB_INS_15DataTypeDecimalILNS_13PrimitiveTypeE30EEESC_EEEEbSG_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeStringEvEEEEbRKT_ENKUlSG_E_clINSB_INS_15DataTypeDecimalILNS_13PrimitiveTypeE35EEESC_EEEEbSG_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeStringEvEEEEbRKT_ENKUlSG_E_clINSB_INS_12DataTypeDateESC_EEEEbSG_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeStringEvEEEEbRKT_ENKUlSG_E_clINSB_INS_14DataTypeDateV2ESC_EEEEbSG_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeStringEvEEEEbRKT_ENKUlSG_E_clINSB_INS_18DataTypeDateTimeV2ESC_EEEEbSG_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeStringEvEEEEbRKT_ENKUlSG_E_clINSB_INS_16DataTypeDateTimeESC_EEEEbSG_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeStringEvEEEEbRKT_ENKUlSG_E_clINSB_INS_14DataTypeTimeV2ESC_EEEEbSG_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeStringEvEEEEbRKT_ENKUlSG_E_clINSB_INS_19DataTypeTimeStampTzESC_EEEEbSG_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeStringEvEEEEbRKT_ENKUlSG_E_clINSB_INS_12DataTypeIPv4ESC_EEEEbSG_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeStringEvEEEEbRKT_ENKUlSG_E_clINSB_INS_12DataTypeIPv6ESC_EEEEbSG_ Unexecuted instantiation: function_cast.cpp:_ZZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeStringEvEEEEbRKT_ENKUlSG_E_clINSB_ISC_SC_EEEEbSG_ |
168 | 196k | function_cast.cpp:_ZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE2EEEvEEEEbRKT_ Line | Count | Source | 104 | 2.35k | } | 105 | 2.35k | | 106 | 2.35k | auto wrapper = prepare_remove_nullable(context, from_nested, to_nested); | 107 | | | 108 | | return wrapper; | 109 | | } | 110 | | | 111 | | bool need_replace_null_data_to_default(FunctionContext* context, const DataTypePtr& from_type, | 112 | | const DataTypePtr& to_type) { | 113 | 2.35k | if (from_type->equals(*to_type)) { | 114 | 2.35k | return false; | 115 | 2.35k | } | 116 | 2.35k | | 117 | 2.35k | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | 2.35k | using Types = std::decay_t<decltype(types)>; | 119 | 2.35k | using ToDataType = typename Types::LeftType; | 120 | 2.35k | | 121 | 2.35k | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | 2.35k | IsDatelikeV2Types<ToDataType> || | 123 | 2.35k | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | 2.35k | return false; | 125 | 2.35k | } | 126 | 2.35k | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | 2.35k | using Types2 = std::decay_t<decltype(types2)>; | 129 | 2.35k | using FromDataType = typename Types2::LeftType; | 130 | 2.35k | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | 2.35k | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | 2.35k | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | 2.35k | return false; | 134 | 2.35k | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | 2.35k | using FromFieldType = typename FromDataType::FieldType; | 137 | 2.35k | using ToFieldType = typename ToDataType::FieldType; | 138 | 2.35k | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | 2.35k | | 141 | 2.35k | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | 2.35k | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | 2.35k | from_precision = | 145 | 2.35k | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | 2.35k | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | 2.35k | | 149 | 2.35k | UInt32 to_max_digits = 0; | 150 | 2.35k | UInt32 to_precision = 0; | 151 | 2.35k | UInt32 to_scale = 0; | 152 | 2.35k | | 153 | 2.35k | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | 2.35k | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | 2.35k | const auto* to_decimal_type = | 157 | 2.35k | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | 2.35k | ToDataType::check_type_precision(to_precision); | 160 | 2.35k | | 161 | 2.35k | to_scale = to_decimal_type->get_scale(); | 162 | 2.35k | ToDataType::check_type_scale(to_scale); | 163 | 2.35k | } | 164 | 2.35k | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | 2.35k | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 2.35k | to_precision = to_max_digits; | 167 | 2.35k | } | 168 | 2.35k | |
function_cast.cpp:_ZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE3EEEvEEEEbRKT_ Line | Count | Source | 104 | 3.71k | } | 105 | 3.71k | | 106 | 3.71k | auto wrapper = prepare_remove_nullable(context, from_nested, to_nested); | 107 | | | 108 | | return wrapper; | 109 | | } | 110 | | | 111 | | bool need_replace_null_data_to_default(FunctionContext* context, const DataTypePtr& from_type, | 112 | | const DataTypePtr& to_type) { | 113 | 3.71k | if (from_type->equals(*to_type)) { | 114 | 3.71k | return false; | 115 | 3.71k | } | 116 | 3.71k | | 117 | 3.71k | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | 3.71k | using Types = std::decay_t<decltype(types)>; | 119 | 3.71k | using ToDataType = typename Types::LeftType; | 120 | 3.71k | | 121 | 3.71k | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | 3.71k | IsDatelikeV2Types<ToDataType> || | 123 | 3.71k | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | 3.71k | return false; | 125 | 3.71k | } | 126 | 3.71k | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | 3.71k | using Types2 = std::decay_t<decltype(types2)>; | 129 | 3.71k | using FromDataType = typename Types2::LeftType; | 130 | 3.71k | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | 3.71k | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | 3.71k | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | 3.71k | return false; | 134 | 3.71k | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | 3.71k | using FromFieldType = typename FromDataType::FieldType; | 137 | 3.71k | using ToFieldType = typename ToDataType::FieldType; | 138 | 3.71k | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | 3.71k | | 141 | 3.71k | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | 3.71k | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | 3.71k | from_precision = | 145 | 3.71k | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | 3.71k | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | 3.71k | | 149 | 3.71k | UInt32 to_max_digits = 0; | 150 | 3.71k | UInt32 to_precision = 0; | 151 | 3.71k | UInt32 to_scale = 0; | 152 | 3.71k | | 153 | 3.71k | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | 3.71k | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | 3.71k | const auto* to_decimal_type = | 157 | 3.71k | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | 3.71k | ToDataType::check_type_precision(to_precision); | 160 | 3.71k | | 161 | 3.71k | to_scale = to_decimal_type->get_scale(); | 162 | 3.71k | ToDataType::check_type_scale(to_scale); | 163 | 3.71k | } | 164 | 3.71k | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | 3.71k | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 3.71k | to_precision = to_max_digits; | 167 | 3.71k | } | 168 | 3.71k | |
function_cast.cpp:_ZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE4EEEvEEEEbRKT_ Line | Count | Source | 104 | 5.28k | } | 105 | 5.28k | | 106 | 5.28k | auto wrapper = prepare_remove_nullable(context, from_nested, to_nested); | 107 | | | 108 | | return wrapper; | 109 | | } | 110 | | | 111 | | bool need_replace_null_data_to_default(FunctionContext* context, const DataTypePtr& from_type, | 112 | | const DataTypePtr& to_type) { | 113 | 5.28k | if (from_type->equals(*to_type)) { | 114 | 5.28k | return false; | 115 | 5.28k | } | 116 | 5.28k | | 117 | 5.28k | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | 5.28k | using Types = std::decay_t<decltype(types)>; | 119 | 5.28k | using ToDataType = typename Types::LeftType; | 120 | 5.28k | | 121 | 5.28k | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | 5.28k | IsDatelikeV2Types<ToDataType> || | 123 | 5.28k | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | 5.28k | return false; | 125 | 5.28k | } | 126 | 5.28k | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | 5.28k | using Types2 = std::decay_t<decltype(types2)>; | 129 | 5.28k | using FromDataType = typename Types2::LeftType; | 130 | 5.28k | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | 5.28k | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | 5.28k | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | 5.28k | return false; | 134 | 5.28k | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | 5.28k | using FromFieldType = typename FromDataType::FieldType; | 137 | 5.28k | using ToFieldType = typename ToDataType::FieldType; | 138 | 5.28k | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | 5.28k | | 141 | 5.28k | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | 5.28k | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | 5.28k | from_precision = | 145 | 5.28k | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | 5.28k | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | 5.28k | | 149 | 5.28k | UInt32 to_max_digits = 0; | 150 | 5.28k | UInt32 to_precision = 0; | 151 | 5.28k | UInt32 to_scale = 0; | 152 | 5.28k | | 153 | 5.28k | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | 5.28k | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | 5.28k | const auto* to_decimal_type = | 157 | 5.28k | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | 5.28k | ToDataType::check_type_precision(to_precision); | 160 | 5.28k | | 161 | 5.28k | to_scale = to_decimal_type->get_scale(); | 162 | 5.28k | ToDataType::check_type_scale(to_scale); | 163 | 5.28k | } | 164 | 5.28k | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | 5.28k | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 5.28k | to_precision = to_max_digits; | 167 | 5.28k | } | 168 | 5.28k | |
function_cast.cpp:_ZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE5EEEvEEEEbRKT_ Line | Count | Source | 104 | 32.8k | } | 105 | 32.8k | | 106 | 32.8k | auto wrapper = prepare_remove_nullable(context, from_nested, to_nested); | 107 | | | 108 | | return wrapper; | 109 | | } | 110 | | | 111 | | bool need_replace_null_data_to_default(FunctionContext* context, const DataTypePtr& from_type, | 112 | | const DataTypePtr& to_type) { | 113 | 32.8k | if (from_type->equals(*to_type)) { | 114 | 32.8k | return false; | 115 | 32.8k | } | 116 | 32.8k | | 117 | 32.8k | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | 32.8k | using Types = std::decay_t<decltype(types)>; | 119 | 32.8k | using ToDataType = typename Types::LeftType; | 120 | 32.8k | | 121 | 32.8k | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | 32.8k | IsDatelikeV2Types<ToDataType> || | 123 | 32.8k | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | 32.8k | return false; | 125 | 32.8k | } | 126 | 32.8k | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | 32.8k | using Types2 = std::decay_t<decltype(types2)>; | 129 | 32.8k | using FromDataType = typename Types2::LeftType; | 130 | 32.8k | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | 32.8k | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | 32.8k | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | 32.8k | return false; | 134 | 32.8k | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | 32.8k | using FromFieldType = typename FromDataType::FieldType; | 137 | 32.8k | using ToFieldType = typename ToDataType::FieldType; | 138 | 32.8k | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | 32.8k | | 141 | 32.8k | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | 32.8k | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | 32.8k | from_precision = | 145 | 32.8k | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | 32.8k | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | 32.8k | | 149 | 32.8k | UInt32 to_max_digits = 0; | 150 | 32.8k | UInt32 to_precision = 0; | 151 | 32.8k | UInt32 to_scale = 0; | 152 | 32.8k | | 153 | 32.8k | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | 32.8k | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | 32.8k | const auto* to_decimal_type = | 157 | 32.8k | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | 32.8k | ToDataType::check_type_precision(to_precision); | 160 | 32.8k | | 161 | 32.8k | to_scale = to_decimal_type->get_scale(); | 162 | 32.8k | ToDataType::check_type_scale(to_scale); | 163 | 32.8k | } | 164 | 32.8k | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | 32.8k | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 32.8k | to_precision = to_max_digits; | 167 | 32.8k | } | 168 | 32.8k | |
function_cast.cpp:_ZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE6EEEvEEEEbRKT_ Line | Count | Source | 104 | 34.4k | } | 105 | 34.4k | | 106 | 34.4k | auto wrapper = prepare_remove_nullable(context, from_nested, to_nested); | 107 | | | 108 | | return wrapper; | 109 | | } | 110 | | | 111 | | bool need_replace_null_data_to_default(FunctionContext* context, const DataTypePtr& from_type, | 112 | | const DataTypePtr& to_type) { | 113 | 34.4k | if (from_type->equals(*to_type)) { | 114 | 34.4k | return false; | 115 | 34.4k | } | 116 | 34.4k | | 117 | 34.4k | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | 34.4k | using Types = std::decay_t<decltype(types)>; | 119 | 34.4k | using ToDataType = typename Types::LeftType; | 120 | 34.4k | | 121 | 34.4k | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | 34.4k | IsDatelikeV2Types<ToDataType> || | 123 | 34.4k | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | 34.4k | return false; | 125 | 34.4k | } | 126 | 34.4k | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | 34.4k | using Types2 = std::decay_t<decltype(types2)>; | 129 | 34.4k | using FromDataType = typename Types2::LeftType; | 130 | 34.4k | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | 34.4k | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | 34.4k | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | 34.4k | return false; | 134 | 34.4k | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | 34.4k | using FromFieldType = typename FromDataType::FieldType; | 137 | 34.4k | using ToFieldType = typename ToDataType::FieldType; | 138 | 34.4k | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | 34.4k | | 141 | 34.4k | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | 34.4k | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | 34.4k | from_precision = | 145 | 34.4k | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | 34.4k | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | 34.4k | | 149 | 34.4k | UInt32 to_max_digits = 0; | 150 | 34.4k | UInt32 to_precision = 0; | 151 | 34.4k | UInt32 to_scale = 0; | 152 | 34.4k | | 153 | 34.4k | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | 34.4k | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | 34.4k | const auto* to_decimal_type = | 157 | 34.4k | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | 34.4k | ToDataType::check_type_precision(to_precision); | 160 | 34.4k | | 161 | 34.4k | to_scale = to_decimal_type->get_scale(); | 162 | 34.4k | ToDataType::check_type_scale(to_scale); | 163 | 34.4k | } | 164 | 34.4k | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | 34.4k | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 34.4k | to_precision = to_max_digits; | 167 | 34.4k | } | 168 | 34.4k | |
function_cast.cpp:_ZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE7EEEvEEEEbRKT_ Line | Count | Source | 104 | 4.67k | } | 105 | 4.67k | | 106 | 4.67k | auto wrapper = prepare_remove_nullable(context, from_nested, to_nested); | 107 | | | 108 | | return wrapper; | 109 | | } | 110 | | | 111 | | bool need_replace_null_data_to_default(FunctionContext* context, const DataTypePtr& from_type, | 112 | | const DataTypePtr& to_type) { | 113 | 4.67k | if (from_type->equals(*to_type)) { | 114 | 4.67k | return false; | 115 | 4.67k | } | 116 | 4.67k | | 117 | 4.67k | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | 4.67k | using Types = std::decay_t<decltype(types)>; | 119 | 4.67k | using ToDataType = typename Types::LeftType; | 120 | 4.67k | | 121 | 4.67k | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | 4.67k | IsDatelikeV2Types<ToDataType> || | 123 | 4.67k | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | 4.67k | return false; | 125 | 4.67k | } | 126 | 4.67k | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | 4.67k | using Types2 = std::decay_t<decltype(types2)>; | 129 | 4.67k | using FromDataType = typename Types2::LeftType; | 130 | 4.67k | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | 4.67k | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | 4.67k | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | 4.67k | return false; | 134 | 4.67k | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | 4.67k | using FromFieldType = typename FromDataType::FieldType; | 137 | 4.67k | using ToFieldType = typename ToDataType::FieldType; | 138 | 4.67k | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | 4.67k | | 141 | 4.67k | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | 4.67k | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | 4.67k | from_precision = | 145 | 4.67k | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | 4.67k | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | 4.67k | | 149 | 4.67k | UInt32 to_max_digits = 0; | 150 | 4.67k | UInt32 to_precision = 0; | 151 | 4.67k | UInt32 to_scale = 0; | 152 | 4.67k | | 153 | 4.67k | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | 4.67k | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | 4.67k | const auto* to_decimal_type = | 157 | 4.67k | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | 4.67k | ToDataType::check_type_precision(to_precision); | 160 | 4.67k | | 161 | 4.67k | to_scale = to_decimal_type->get_scale(); | 162 | 4.67k | ToDataType::check_type_scale(to_scale); | 163 | 4.67k | } | 164 | 4.67k | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | 4.67k | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 4.67k | to_precision = to_max_digits; | 167 | 4.67k | } | 168 | 4.67k | |
function_cast.cpp:_ZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE8EEEvEEEEbRKT_ Line | Count | Source | 104 | 10.0k | } | 105 | 10.0k | | 106 | 10.0k | auto wrapper = prepare_remove_nullable(context, from_nested, to_nested); | 107 | | | 108 | | return wrapper; | 109 | | } | 110 | | | 111 | | bool need_replace_null_data_to_default(FunctionContext* context, const DataTypePtr& from_type, | 112 | | const DataTypePtr& to_type) { | 113 | 10.0k | if (from_type->equals(*to_type)) { | 114 | 10.0k | return false; | 115 | 10.0k | } | 116 | 10.0k | | 117 | 10.0k | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | 10.0k | using Types = std::decay_t<decltype(types)>; | 119 | 10.0k | using ToDataType = typename Types::LeftType; | 120 | 10.0k | | 121 | 10.0k | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | 10.0k | IsDatelikeV2Types<ToDataType> || | 123 | 10.0k | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | 10.0k | return false; | 125 | 10.0k | } | 126 | 10.0k | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | 10.0k | using Types2 = std::decay_t<decltype(types2)>; | 129 | 10.0k | using FromDataType = typename Types2::LeftType; | 130 | 10.0k | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | 10.0k | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | 10.0k | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | 10.0k | return false; | 134 | 10.0k | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | 10.0k | using FromFieldType = typename FromDataType::FieldType; | 137 | 10.0k | using ToFieldType = typename ToDataType::FieldType; | 138 | 10.0k | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | 10.0k | | 141 | 10.0k | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | 10.0k | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | 10.0k | from_precision = | 145 | 10.0k | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | 10.0k | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | 10.0k | | 149 | 10.0k | UInt32 to_max_digits = 0; | 150 | 10.0k | UInt32 to_precision = 0; | 151 | 10.0k | UInt32 to_scale = 0; | 152 | 10.0k | | 153 | 10.0k | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | 10.0k | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | 10.0k | const auto* to_decimal_type = | 157 | 10.0k | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | 10.0k | ToDataType::check_type_precision(to_precision); | 160 | 10.0k | | 161 | 10.0k | to_scale = to_decimal_type->get_scale(); | 162 | 10.0k | ToDataType::check_type_scale(to_scale); | 163 | 10.0k | } | 164 | 10.0k | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | 10.0k | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 10.0k | to_precision = to_max_digits; | 167 | 10.0k | } | 168 | 10.0k | |
function_cast.cpp:_ZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeNumberILNS_13PrimitiveTypeE9EEEvEEEEbRKT_ Line | Count | Source | 104 | 24.1k | } | 105 | 24.1k | | 106 | 24.1k | auto wrapper = prepare_remove_nullable(context, from_nested, to_nested); | 107 | | | 108 | | return wrapper; | 109 | | } | 110 | | | 111 | | bool need_replace_null_data_to_default(FunctionContext* context, const DataTypePtr& from_type, | 112 | | const DataTypePtr& to_type) { | 113 | 24.1k | if (from_type->equals(*to_type)) { | 114 | 24.1k | return false; | 115 | 24.1k | } | 116 | 24.1k | | 117 | 24.1k | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | 24.1k | using Types = std::decay_t<decltype(types)>; | 119 | 24.1k | using ToDataType = typename Types::LeftType; | 120 | 24.1k | | 121 | 24.1k | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | 24.1k | IsDatelikeV2Types<ToDataType> || | 123 | 24.1k | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | 24.1k | return false; | 125 | 24.1k | } | 126 | 24.1k | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | 24.1k | using Types2 = std::decay_t<decltype(types2)>; | 129 | 24.1k | using FromDataType = typename Types2::LeftType; | 130 | 24.1k | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | 24.1k | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | 24.1k | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | 24.1k | return false; | 134 | 24.1k | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | 24.1k | using FromFieldType = typename FromDataType::FieldType; | 137 | 24.1k | using ToFieldType = typename ToDataType::FieldType; | 138 | 24.1k | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | 24.1k | | 141 | 24.1k | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | 24.1k | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | 24.1k | from_precision = | 145 | 24.1k | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | 24.1k | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | 24.1k | | 149 | 24.1k | UInt32 to_max_digits = 0; | 150 | 24.1k | UInt32 to_precision = 0; | 151 | 24.1k | UInt32 to_scale = 0; | 152 | 24.1k | | 153 | 24.1k | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | 24.1k | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | 24.1k | const auto* to_decimal_type = | 157 | 24.1k | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | 24.1k | ToDataType::check_type_precision(to_precision); | 160 | 24.1k | | 161 | 24.1k | to_scale = to_decimal_type->get_scale(); | 162 | 24.1k | ToDataType::check_type_scale(to_scale); | 163 | 24.1k | } | 164 | 24.1k | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | 24.1k | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 24.1k | to_precision = to_max_digits; | 167 | 24.1k | } | 168 | 24.1k | |
function_cast.cpp:_ZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_15DataTypeDecimalILNS_13PrimitiveTypeE28EEEvEEEEbRKT_ Line | Count | Source | 104 | 6.56k | } | 105 | 6.56k | | 106 | 6.56k | auto wrapper = prepare_remove_nullable(context, from_nested, to_nested); | 107 | | | 108 | | return wrapper; | 109 | | } | 110 | | | 111 | | bool need_replace_null_data_to_default(FunctionContext* context, const DataTypePtr& from_type, | 112 | | const DataTypePtr& to_type) { | 113 | 6.56k | if (from_type->equals(*to_type)) { | 114 | 6.56k | return false; | 115 | 6.56k | } | 116 | 6.56k | | 117 | 6.56k | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | 6.56k | using Types = std::decay_t<decltype(types)>; | 119 | 6.56k | using ToDataType = typename Types::LeftType; | 120 | 6.56k | | 121 | 6.56k | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | 6.56k | IsDatelikeV2Types<ToDataType> || | 123 | 6.56k | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | 6.56k | return false; | 125 | 6.56k | } | 126 | 6.56k | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | 6.56k | using Types2 = std::decay_t<decltype(types2)>; | 129 | 6.56k | using FromDataType = typename Types2::LeftType; | 130 | 6.56k | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | 6.56k | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | 6.56k | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | 6.56k | return false; | 134 | 6.56k | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | 6.56k | using FromFieldType = typename FromDataType::FieldType; | 137 | 6.56k | using ToFieldType = typename ToDataType::FieldType; | 138 | 6.56k | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | 6.56k | | 141 | 6.56k | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | 6.56k | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | 6.56k | from_precision = | 145 | 6.56k | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | 6.56k | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | 6.56k | | 149 | 6.56k | UInt32 to_max_digits = 0; | 150 | 6.56k | UInt32 to_precision = 0; | 151 | 6.56k | UInt32 to_scale = 0; | 152 | 6.56k | | 153 | 6.56k | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | 6.56k | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | 6.56k | const auto* to_decimal_type = | 157 | 6.56k | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | 6.56k | ToDataType::check_type_precision(to_precision); | 160 | 6.56k | | 161 | 6.56k | to_scale = to_decimal_type->get_scale(); | 162 | 6.56k | ToDataType::check_type_scale(to_scale); | 163 | 6.56k | } | 164 | 6.56k | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | 6.56k | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 6.56k | to_precision = to_max_digits; | 167 | 6.56k | } | 168 | 6.56k | |
function_cast.cpp:_ZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_15DataTypeDecimalILNS_13PrimitiveTypeE29EEEvEEEEbRKT_ Line | Count | Source | 104 | 10.6k | } | 105 | 10.6k | | 106 | 10.6k | auto wrapper = prepare_remove_nullable(context, from_nested, to_nested); | 107 | | | 108 | | return wrapper; | 109 | | } | 110 | | | 111 | | bool need_replace_null_data_to_default(FunctionContext* context, const DataTypePtr& from_type, | 112 | | const DataTypePtr& to_type) { | 113 | 10.6k | if (from_type->equals(*to_type)) { | 114 | 10.6k | return false; | 115 | 10.6k | } | 116 | 10.6k | | 117 | 10.6k | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | 10.6k | using Types = std::decay_t<decltype(types)>; | 119 | 10.6k | using ToDataType = typename Types::LeftType; | 120 | 10.6k | | 121 | 10.6k | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | 10.6k | IsDatelikeV2Types<ToDataType> || | 123 | 10.6k | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | 10.6k | return false; | 125 | 10.6k | } | 126 | 10.6k | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | 10.6k | using Types2 = std::decay_t<decltype(types2)>; | 129 | 10.6k | using FromDataType = typename Types2::LeftType; | 130 | 10.6k | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | 10.6k | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | 10.6k | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | 10.6k | return false; | 134 | 10.6k | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | 10.6k | using FromFieldType = typename FromDataType::FieldType; | 137 | 10.6k | using ToFieldType = typename ToDataType::FieldType; | 138 | 10.6k | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | 10.6k | | 141 | 10.6k | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | 10.6k | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | 10.6k | from_precision = | 145 | 10.6k | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | 10.6k | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | 10.6k | | 149 | 10.6k | UInt32 to_max_digits = 0; | 150 | 10.6k | UInt32 to_precision = 0; | 151 | 10.6k | UInt32 to_scale = 0; | 152 | 10.6k | | 153 | 10.6k | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | 10.6k | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | 10.6k | const auto* to_decimal_type = | 157 | 10.6k | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | 10.6k | ToDataType::check_type_precision(to_precision); | 160 | 10.6k | | 161 | 10.6k | to_scale = to_decimal_type->get_scale(); | 162 | 10.6k | ToDataType::check_type_scale(to_scale); | 163 | 10.6k | } | 164 | 10.6k | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | 10.6k | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 10.6k | to_precision = to_max_digits; | 167 | 10.6k | } | 168 | 10.6k | |
function_cast.cpp:_ZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_15DataTypeDecimalILNS_13PrimitiveTypeE20EEEvEEEEbRKT_ Line | Count | Source | 104 | 226 | } | 105 | 226 | | 106 | 226 | auto wrapper = prepare_remove_nullable(context, from_nested, to_nested); | 107 | | | 108 | | return wrapper; | 109 | | } | 110 | | | 111 | | bool need_replace_null_data_to_default(FunctionContext* context, const DataTypePtr& from_type, | 112 | | const DataTypePtr& to_type) { | 113 | 226 | if (from_type->equals(*to_type)) { | 114 | 226 | return false; | 115 | 226 | } | 116 | 226 | | 117 | 226 | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | 226 | using Types = std::decay_t<decltype(types)>; | 119 | 226 | using ToDataType = typename Types::LeftType; | 120 | 226 | | 121 | 226 | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | 226 | IsDatelikeV2Types<ToDataType> || | 123 | 226 | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | 226 | return false; | 125 | 226 | } | 126 | 226 | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | 226 | using Types2 = std::decay_t<decltype(types2)>; | 129 | 226 | using FromDataType = typename Types2::LeftType; | 130 | 226 | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | 226 | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | 226 | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | 226 | return false; | 134 | 226 | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | 226 | using FromFieldType = typename FromDataType::FieldType; | 137 | 226 | using ToFieldType = typename ToDataType::FieldType; | 138 | 226 | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | 226 | | 141 | 226 | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | 226 | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | 226 | from_precision = | 145 | 226 | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | 226 | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | 226 | | 149 | 226 | UInt32 to_max_digits = 0; | 150 | 226 | UInt32 to_precision = 0; | 151 | 226 | UInt32 to_scale = 0; | 152 | 226 | | 153 | 226 | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | 226 | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | 226 | const auto* to_decimal_type = | 157 | 226 | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | 226 | ToDataType::check_type_precision(to_precision); | 160 | 226 | | 161 | 226 | to_scale = to_decimal_type->get_scale(); | 162 | 226 | ToDataType::check_type_scale(to_scale); | 163 | 226 | } | 164 | 226 | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | 226 | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 226 | to_precision = to_max_digits; | 167 | 226 | } | 168 | 226 | |
function_cast.cpp:_ZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_15DataTypeDecimalILNS_13PrimitiveTypeE30EEEvEEEEbRKT_ Line | Count | Source | 104 | 10.2k | } | 105 | 10.2k | | 106 | 10.2k | auto wrapper = prepare_remove_nullable(context, from_nested, to_nested); | 107 | | | 108 | | return wrapper; | 109 | | } | 110 | | | 111 | | bool need_replace_null_data_to_default(FunctionContext* context, const DataTypePtr& from_type, | 112 | | const DataTypePtr& to_type) { | 113 | 10.2k | if (from_type->equals(*to_type)) { | 114 | 10.2k | return false; | 115 | 10.2k | } | 116 | 10.2k | | 117 | 10.2k | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | 10.2k | using Types = std::decay_t<decltype(types)>; | 119 | 10.2k | using ToDataType = typename Types::LeftType; | 120 | 10.2k | | 121 | 10.2k | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | 10.2k | IsDatelikeV2Types<ToDataType> || | 123 | 10.2k | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | 10.2k | return false; | 125 | 10.2k | } | 126 | 10.2k | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | 10.2k | using Types2 = std::decay_t<decltype(types2)>; | 129 | 10.2k | using FromDataType = typename Types2::LeftType; | 130 | 10.2k | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | 10.2k | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | 10.2k | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | 10.2k | return false; | 134 | 10.2k | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | 10.2k | using FromFieldType = typename FromDataType::FieldType; | 137 | 10.2k | using ToFieldType = typename ToDataType::FieldType; | 138 | 10.2k | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | 10.2k | | 141 | 10.2k | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | 10.2k | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | 10.2k | from_precision = | 145 | 10.2k | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | 10.2k | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | 10.2k | | 149 | 10.2k | UInt32 to_max_digits = 0; | 150 | 10.2k | UInt32 to_precision = 0; | 151 | 10.2k | UInt32 to_scale = 0; | 152 | 10.2k | | 153 | 10.2k | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | 10.2k | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | 10.2k | const auto* to_decimal_type = | 157 | 10.2k | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | 10.2k | ToDataType::check_type_precision(to_precision); | 160 | 10.2k | | 161 | 10.2k | to_scale = to_decimal_type->get_scale(); | 162 | 10.2k | ToDataType::check_type_scale(to_scale); | 163 | 10.2k | } | 164 | 10.2k | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | 10.2k | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 10.2k | to_precision = to_max_digits; | 167 | 10.2k | } | 168 | 10.2k | |
function_cast.cpp:_ZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_15DataTypeDecimalILNS_13PrimitiveTypeE35EEEvEEEEbRKT_ Line | Count | Source | 104 | 7.56k | } | 105 | 7.56k | | 106 | 7.56k | auto wrapper = prepare_remove_nullable(context, from_nested, to_nested); | 107 | | | 108 | | return wrapper; | 109 | | } | 110 | | | 111 | | bool need_replace_null_data_to_default(FunctionContext* context, const DataTypePtr& from_type, | 112 | | const DataTypePtr& to_type) { | 113 | 7.56k | if (from_type->equals(*to_type)) { | 114 | 7.56k | return false; | 115 | 7.56k | } | 116 | 7.56k | | 117 | 7.56k | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | 7.56k | using Types = std::decay_t<decltype(types)>; | 119 | 7.56k | using ToDataType = typename Types::LeftType; | 120 | 7.56k | | 121 | 7.56k | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | 7.56k | IsDatelikeV2Types<ToDataType> || | 123 | 7.56k | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | 7.56k | return false; | 125 | 7.56k | } | 126 | 7.56k | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | 7.56k | using Types2 = std::decay_t<decltype(types2)>; | 129 | 7.56k | using FromDataType = typename Types2::LeftType; | 130 | 7.56k | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | 7.56k | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | 7.56k | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | 7.56k | return false; | 134 | 7.56k | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | 7.56k | using FromFieldType = typename FromDataType::FieldType; | 137 | 7.56k | using ToFieldType = typename ToDataType::FieldType; | 138 | 7.56k | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | 7.56k | | 141 | 7.56k | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | 7.56k | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | 7.56k | from_precision = | 145 | 7.56k | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | 7.56k | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | 7.56k | | 149 | 7.56k | UInt32 to_max_digits = 0; | 150 | 7.56k | UInt32 to_precision = 0; | 151 | 7.56k | UInt32 to_scale = 0; | 152 | 7.56k | | 153 | 7.56k | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | 7.56k | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | 7.56k | const auto* to_decimal_type = | 157 | 7.56k | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | 7.56k | ToDataType::check_type_precision(to_precision); | 160 | 7.56k | | 161 | 7.56k | to_scale = to_decimal_type->get_scale(); | 162 | 7.56k | ToDataType::check_type_scale(to_scale); | 163 | 7.56k | } | 164 | 7.56k | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | 7.56k | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 7.56k | to_precision = to_max_digits; | 167 | 7.56k | } | 168 | 7.56k | |
function_cast.cpp:_ZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_12DataTypeDateEvEEEEbRKT_ Line | Count | Source | 104 | 30 | } | 105 | 30 | | 106 | 30 | auto wrapper = prepare_remove_nullable(context, from_nested, to_nested); | 107 | | | 108 | | return wrapper; | 109 | | } | 110 | | | 111 | | bool need_replace_null_data_to_default(FunctionContext* context, const DataTypePtr& from_type, | 112 | | const DataTypePtr& to_type) { | 113 | 30 | if (from_type->equals(*to_type)) { | 114 | 30 | return false; | 115 | 30 | } | 116 | 30 | | 117 | 30 | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | 30 | using Types = std::decay_t<decltype(types)>; | 119 | 30 | using ToDataType = typename Types::LeftType; | 120 | 30 | | 121 | 30 | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | 30 | IsDatelikeV2Types<ToDataType> || | 123 | 30 | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | 30 | return false; | 125 | 30 | } | 126 | 30 | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | 30 | using Types2 = std::decay_t<decltype(types2)>; | 129 | 30 | using FromDataType = typename Types2::LeftType; | 130 | 30 | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | 30 | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | 30 | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | 30 | return false; | 134 | 30 | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | 30 | using FromFieldType = typename FromDataType::FieldType; | 137 | 30 | using ToFieldType = typename ToDataType::FieldType; | 138 | 30 | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | 30 | | 141 | 30 | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | 30 | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | 30 | from_precision = | 145 | 30 | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | 30 | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | 30 | | 149 | 30 | UInt32 to_max_digits = 0; | 150 | 30 | UInt32 to_precision = 0; | 151 | 30 | UInt32 to_scale = 0; | 152 | 30 | | 153 | 30 | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | 30 | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | 30 | const auto* to_decimal_type = | 157 | 30 | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | 30 | ToDataType::check_type_precision(to_precision); | 160 | 30 | | 161 | 30 | to_scale = to_decimal_type->get_scale(); | 162 | 30 | ToDataType::check_type_scale(to_scale); | 163 | 30 | } | 164 | 30 | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | 30 | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 30 | to_precision = to_max_digits; | 167 | 30 | } | 168 | 30 | |
function_cast.cpp:_ZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeDateV2EvEEEEbRKT_ Line | Count | Source | 104 | 6.96k | } | 105 | 6.96k | | 106 | 6.96k | auto wrapper = prepare_remove_nullable(context, from_nested, to_nested); | 107 | | | 108 | | return wrapper; | 109 | | } | 110 | | | 111 | | bool need_replace_null_data_to_default(FunctionContext* context, const DataTypePtr& from_type, | 112 | | const DataTypePtr& to_type) { | 113 | 6.96k | if (from_type->equals(*to_type)) { | 114 | 6.96k | return false; | 115 | 6.96k | } | 116 | 6.96k | | 117 | 6.96k | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | 6.96k | using Types = std::decay_t<decltype(types)>; | 119 | 6.96k | using ToDataType = typename Types::LeftType; | 120 | 6.96k | | 121 | 6.96k | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | 6.96k | IsDatelikeV2Types<ToDataType> || | 123 | 6.96k | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | 6.96k | return false; | 125 | 6.96k | } | 126 | 6.96k | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | 6.96k | using Types2 = std::decay_t<decltype(types2)>; | 129 | 6.96k | using FromDataType = typename Types2::LeftType; | 130 | 6.96k | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | 6.96k | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | 6.96k | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | 6.96k | return false; | 134 | 6.96k | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | 6.96k | using FromFieldType = typename FromDataType::FieldType; | 137 | 6.96k | using ToFieldType = typename ToDataType::FieldType; | 138 | 6.96k | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | 6.96k | | 141 | 6.96k | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | 6.96k | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | 6.96k | from_precision = | 145 | 6.96k | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | 6.96k | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | 6.96k | | 149 | 6.96k | UInt32 to_max_digits = 0; | 150 | 6.96k | UInt32 to_precision = 0; | 151 | 6.96k | UInt32 to_scale = 0; | 152 | 6.96k | | 153 | 6.96k | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | 6.96k | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | 6.96k | const auto* to_decimal_type = | 157 | 6.96k | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | 6.96k | ToDataType::check_type_precision(to_precision); | 160 | 6.96k | | 161 | 6.96k | to_scale = to_decimal_type->get_scale(); | 162 | 6.96k | ToDataType::check_type_scale(to_scale); | 163 | 6.96k | } | 164 | 6.96k | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | 6.96k | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 6.96k | to_precision = to_max_digits; | 167 | 6.96k | } | 168 | 6.96k | |
function_cast.cpp:_ZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_18DataTypeDateTimeV2EvEEEEbRKT_ Line | Count | Source | 104 | 3.67k | } | 105 | 3.67k | | 106 | 3.67k | auto wrapper = prepare_remove_nullable(context, from_nested, to_nested); | 107 | | | 108 | | return wrapper; | 109 | | } | 110 | | | 111 | | bool need_replace_null_data_to_default(FunctionContext* context, const DataTypePtr& from_type, | 112 | | const DataTypePtr& to_type) { | 113 | 3.67k | if (from_type->equals(*to_type)) { | 114 | 3.67k | return false; | 115 | 3.67k | } | 116 | 3.67k | | 117 | 3.67k | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | 3.67k | using Types = std::decay_t<decltype(types)>; | 119 | 3.67k | using ToDataType = typename Types::LeftType; | 120 | 3.67k | | 121 | 3.67k | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | 3.67k | IsDatelikeV2Types<ToDataType> || | 123 | 3.67k | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | 3.67k | return false; | 125 | 3.67k | } | 126 | 3.67k | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | 3.67k | using Types2 = std::decay_t<decltype(types2)>; | 129 | 3.67k | using FromDataType = typename Types2::LeftType; | 130 | 3.67k | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | 3.67k | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | 3.67k | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | 3.67k | return false; | 134 | 3.67k | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | 3.67k | using FromFieldType = typename FromDataType::FieldType; | 137 | 3.67k | using ToFieldType = typename ToDataType::FieldType; | 138 | 3.67k | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | 3.67k | | 141 | 3.67k | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | 3.67k | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | 3.67k | from_precision = | 145 | 3.67k | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | 3.67k | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | 3.67k | | 149 | 3.67k | UInt32 to_max_digits = 0; | 150 | 3.67k | UInt32 to_precision = 0; | 151 | 3.67k | UInt32 to_scale = 0; | 152 | 3.67k | | 153 | 3.67k | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | 3.67k | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | 3.67k | const auto* to_decimal_type = | 157 | 3.67k | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | 3.67k | ToDataType::check_type_precision(to_precision); | 160 | 3.67k | | 161 | 3.67k | to_scale = to_decimal_type->get_scale(); | 162 | 3.67k | ToDataType::check_type_scale(to_scale); | 163 | 3.67k | } | 164 | 3.67k | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | 3.67k | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 3.67k | to_precision = to_max_digits; | 167 | 3.67k | } | 168 | 3.67k | |
function_cast.cpp:_ZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_16DataTypeDateTimeEvEEEEbRKT_ Line | Count | Source | 104 | 25 | } | 105 | 25 | | 106 | 25 | auto wrapper = prepare_remove_nullable(context, from_nested, to_nested); | 107 | | | 108 | | return wrapper; | 109 | | } | 110 | | | 111 | | bool need_replace_null_data_to_default(FunctionContext* context, const DataTypePtr& from_type, | 112 | | const DataTypePtr& to_type) { | 113 | 25 | if (from_type->equals(*to_type)) { | 114 | 25 | return false; | 115 | 25 | } | 116 | 25 | | 117 | 25 | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | 25 | using Types = std::decay_t<decltype(types)>; | 119 | 25 | using ToDataType = typename Types::LeftType; | 120 | 25 | | 121 | 25 | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | 25 | IsDatelikeV2Types<ToDataType> || | 123 | 25 | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | 25 | return false; | 125 | 25 | } | 126 | 25 | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | 25 | using Types2 = std::decay_t<decltype(types2)>; | 129 | 25 | using FromDataType = typename Types2::LeftType; | 130 | 25 | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | 25 | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | 25 | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | 25 | return false; | 134 | 25 | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | 25 | using FromFieldType = typename FromDataType::FieldType; | 137 | 25 | using ToFieldType = typename ToDataType::FieldType; | 138 | 25 | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | 25 | | 141 | 25 | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | 25 | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | 25 | from_precision = | 145 | 25 | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | 25 | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | 25 | | 149 | 25 | UInt32 to_max_digits = 0; | 150 | 25 | UInt32 to_precision = 0; | 151 | 25 | UInt32 to_scale = 0; | 152 | 25 | | 153 | 25 | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | 25 | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | 25 | const auto* to_decimal_type = | 157 | 25 | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | 25 | ToDataType::check_type_precision(to_precision); | 160 | 25 | | 161 | 25 | to_scale = to_decimal_type->get_scale(); | 162 | 25 | ToDataType::check_type_scale(to_scale); | 163 | 25 | } | 164 | 25 | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | 25 | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 25 | to_precision = to_max_digits; | 167 | 25 | } | 168 | 25 | |
function_cast.cpp:_ZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeTimeV2EvEEEEbRKT_ Line | Count | Source | 104 | 392 | } | 105 | 392 | | 106 | 392 | auto wrapper = prepare_remove_nullable(context, from_nested, to_nested); | 107 | | | 108 | | return wrapper; | 109 | | } | 110 | | | 111 | | bool need_replace_null_data_to_default(FunctionContext* context, const DataTypePtr& from_type, | 112 | | const DataTypePtr& to_type) { | 113 | 392 | if (from_type->equals(*to_type)) { | 114 | 392 | return false; | 115 | 392 | } | 116 | 392 | | 117 | 392 | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | 392 | using Types = std::decay_t<decltype(types)>; | 119 | 392 | using ToDataType = typename Types::LeftType; | 120 | 392 | | 121 | 392 | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | 392 | IsDatelikeV2Types<ToDataType> || | 123 | 392 | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | 392 | return false; | 125 | 392 | } | 126 | 392 | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | 392 | using Types2 = std::decay_t<decltype(types2)>; | 129 | 392 | using FromDataType = typename Types2::LeftType; | 130 | 392 | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | 392 | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | 392 | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | 392 | return false; | 134 | 392 | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | 392 | using FromFieldType = typename FromDataType::FieldType; | 137 | 392 | using ToFieldType = typename ToDataType::FieldType; | 138 | 392 | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | 392 | | 141 | 392 | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | 392 | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | 392 | from_precision = | 145 | 392 | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | 392 | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | 392 | | 149 | 392 | UInt32 to_max_digits = 0; | 150 | 392 | UInt32 to_precision = 0; | 151 | 392 | UInt32 to_scale = 0; | 152 | 392 | | 153 | 392 | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | 392 | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | 392 | const auto* to_decimal_type = | 157 | 392 | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | 392 | ToDataType::check_type_precision(to_precision); | 160 | 392 | | 161 | 392 | to_scale = to_decimal_type->get_scale(); | 162 | 392 | ToDataType::check_type_scale(to_scale); | 163 | 392 | } | 164 | 392 | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | 392 | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 392 | to_precision = to_max_digits; | 167 | 392 | } | 168 | 392 | |
function_cast.cpp:_ZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_19DataTypeTimeStampTzEvEEEEbRKT_ Line | Count | Source | 104 | 145 | } | 105 | 145 | | 106 | 145 | auto wrapper = prepare_remove_nullable(context, from_nested, to_nested); | 107 | | | 108 | | return wrapper; | 109 | | } | 110 | 145 | | 111 | 145 | bool need_replace_null_data_to_default(FunctionContext* context, const DataTypePtr& from_type, | 112 | 145 | const DataTypePtr& to_type) { | 113 | 0 | if (from_type->equals(*to_type)) { | 114 | 145 | return false; | 115 | 145 | } | 116 | 145 | | 117 | 145 | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | 145 | using Types = std::decay_t<decltype(types)>; | 119 | 145 | using ToDataType = typename Types::LeftType; | 120 | 145 | | 121 | 145 | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | 145 | IsDatelikeV2Types<ToDataType> || | 123 | 145 | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | 145 | return false; | 125 | 145 | } | 126 | 145 | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | 145 | using Types2 = std::decay_t<decltype(types2)>; | 129 | 145 | using FromDataType = typename Types2::LeftType; | 130 | 145 | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | 145 | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | 145 | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | 145 | return false; | 134 | 145 | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | 145 | using FromFieldType = typename FromDataType::FieldType; | 137 | 145 | using ToFieldType = typename ToDataType::FieldType; | 138 | 145 | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | 145 | | 141 | 145 | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | 145 | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | 145 | from_precision = | 145 | 145 | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | 145 | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | 145 | | 149 | 145 | UInt32 to_max_digits = 0; | 150 | 145 | UInt32 to_precision = 0; | 151 | 145 | UInt32 to_scale = 0; | 152 | 145 | | 153 | 145 | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | 145 | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | 145 | const auto* to_decimal_type = | 157 | 145 | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | 145 | ToDataType::check_type_precision(to_precision); | 160 | 145 | | 161 | 145 | to_scale = to_decimal_type->get_scale(); | 162 | 145 | ToDataType::check_type_scale(to_scale); | 163 | 145 | } | 164 | 145 | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | 145 | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 145 | to_precision = to_max_digits; | 167 | 145 | } | 168 | 145 | |
function_cast.cpp:_ZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_12DataTypeIPv4EvEEEEbRKT_ Line | Count | Source | 104 | 609 | } | 105 | 609 | | 106 | 609 | auto wrapper = prepare_remove_nullable(context, from_nested, to_nested); | 107 | | | 108 | | return wrapper; | 109 | | } | 110 | 609 | | 111 | 609 | bool need_replace_null_data_to_default(FunctionContext* context, const DataTypePtr& from_type, | 112 | 609 | const DataTypePtr& to_type) { | 113 | 0 | if (from_type->equals(*to_type)) { | 114 | 609 | return false; | 115 | 609 | } | 116 | 609 | | 117 | 609 | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | 609 | using Types = std::decay_t<decltype(types)>; | 119 | 609 | using ToDataType = typename Types::LeftType; | 120 | 609 | | 121 | 609 | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | 609 | IsDatelikeV2Types<ToDataType> || | 123 | 609 | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | 609 | return false; | 125 | 609 | } | 126 | 609 | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | 609 | using Types2 = std::decay_t<decltype(types2)>; | 129 | 609 | using FromDataType = typename Types2::LeftType; | 130 | 609 | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | 609 | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | 609 | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | 609 | return false; | 134 | 609 | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | 609 | using FromFieldType = typename FromDataType::FieldType; | 137 | 609 | using ToFieldType = typename ToDataType::FieldType; | 138 | 609 | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | 609 | | 141 | 609 | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | 609 | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | 609 | from_precision = | 145 | 609 | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | 609 | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | 609 | | 149 | 609 | UInt32 to_max_digits = 0; | 150 | 609 | UInt32 to_precision = 0; | 151 | 609 | UInt32 to_scale = 0; | 152 | 609 | | 153 | 609 | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | 609 | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | 609 | const auto* to_decimal_type = | 157 | 609 | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | 609 | ToDataType::check_type_precision(to_precision); | 160 | 609 | | 161 | 609 | to_scale = to_decimal_type->get_scale(); | 162 | 609 | ToDataType::check_type_scale(to_scale); | 163 | 609 | } | 164 | 609 | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | 609 | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 609 | to_precision = to_max_digits; | 167 | 609 | } | 168 | 609 | |
function_cast.cpp:_ZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_12DataTypeIPv6EvEEEEbRKT_ Line | Count | Source | 104 | 283 | } | 105 | 283 | | 106 | 283 | auto wrapper = prepare_remove_nullable(context, from_nested, to_nested); | 107 | | | 108 | | return wrapper; | 109 | | } | 110 | 283 | | 111 | 283 | bool need_replace_null_data_to_default(FunctionContext* context, const DataTypePtr& from_type, | 112 | 283 | const DataTypePtr& to_type) { | 113 | 0 | if (from_type->equals(*to_type)) { | 114 | 283 | return false; | 115 | 283 | } | 116 | 283 | | 117 | 283 | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | 283 | using Types = std::decay_t<decltype(types)>; | 119 | 283 | using ToDataType = typename Types::LeftType; | 120 | 283 | | 121 | 283 | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | 283 | IsDatelikeV2Types<ToDataType> || | 123 | 283 | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | 283 | return false; | 125 | 283 | } | 126 | 283 | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | 283 | using Types2 = std::decay_t<decltype(types2)>; | 129 | 283 | using FromDataType = typename Types2::LeftType; | 130 | 283 | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | 283 | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | 283 | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | 283 | return false; | 134 | 283 | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | 283 | using FromFieldType = typename FromDataType::FieldType; | 137 | 283 | using ToFieldType = typename ToDataType::FieldType; | 138 | 283 | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | 283 | | 141 | 283 | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | 283 | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | 283 | from_precision = | 145 | 283 | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | 283 | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | 283 | | 149 | 283 | UInt32 to_max_digits = 0; | 150 | 283 | UInt32 to_precision = 0; | 151 | 283 | UInt32 to_scale = 0; | 152 | 283 | | 153 | 283 | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | 283 | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | 283 | const auto* to_decimal_type = | 157 | 283 | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | 283 | ToDataType::check_type_precision(to_precision); | 160 | 283 | | 161 | 283 | to_scale = to_decimal_type->get_scale(); | 162 | 283 | ToDataType::check_type_scale(to_scale); | 163 | 283 | } | 164 | 283 | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | 283 | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 283 | to_precision = to_max_digits; | 167 | 283 | } | 168 | 283 | |
function_cast.cpp:_ZZN5doris11CastWrapper33need_replace_null_data_to_defaultEPNS_15FunctionContextERKSt10shared_ptrIKNS_9IDataTypeEES8_ENK3$_0clINS_8TypePairINS_14DataTypeStringEvEEEEbRKT_ Line | Count | Source | 104 | 31.3k | } | 105 | 31.3k | | 106 | 31.3k | auto wrapper = prepare_remove_nullable(context, from_nested, to_nested); | 107 | | | 108 | | return wrapper; | 109 | | } | 110 | 31.3k | | 111 | 31.3k | bool need_replace_null_data_to_default(FunctionContext* context, const DataTypePtr& from_type, | 112 | 31.3k | const DataTypePtr& to_type) { | 113 | 0 | if (from_type->equals(*to_type)) { | 114 | 31.3k | return false; | 115 | 31.3k | } | 116 | 31.3k | | 117 | 31.3k | auto make_default_wrapper = [&](const auto& types) -> bool { | 118 | 31.3k | using Types = std::decay_t<decltype(types)>; | 119 | 31.3k | using ToDataType = typename Types::LeftType; | 120 | 31.3k | | 121 | 31.3k | if constexpr (!(IsDataTypeDecimalOrNumber<ToDataType> || IsDatelikeV1Types<ToDataType> || | 122 | 31.3k | IsDatelikeV2Types<ToDataType> || | 123 | 31.3k | std::is_same_v<ToDataType, DataTypeTimeV2>)) { | 124 | 31.3k | return false; | 125 | 31.3k | } | 126 | 31.3k | return call_on_index_and_data_type< | 127 | | ToDataType>(from_type->get_primitive_type(), [&](const auto& types2) -> bool { | 128 | 31.3k | using Types2 = std::decay_t<decltype(types2)>; | 129 | 31.3k | using FromDataType = typename Types2::LeftType; | 130 | 31.3k | if constexpr (!(IsDataTypeDecimalOrNumber<FromDataType> || | 131 | 31.3k | IsDatelikeV1Types<FromDataType> || IsDatelikeV2Types<FromDataType> || | 132 | 31.3k | std::is_same_v<FromDataType, DataTypeTimeV2>)) { | 133 | 31.3k | return false; | 134 | 31.3k | } | 135 | | if constexpr (IsDataTypeDecimal<FromDataType> || IsDataTypeDecimal<ToDataType>) { | 136 | 31.3k | using FromFieldType = typename FromDataType::FieldType; | 137 | 31.3k | using ToFieldType = typename ToDataType::FieldType; | 138 | 31.3k | UInt32 from_precision = NumberTraits::max_ascii_len<FromFieldType>(); | 139 | | UInt32 from_scale = 0; | 140 | 31.3k | | 141 | 31.3k | if constexpr (IsDataTypeDecimal<FromDataType>) { | 142 | | const auto* from_decimal_type = | 143 | 31.3k | check_and_get_data_type<FromDataType>(from_type.get()); | 144 | 31.3k | from_precision = | 145 | 31.3k | NumberTraits::max_ascii_len<typename FromFieldType::NativeType>(); | 146 | 31.3k | from_scale = from_decimal_type->get_scale(); | 147 | | } | 148 | 31.3k | | 149 | 31.3k | UInt32 to_max_digits = 0; | 150 | 31.3k | UInt32 to_precision = 0; | 151 | 31.3k | UInt32 to_scale = 0; | 152 | 31.3k | | 153 | 31.3k | if constexpr (IsDataTypeDecimal<ToDataType>) { | 154 | 31.3k | to_max_digits = NumberTraits::max_ascii_len<typename ToFieldType::NativeType>(); | 155 | | | 156 | 31.3k | const auto* to_decimal_type = | 157 | 31.3k | check_and_get_data_type<ToDataType>(to_type.get()); | 158 | | to_precision = to_decimal_type->get_precision(); | 159 | 31.3k | ToDataType::check_type_precision(to_precision); | 160 | 31.3k | | 161 | 31.3k | to_scale = to_decimal_type->get_scale(); | 162 | 31.3k | ToDataType::check_type_scale(to_scale); | 163 | 31.3k | } | 164 | 31.3k | if constexpr (IsIntegralV<ToFieldType> || std::is_floating_point_v<ToFieldType>) { | 165 | 31.3k | to_max_digits = NumberTraits::max_ascii_len<ToFieldType>(); | 166 | 31.3k | to_precision = to_max_digits; | 167 | 31.3k | } | 168 | 31.3k | |
|
169 | | bool narrow_integral = context->check_overflow_for_decimal() && |
170 | 282k | (to_precision - to_scale) <= (from_precision - from_scale); |
171 | 346k | |
172 | | bool multiply_may_overflow = context->check_overflow_for_decimal(); |
173 | | if (to_scale > from_scale) { |
174 | 368k | multiply_may_overflow &= |
175 | | (from_precision + to_scale - from_scale) >= to_max_digits; |
176 | 368k | } |
177 | | return narrow_integral || multiply_may_overflow; |
178 | 368k | } |
179 | 346k | return false; |
180 | 346k | }); |
181 | 346k | }; |
182 | 346k | |
183 | 346k | return call_on_index_and_data_type<void>(to_type->get_primitive_type(), make_default_wrapper); |
184 | 346k | } |
185 | | |
186 | 346k | WrapperType prepare_remove_nullable(FunctionContext* context, const DataTypePtr& from_type, |
187 | 346k | const DataTypePtr& to_type) { |
188 | | /// Determine whether pre-processing and/or post-processing must take place during conversion. |
189 | 346k | bool result_is_nullable = to_type->is_nullable(); |
190 | 346k | |
191 | 346k | if (result_is_nullable) { |
192 | 346k | return [from_type, to_type](FunctionContext* context, Block& block, |
193 | 346k | const ColumnNumbers& arguments, uint32_t result, |
194 | | size_t input_rows_count, |
195 | 346k | const NullMap::value_type* null_map = nullptr) { |
196 | 346k | auto from_type_not_nullable = remove_nullable(from_type); |
197 | 346k | auto to_type_not_nullable = remove_nullable(to_type); |
198 | 302k | |
199 | 302k | bool replace_null_data_to_default = need_replace_null_data_to_default( |
200 | 346k | context, from_type_not_nullable, to_type_not_nullable); |
201 | 346k | |
202 | 346k | auto nested_result_index = block.columns(); |
203 | | block.insert(block.get_by_position(result).unnest_nullable()); |
204 | 320k | auto nested_source_index = block.columns(); |
205 | 320k | block.insert(block.get_by_position(arguments[0]) |
206 | 320k | .unnest_nullable(replace_null_data_to_default)); |
207 | | |
208 | 320k | const auto& arg_col = block.get_by_position(arguments[0]); |
209 | 320k | const NullMap::value_type* arg_null_map = nullptr; |
210 | 320k | if (const auto* nullable = check_and_get_column<ColumnNullable>(*arg_col.column)) { |
211 | 346k | arg_null_map = nullable->get_null_map_data().data(); |
212 | 346k | } |
213 | 22.3k | RETURN_IF_ERROR(prepare_impl(context, from_type_not_nullable, to_type_not_nullable)( |
214 | 22.3k | context, block, {nested_source_index}, nested_result_index, input_rows_count, |
215 | 368k | arg_null_map)); |
216 | | |
217 | | block.get_by_position(result).column = |
218 | | wrap_in_nullable(block.get_by_position(nested_result_index).column, block, |
219 | | arguments, input_rows_count); |
220 | 385k | |
221 | 385k | block.erase(nested_source_index); |
222 | 385k | block.erase(nested_result_index); |
223 | 385k | return Status::OK(); |
224 | 69.4k | }; |
225 | 69.4k | } else { |
226 | | return prepare_impl(context, from_type, to_type); |
227 | | } |
228 | 315k | } |
229 | 11.7k | |
230 | 11.7k | /// 'from_type' and 'to_type' are nested types in case of Nullable. |
231 | 11.7k | /// 'requested_result_is_nullable' is true if CAST to Nullable type is requested. |
232 | 303k | WrapperType prepare_impl(FunctionContext* context, const DataTypePtr& origin_from_type, |
233 | 18.4k | const DataTypePtr& origin_to_type) { |
234 | 18.4k | auto to_type = get_serialized_type(origin_to_type); |
235 | 18.4k | auto from_type = get_serialized_type(origin_from_type); |
236 | | if (from_type->equals(*to_type)) { |
237 | 285k | return create_identity_wrapper(from_type); |
238 | 9.36k | } |
239 | 9.36k | |
240 | 18.4E | // variant needs to be judged first |
241 | 9.36k | if (to_type->get_primitive_type() == PrimitiveType::TYPE_VARIANT) { |
242 | | return create_cast_to_variant_wrapper(from_type, |
243 | 276k | static_cast<const DataTypeVariant&>(*to_type)); |
244 | 927 | } |
245 | 927 | if (from_type->get_primitive_type() == PrimitiveType::TYPE_VARIANT) { |
246 | 3.80k | return create_cast_from_variant_wrapper(static_cast<const DataTypeVariant&>(*from_type), |
247 | 3.80k | to_type); |
248 | 5.25k | } |
249 | 5.25k | |
250 | 30.6k | if (from_type->get_primitive_type() == PrimitiveType::TYPE_JSONB) { |
251 | 30.6k | return create_cast_from_jsonb_wrapper(static_cast<const DataTypeJsonb&>(*from_type), |
252 | 40.2k | to_type, |
253 | 40.2k | context ? context->jsonb_string_as_string() : false); |
254 | 4.10k | } |
255 | 4.10k | |
256 | 10.2k | switch (to_type->get_primitive_type()) { |
257 | 10.2k | case PrimitiveType::TYPE_BOOLEAN: |
258 | 25.2k | return create_boolean_wrapper(context, from_type); |
259 | 25.2k | case PrimitiveType::TYPE_TINYINT: |
260 | 30 | return create_int_wrapper<DataTypeInt8>(context, from_type); |
261 | 30 | case PrimitiveType::TYPE_SMALLINT: |
262 | 25 | return create_int_wrapper<DataTypeInt16>(context, from_type); |
263 | 25 | case PrimitiveType::TYPE_INT: |
264 | 6.94k | return create_int_wrapper<DataTypeInt32>(context, from_type); |
265 | 6.94k | case PrimitiveType::TYPE_BIGINT: |
266 | 4.04k | return create_int_wrapper<DataTypeInt64>(context, from_type); |
267 | 4.04k | case PrimitiveType::TYPE_LARGEINT: |
268 | 145 | return create_int_wrapper<DataTypeInt128>(context, from_type); |
269 | 145 | case PrimitiveType::TYPE_FLOAT: |
270 | 392 | return create_float_wrapper<DataTypeFloat32>(context, from_type); |
271 | 392 | case PrimitiveType::TYPE_DOUBLE: |
272 | 475 | return create_float_wrapper<DataTypeFloat64>(context, from_type); |
273 | 475 | case PrimitiveType::TYPE_DATE: |
274 | 284 | return create_datelike_wrapper<DataTypeDate>(context, from_type); |
275 | 284 | case PrimitiveType::TYPE_DATETIME: |
276 | 292 | return create_datelike_wrapper<DataTypeDateTime>(context, from_type); |
277 | 292 | case PrimitiveType::TYPE_DATEV2: |
278 | 6.65k | return create_datelike_wrapper<DataTypeDateV2>(context, from_type); |
279 | 6.65k | case PrimitiveType::TYPE_DATETIMEV2: |
280 | 13.9k | return create_datelike_wrapper<DataTypeDateTimeV2>(context, from_type); |
281 | 13.9k | case PrimitiveType::TYPE_TIMESTAMPTZ: |
282 | 11.5k | return create_timestamptz_wrapper(context, from_type); |
283 | 11.5k | case PrimitiveType::TYPE_TIMEV2: |
284 | 7.64k | return create_datelike_wrapper<DataTypeTimeV2>(context, from_type); |
285 | 7.64k | case PrimitiveType::TYPE_IPV4: |
286 | 31 | return create_ip_wrapper<DataTypeIPv4>(context, from_type); |
287 | 4.23k | case PrimitiveType::TYPE_IPV6: |
288 | 27.8k | return create_ip_wrapper<DataTypeIPv6>(context, from_type); |
289 | 27.8k | case PrimitiveType::TYPE_DECIMALV2: |
290 | 14.0k | return create_decimal_wrapper<DataTypeDecimalV2>(context, from_type); |
291 | 14.0k | case PrimitiveType::TYPE_DECIMAL32: |
292 | 14.0k | return create_decimal_wrapper<DataTypeDecimal32>(context, from_type); |
293 | 1.34k | case PrimitiveType::TYPE_DECIMAL64: |
294 | 1.34k | return create_decimal_wrapper<DataTypeDecimal64>(context, from_type); |
295 | 1.34k | case PrimitiveType::TYPE_DECIMAL128I: |
296 | 948 | return create_decimal_wrapper<DataTypeDecimal128>(context, from_type); |
297 | 948 | case PrimitiveType::TYPE_DECIMAL256: |
298 | 0 | return create_decimal_wrapper<DataTypeDecimal256>(context, from_type); |
299 | 0 | case PrimitiveType::TYPE_CHAR: |
300 | 1 | case PrimitiveType::TYPE_VARCHAR: |
301 | 1 | case PrimitiveType::TYPE_STRING: |
302 | 1 | return create_string_wrapper(from_type); |
303 | 59.0k | case PrimitiveType::TYPE_ARRAY: |
304 | 59.0k | return create_array_wrapper(context, from_type, |
305 | 59.0k | static_cast<const DataTypeArray&>(*to_type)); |
306 | 2 | case PrimitiveType::TYPE_STRUCT: |
307 | 2 | return create_struct_wrapper(context, from_type, |
308 | 0 | static_cast<const DataTypeStruct&>(*to_type)); |
309 | 0 | case PrimitiveType::TYPE_MAP: |
310 | 276k | return create_map_wrapper(context, from_type, static_cast<const DataTypeMap&>(*to_type)); |
311 | | case PrimitiveType::TYPE_HLL: |
312 | 0 | return create_hll_wrapper(context, from_type, static_cast<const DataTypeHLL&>(*to_type)); |
313 | 276k | case PrimitiveType::TYPE_BITMAP: |
314 | | return create_bitmap_wrapper(context, from_type, |
315 | | static_cast<const DataTypeBitMap&>(*to_type)); |
316 | | case PrimitiveType::TYPE_QUANTILE_STATE: |
317 | | return create_quantile_state_wrapper(context, from_type, |
318 | | static_cast<const DataTypeQuantileState&>(*to_type)); |
319 | | case PrimitiveType::TYPE_JSONB: |
320 | 359k | return create_cast_to_jsonb_wrapper(from_type, static_cast<const DataTypeJsonb&>(*to_type), |
321 | | context ? context->string_as_jsonb_string() : false); |
322 | 0 | case PrimitiveType::TYPE_VARBINARY: |
323 | | return create_varbinary_wrapper(from_type); |
324 | | default: |
325 | | break; |
326 | 359k | } |
327 | 359k | |
328 | 359k | return create_unsupport_wrapper(from_type->get_name(), to_type->get_name()); |
329 | | } |
330 | 359k | |
331 | 359k | } // namespace CastWrapper |
332 | | |
333 | | class PreparedFunctionCast : public PreparedFunctionImpl { |
334 | | public: |
335 | | explicit PreparedFunctionCast(CastWrapper::WrapperType&& wrapper_function_, const char* name_) |
336 | | : wrapper_function(std::move(wrapper_function_)), name(name_) {} |
337 | | |
338 | | String get_name() const override { return name; } |
339 | | |
340 | | protected: |
341 | 271k | Status execute_impl(FunctionContext* context, Block& block, const ColumnNumbers& arguments, |
342 | 271k | uint32_t result, size_t input_rows_count) const override { |
343 | 271k | return wrapper_function(context, block, arguments, result, input_rows_count, nullptr); |
344 | | } |
345 | 359k | |
346 | 359k | bool use_default_implementation_for_nulls() const override { return false; } |
347 | | ColumnNumbers get_arguments_that_are_always_constant() const override { return {1}; } |
348 | | |
349 | | private: |
350 | 359k | CastWrapper::WrapperType wrapper_function; |
351 | 359k | const char* name; |
352 | 359k | }; |
353 | 359k | |
354 | 359k | class FunctionCast final : public IFunctionBase { |
355 | 359k | public: |
356 | | FunctionCast(const char* name_, DataTypes argument_types_, DataTypePtr return_type_) |
357 | 0 | : name(name_), |
358 | | argument_types(std::move(argument_types_)), |
359 | 0 | return_type(std::move(return_type_)) {} |
360 | | |
361 | | const DataTypes& get_argument_types() const override { return argument_types; } |
362 | | const DataTypePtr& get_return_type() const override { return return_type; } |
363 | | |
364 | | PreparedFunctionPtr prepare(FunctionContext* context, const Block& /*sample_block*/, |
365 | | const ColumnNumbers& /*arguments*/, |
366 | | uint32_t /*result*/) const override { |
367 | | return std::make_shared<PreparedFunctionCast>( |
368 | | CastWrapper::prepare_unpack_dictionaries(context, get_argument_types()[0], |
369 | | get_return_type()), |
370 | | name); |
371 | 271k | } |
372 | | |
373 | 271k | String get_name() const override { return name; } |
374 | | |
375 | 1 | bool is_use_default_implementation_for_constants() const override { return true; } |
376 | | |
377 | 0 | private: |
378 | | const char* name = nullptr; |
379 | 0 |
|
380 | | DataTypes argument_types; |
381 | | DataTypePtr return_type; |
382 | | }; |
383 | 270k | |
384 | 270k | class FunctionBuilderCast : public FunctionBuilderImpl { |
385 | | public: |
386 | 813k | static constexpr auto name = "CAST"; |
387 | 542k | static FunctionBuilderPtr create() { return std::make_shared<FunctionBuilderCast>(); } |
388 | 542k | |
389 | | FunctionBuilderCast() = default; |
390 | 270k | |
391 | 270k | String get_name() const override { return name; } |
392 | | |
393 | 271k | size_t get_number_of_arguments() const override { return 2; } |
394 | 0 |
|
395 | 0 | ColumnNumbers get_arguments_that_are_always_constant() const override { return {1}; } |
396 | 0 | |
397 | | protected: |
398 | 0 | FunctionBasePtr build_impl(const ColumnsWithTypeAndName& arguments, |
399 | | const DataTypePtr& return_type) const override { |
400 | | DataTypes data_types(arguments.size()); |
401 | 8 | |
402 | 8 | for (size_t i = 0; i < arguments.size(); ++i) { |
403 | 8 | data_types[i] = arguments[i].type; |
404 | | } |
405 | | |
406 | | return std::make_shared<FunctionCast>(name, data_types, return_type); |
407 | | } |
408 | | |
409 | | bool skip_return_type_check() const override { return true; } |
410 | | DataTypePtr get_return_type_impl(const ColumnsWithTypeAndName& arguments) const override { |
411 | | return nullptr; |
412 | | } |
413 | | |
414 | | bool use_default_implementation_for_nulls() const override { return false; } |
415 | | }; |
416 | | |
417 | | void register_function_cast(SimpleFunctionFactory& factory) { |
418 | | factory.register_function<FunctionBuilderCast>(); |
419 | | } |
420 | | } // namespace doris |