be/src/exprs/function/function_string_to_string.h
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 | | // This file is copied from |
18 | | // https://github.com/ClickHouse/ClickHouse/blob/master/src/Functions/FunctionStringToString.h |
19 | | // and modified by Doris |
20 | | |
21 | | #pragma once |
22 | | |
23 | | #include "core/column/column_string.h" |
24 | | #include "core/column/column_vector.h" |
25 | | #include "core/data_type/data_type_number.h" |
26 | | #include "core/data_type/data_type_string.h" |
27 | | #include "exprs/function/function.h" |
28 | | #include "exprs/function/function_helpers.h" |
29 | | |
30 | | namespace doris { |
31 | | |
32 | | template <typename Impl, typename Name> |
33 | | class FunctionStringToString : public IFunction { |
34 | | public: |
35 | | static constexpr auto name = Name::name; |
36 | | static constexpr bool has_variadic_argument = |
37 | | !std::is_void_v<decltype(has_variadic_argument_types(std::declval<Impl>()))>; |
38 | | |
39 | 132 | static FunctionPtr create() { return std::make_shared<FunctionStringToString>(); }_ZN5doris22FunctionStringToStringINS_13NameQuoteImplENS_9NameQuoteEE6createEv Line | Count | Source | 39 | 15 | static FunctionPtr create() { return std::make_shared<FunctionStringToString>(); } |
_ZN5doris22FunctionStringToStringINS_12TransferImplINS_11NameToLowerEEES2_E6createEv Line | Count | Source | 39 | 33 | static FunctionPtr create() { return std::make_shared<FunctionStringToString>(); } |
_ZN5doris22FunctionStringToStringINS_12TransferImplINS_11NameToUpperEEES2_E6createEv Line | Count | Source | 39 | 58 | static FunctionPtr create() { return std::make_shared<FunctionStringToString>(); } |
_ZN5doris22FunctionStringToStringINS_11InitcapImplENS_13NameToInitcapEE6createEv Line | Count | Source | 39 | 11 | static FunctionPtr create() { return std::make_shared<FunctionStringToString>(); } |
_ZN5doris22FunctionStringToStringINS_20ExtractSubstringImplINS_13ExtractDomainILb0EEEEENS_10NameDomainEE6createEv Line | Count | Source | 39 | 3 | static FunctionPtr create() { return std::make_shared<FunctionStringToString>(); } |
_ZN5doris22FunctionStringToStringINS_20ExtractSubstringImplINS_13ExtractDomainILb1EEEEENS_20NameDomainWithoutWWWEE6createEv Line | Count | Source | 39 | 3 | static FunctionPtr create() { return std::make_shared<FunctionStringToString>(); } |
_ZN5doris22FunctionStringToStringINS_20ExtractSubstringImplINS_15ExtractProtocolEEENS_12NameProtocolEE6createEv Line | Count | Source | 39 | 3 | static FunctionPtr create() { return std::make_shared<FunctionStringToString>(); } |
_ZN5doris22FunctionStringToStringINS_20ExtractSubstringImplINS_21ExtractTopLevelDomainEEENS_18NameTopLevelDomainEE6createEv Line | Count | Source | 39 | 2 | static FunctionPtr create() { return std::make_shared<FunctionStringToString>(); } |
_ZN5doris22FunctionStringToStringINS_20ExtractSubstringImplINS_32ExtractFirstSignificantSubdomainEEENS_29NameFirstSignificantSubdomainEE6createEv Line | Count | Source | 39 | 2 | static FunctionPtr create() { return std::make_shared<FunctionStringToString>(); } |
_ZN5doris22FunctionStringToStringINS_20ExtractSubstringImplINS_30CutToFirstSignificantSubdomainEEENS_34NameCutToFirstSignificantSubdomainEE6createEv Line | Count | Source | 39 | 2 | static FunctionPtr create() { return std::make_shared<FunctionStringToString>(); } |
|
40 | | |
41 | 10 | String get_name() const override { return name; }_ZNK5doris22FunctionStringToStringINS_13NameQuoteImplENS_9NameQuoteEE8get_nameB5cxx11Ev Line | Count | Source | 41 | 1 | String get_name() const override { return name; } |
_ZNK5doris22FunctionStringToStringINS_12TransferImplINS_11NameToLowerEEES2_E8get_nameB5cxx11Ev Line | Count | Source | 41 | 1 | String get_name() const override { return name; } |
_ZNK5doris22FunctionStringToStringINS_12TransferImplINS_11NameToUpperEEES2_E8get_nameB5cxx11Ev Line | Count | Source | 41 | 1 | String get_name() const override { return name; } |
_ZNK5doris22FunctionStringToStringINS_11InitcapImplENS_13NameToInitcapEE8get_nameB5cxx11Ev Line | Count | Source | 41 | 1 | String get_name() const override { return name; } |
_ZNK5doris22FunctionStringToStringINS_20ExtractSubstringImplINS_13ExtractDomainILb0EEEEENS_10NameDomainEE8get_nameB5cxx11Ev Line | Count | Source | 41 | 1 | String get_name() const override { return name; } |
_ZNK5doris22FunctionStringToStringINS_20ExtractSubstringImplINS_13ExtractDomainILb1EEEEENS_20NameDomainWithoutWWWEE8get_nameB5cxx11Ev Line | Count | Source | 41 | 1 | String get_name() const override { return name; } |
_ZNK5doris22FunctionStringToStringINS_20ExtractSubstringImplINS_15ExtractProtocolEEENS_12NameProtocolEE8get_nameB5cxx11Ev Line | Count | Source | 41 | 1 | String get_name() const override { return name; } |
_ZNK5doris22FunctionStringToStringINS_20ExtractSubstringImplINS_21ExtractTopLevelDomainEEENS_18NameTopLevelDomainEE8get_nameB5cxx11Ev Line | Count | Source | 41 | 1 | String get_name() const override { return name; } |
_ZNK5doris22FunctionStringToStringINS_20ExtractSubstringImplINS_32ExtractFirstSignificantSubdomainEEENS_29NameFirstSignificantSubdomainEE8get_nameB5cxx11Ev Line | Count | Source | 41 | 1 | String get_name() const override { return name; } |
_ZNK5doris22FunctionStringToStringINS_20ExtractSubstringImplINS_30CutToFirstSignificantSubdomainEEENS_34NameCutToFirstSignificantSubdomainEE8get_nameB5cxx11Ev Line | Count | Source | 41 | 1 | String get_name() const override { return name; } |
|
42 | | |
43 | 112 | size_t get_number_of_arguments() const override { return 1; }_ZNK5doris22FunctionStringToStringINS_13NameQuoteImplENS_9NameQuoteEE23get_number_of_argumentsEv Line | Count | Source | 43 | 13 | size_t get_number_of_arguments() const override { return 1; } |
_ZNK5doris22FunctionStringToStringINS_12TransferImplINS_11NameToLowerEEES2_E23get_number_of_argumentsEv Line | Count | Source | 43 | 31 | size_t get_number_of_arguments() const override { return 1; } |
_ZNK5doris22FunctionStringToStringINS_12TransferImplINS_11NameToUpperEEES2_E23get_number_of_argumentsEv Line | Count | Source | 43 | 56 | size_t get_number_of_arguments() const override { return 1; } |
_ZNK5doris22FunctionStringToStringINS_11InitcapImplENS_13NameToInitcapEE23get_number_of_argumentsEv Line | Count | Source | 43 | 9 | size_t get_number_of_arguments() const override { return 1; } |
_ZNK5doris22FunctionStringToStringINS_20ExtractSubstringImplINS_13ExtractDomainILb0EEEEENS_10NameDomainEE23get_number_of_argumentsEv Line | Count | Source | 43 | 1 | size_t get_number_of_arguments() const override { return 1; } |
_ZNK5doris22FunctionStringToStringINS_20ExtractSubstringImplINS_13ExtractDomainILb1EEEEENS_20NameDomainWithoutWWWEE23get_number_of_argumentsEv Line | Count | Source | 43 | 1 | size_t get_number_of_arguments() const override { return 1; } |
_ZNK5doris22FunctionStringToStringINS_20ExtractSubstringImplINS_15ExtractProtocolEEENS_12NameProtocolEE23get_number_of_argumentsEv Line | Count | Source | 43 | 1 | size_t get_number_of_arguments() const override { return 1; } |
Unexecuted instantiation: _ZNK5doris22FunctionStringToStringINS_20ExtractSubstringImplINS_21ExtractTopLevelDomainEEENS_18NameTopLevelDomainEE23get_number_of_argumentsEv Unexecuted instantiation: _ZNK5doris22FunctionStringToStringINS_20ExtractSubstringImplINS_32ExtractFirstSignificantSubdomainEEENS_29NameFirstSignificantSubdomainEE23get_number_of_argumentsEv Unexecuted instantiation: _ZNK5doris22FunctionStringToStringINS_20ExtractSubstringImplINS_30CutToFirstSignificantSubdomainEEENS_34NameCutToFirstSignificantSubdomainEE23get_number_of_argumentsEv |
44 | | |
45 | 112 | DataTypePtr get_return_type_impl(const DataTypes& arguments) const override { |
46 | 112 | if (!is_string_type(arguments[0]->get_primitive_type())) { |
47 | 0 | throw doris::Exception(ErrorCode::INVALID_ARGUMENT, |
48 | 0 | "Illegal type {} of argument of function {}", |
49 | 0 | arguments[0]->get_name(), get_name()); |
50 | 0 | } |
51 | | |
52 | 112 | return arguments[0]; |
53 | 112 | } _ZNK5doris22FunctionStringToStringINS_13NameQuoteImplENS_9NameQuoteEE20get_return_type_implERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS8_EE Line | Count | Source | 45 | 13 | DataTypePtr get_return_type_impl(const DataTypes& arguments) const override { | 46 | 13 | if (!is_string_type(arguments[0]->get_primitive_type())) { | 47 | 0 | throw doris::Exception(ErrorCode::INVALID_ARGUMENT, | 48 | 0 | "Illegal type {} of argument of function {}", | 49 | 0 | arguments[0]->get_name(), get_name()); | 50 | 0 | } | 51 | | | 52 | 13 | return arguments[0]; | 53 | 13 | } |
_ZNK5doris22FunctionStringToStringINS_12TransferImplINS_11NameToLowerEEES2_E20get_return_type_implERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS9_EE Line | Count | Source | 45 | 31 | DataTypePtr get_return_type_impl(const DataTypes& arguments) const override { | 46 | 31 | if (!is_string_type(arguments[0]->get_primitive_type())) { | 47 | 0 | throw doris::Exception(ErrorCode::INVALID_ARGUMENT, | 48 | 0 | "Illegal type {} of argument of function {}", | 49 | 0 | arguments[0]->get_name(), get_name()); | 50 | 0 | } | 51 | | | 52 | 31 | return arguments[0]; | 53 | 31 | } |
_ZNK5doris22FunctionStringToStringINS_12TransferImplINS_11NameToUpperEEES2_E20get_return_type_implERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS9_EE Line | Count | Source | 45 | 56 | DataTypePtr get_return_type_impl(const DataTypes& arguments) const override { | 46 | 56 | if (!is_string_type(arguments[0]->get_primitive_type())) { | 47 | 0 | throw doris::Exception(ErrorCode::INVALID_ARGUMENT, | 48 | 0 | "Illegal type {} of argument of function {}", | 49 | 0 | arguments[0]->get_name(), get_name()); | 50 | 0 | } | 51 | | | 52 | 56 | return arguments[0]; | 53 | 56 | } |
_ZNK5doris22FunctionStringToStringINS_11InitcapImplENS_13NameToInitcapEE20get_return_type_implERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS8_EE Line | Count | Source | 45 | 9 | DataTypePtr get_return_type_impl(const DataTypes& arguments) const override { | 46 | 9 | if (!is_string_type(arguments[0]->get_primitive_type())) { | 47 | 0 | throw doris::Exception(ErrorCode::INVALID_ARGUMENT, | 48 | 0 | "Illegal type {} of argument of function {}", | 49 | 0 | arguments[0]->get_name(), get_name()); | 50 | 0 | } | 51 | | | 52 | 9 | return arguments[0]; | 53 | 9 | } |
_ZNK5doris22FunctionStringToStringINS_20ExtractSubstringImplINS_13ExtractDomainILb0EEEEENS_10NameDomainEE20get_return_type_implERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaISB_EE Line | Count | Source | 45 | 1 | DataTypePtr get_return_type_impl(const DataTypes& arguments) const override { | 46 | 1 | if (!is_string_type(arguments[0]->get_primitive_type())) { | 47 | 0 | throw doris::Exception(ErrorCode::INVALID_ARGUMENT, | 48 | 0 | "Illegal type {} of argument of function {}", | 49 | 0 | arguments[0]->get_name(), get_name()); | 50 | 0 | } | 51 | | | 52 | 1 | return arguments[0]; | 53 | 1 | } |
_ZNK5doris22FunctionStringToStringINS_20ExtractSubstringImplINS_13ExtractDomainILb1EEEEENS_20NameDomainWithoutWWWEE20get_return_type_implERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaISB_EE Line | Count | Source | 45 | 1 | DataTypePtr get_return_type_impl(const DataTypes& arguments) const override { | 46 | 1 | if (!is_string_type(arguments[0]->get_primitive_type())) { | 47 | 0 | throw doris::Exception(ErrorCode::INVALID_ARGUMENT, | 48 | 0 | "Illegal type {} of argument of function {}", | 49 | 0 | arguments[0]->get_name(), get_name()); | 50 | 0 | } | 51 | | | 52 | 1 | return arguments[0]; | 53 | 1 | } |
_ZNK5doris22FunctionStringToStringINS_20ExtractSubstringImplINS_15ExtractProtocolEEENS_12NameProtocolEE20get_return_type_implERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaISA_EE Line | Count | Source | 45 | 1 | DataTypePtr get_return_type_impl(const DataTypes& arguments) const override { | 46 | 1 | if (!is_string_type(arguments[0]->get_primitive_type())) { | 47 | 0 | throw doris::Exception(ErrorCode::INVALID_ARGUMENT, | 48 | 0 | "Illegal type {} of argument of function {}", | 49 | 0 | arguments[0]->get_name(), get_name()); | 50 | 0 | } | 51 | | | 52 | 1 | return arguments[0]; | 53 | 1 | } |
Unexecuted instantiation: _ZNK5doris22FunctionStringToStringINS_20ExtractSubstringImplINS_21ExtractTopLevelDomainEEENS_18NameTopLevelDomainEE20get_return_type_implERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaISA_EE Unexecuted instantiation: _ZNK5doris22FunctionStringToStringINS_20ExtractSubstringImplINS_32ExtractFirstSignificantSubdomainEEENS_29NameFirstSignificantSubdomainEE20get_return_type_implERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaISA_EE Unexecuted instantiation: _ZNK5doris22FunctionStringToStringINS_20ExtractSubstringImplINS_30CutToFirstSignificantSubdomainEEENS_34NameCutToFirstSignificantSubdomainEE20get_return_type_implERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaISA_EE |
54 | | |
55 | 10 | DataTypes get_variadic_argument_types_impl() const override { |
56 | | if constexpr (has_variadic_argument) { |
57 | | return Impl::get_variadic_argument_types(); |
58 | | } |
59 | 10 | return {}; |
60 | 10 | } _ZNK5doris22FunctionStringToStringINS_13NameQuoteImplENS_9NameQuoteEE32get_variadic_argument_types_implEv Line | Count | Source | 55 | 1 | DataTypes get_variadic_argument_types_impl() const override { | 56 | | if constexpr (has_variadic_argument) { | 57 | | return Impl::get_variadic_argument_types(); | 58 | | } | 59 | 1 | return {}; | 60 | 1 | } |
_ZNK5doris22FunctionStringToStringINS_12TransferImplINS_11NameToLowerEEES2_E32get_variadic_argument_types_implEv Line | Count | Source | 55 | 1 | DataTypes get_variadic_argument_types_impl() const override { | 56 | | if constexpr (has_variadic_argument) { | 57 | | return Impl::get_variadic_argument_types(); | 58 | | } | 59 | 1 | return {}; | 60 | 1 | } |
_ZNK5doris22FunctionStringToStringINS_12TransferImplINS_11NameToUpperEEES2_E32get_variadic_argument_types_implEv Line | Count | Source | 55 | 1 | DataTypes get_variadic_argument_types_impl() const override { | 56 | | if constexpr (has_variadic_argument) { | 57 | | return Impl::get_variadic_argument_types(); | 58 | | } | 59 | 1 | return {}; | 60 | 1 | } |
_ZNK5doris22FunctionStringToStringINS_11InitcapImplENS_13NameToInitcapEE32get_variadic_argument_types_implEv Line | Count | Source | 55 | 1 | DataTypes get_variadic_argument_types_impl() const override { | 56 | | if constexpr (has_variadic_argument) { | 57 | | return Impl::get_variadic_argument_types(); | 58 | | } | 59 | 1 | return {}; | 60 | 1 | } |
_ZNK5doris22FunctionStringToStringINS_20ExtractSubstringImplINS_13ExtractDomainILb0EEEEENS_10NameDomainEE32get_variadic_argument_types_implEv Line | Count | Source | 55 | 1 | DataTypes get_variadic_argument_types_impl() const override { | 56 | | if constexpr (has_variadic_argument) { | 57 | | return Impl::get_variadic_argument_types(); | 58 | | } | 59 | 1 | return {}; | 60 | 1 | } |
_ZNK5doris22FunctionStringToStringINS_20ExtractSubstringImplINS_13ExtractDomainILb1EEEEENS_20NameDomainWithoutWWWEE32get_variadic_argument_types_implEv Line | Count | Source | 55 | 1 | DataTypes get_variadic_argument_types_impl() const override { | 56 | | if constexpr (has_variadic_argument) { | 57 | | return Impl::get_variadic_argument_types(); | 58 | | } | 59 | 1 | return {}; | 60 | 1 | } |
_ZNK5doris22FunctionStringToStringINS_20ExtractSubstringImplINS_15ExtractProtocolEEENS_12NameProtocolEE32get_variadic_argument_types_implEv Line | Count | Source | 55 | 1 | DataTypes get_variadic_argument_types_impl() const override { | 56 | | if constexpr (has_variadic_argument) { | 57 | | return Impl::get_variadic_argument_types(); | 58 | | } | 59 | 1 | return {}; | 60 | 1 | } |
_ZNK5doris22FunctionStringToStringINS_20ExtractSubstringImplINS_21ExtractTopLevelDomainEEENS_18NameTopLevelDomainEE32get_variadic_argument_types_implEv Line | Count | Source | 55 | 1 | DataTypes get_variadic_argument_types_impl() const override { | 56 | | if constexpr (has_variadic_argument) { | 57 | | return Impl::get_variadic_argument_types(); | 58 | | } | 59 | 1 | return {}; | 60 | 1 | } |
_ZNK5doris22FunctionStringToStringINS_20ExtractSubstringImplINS_32ExtractFirstSignificantSubdomainEEENS_29NameFirstSignificantSubdomainEE32get_variadic_argument_types_implEv Line | Count | Source | 55 | 1 | DataTypes get_variadic_argument_types_impl() const override { | 56 | | if constexpr (has_variadic_argument) { | 57 | | return Impl::get_variadic_argument_types(); | 58 | | } | 59 | 1 | return {}; | 60 | 1 | } |
_ZNK5doris22FunctionStringToStringINS_20ExtractSubstringImplINS_30CutToFirstSignificantSubdomainEEENS_34NameCutToFirstSignificantSubdomainEE32get_variadic_argument_types_implEv Line | Count | Source | 55 | 1 | DataTypes get_variadic_argument_types_impl() const override { | 56 | | if constexpr (has_variadic_argument) { | 57 | | return Impl::get_variadic_argument_types(); | 58 | | } | 59 | 1 | return {}; | 60 | 1 | } |
|
61 | | |
62 | | Status execute_impl(FunctionContext* context, Block& block, const ColumnNumbers& arguments, |
63 | 105 | uint32_t result, size_t input_rows_count) const override { |
64 | 105 | const ColumnPtr column = block.get_by_position(arguments[0]).column; |
65 | 105 | if (const auto* col = check_and_get_column<ColumnString>(column.get())) { |
66 | 105 | auto col_res = ColumnString::create(); |
67 | 105 | RETURN_IF_ERROR(Impl::vector(col->get_chars(), col->get_offsets(), col_res->get_chars(), |
68 | 105 | col_res->get_offsets())); |
69 | 105 | block.replace_by_position(result, std::move(col_res)); |
70 | 105 | } else { |
71 | 0 | return Status::RuntimeError("Illegal column {} of argument of function {}", |
72 | 0 | block.get_by_position(arguments[0]).column->get_name(), |
73 | 0 | get_name()); |
74 | 0 | } |
75 | 105 | return Status::OK(); |
76 | 105 | } _ZNK5doris22FunctionStringToStringINS_13NameQuoteImplENS_9NameQuoteEE12execute_implEPNS_15FunctionContextERNS_5BlockERKSt6vectorIjSaIjEEjm Line | Count | Source | 63 | 12 | uint32_t result, size_t input_rows_count) const override { | 64 | 12 | const ColumnPtr column = block.get_by_position(arguments[0]).column; | 65 | 12 | if (const auto* col = check_and_get_column<ColumnString>(column.get())) { | 66 | 12 | auto col_res = ColumnString::create(); | 67 | 12 | RETURN_IF_ERROR(Impl::vector(col->get_chars(), col->get_offsets(), col_res->get_chars(), | 68 | 12 | col_res->get_offsets())); | 69 | 12 | block.replace_by_position(result, std::move(col_res)); | 70 | 12 | } else { | 71 | 0 | return Status::RuntimeError("Illegal column {} of argument of function {}", | 72 | 0 | block.get_by_position(arguments[0]).column->get_name(), | 73 | 0 | get_name()); | 74 | 0 | } | 75 | 12 | return Status::OK(); | 76 | 12 | } |
_ZNK5doris22FunctionStringToStringINS_12TransferImplINS_11NameToLowerEEES2_E12execute_implEPNS_15FunctionContextERNS_5BlockERKSt6vectorIjSaIjEEjm Line | Count | Source | 63 | 28 | uint32_t result, size_t input_rows_count) const override { | 64 | 28 | const ColumnPtr column = block.get_by_position(arguments[0]).column; | 65 | 28 | if (const auto* col = check_and_get_column<ColumnString>(column.get())) { | 66 | 28 | auto col_res = ColumnString::create(); | 67 | 28 | RETURN_IF_ERROR(Impl::vector(col->get_chars(), col->get_offsets(), col_res->get_chars(), | 68 | 28 | col_res->get_offsets())); | 69 | 28 | block.replace_by_position(result, std::move(col_res)); | 70 | 28 | } else { | 71 | 0 | return Status::RuntimeError("Illegal column {} of argument of function {}", | 72 | 0 | block.get_by_position(arguments[0]).column->get_name(), | 73 | 0 | get_name()); | 74 | 0 | } | 75 | 28 | return Status::OK(); | 76 | 28 | } |
_ZNK5doris22FunctionStringToStringINS_12TransferImplINS_11NameToUpperEEES2_E12execute_implEPNS_15FunctionContextERNS_5BlockERKSt6vectorIjSaIjEEjm Line | Count | Source | 63 | 54 | uint32_t result, size_t input_rows_count) const override { | 64 | 54 | const ColumnPtr column = block.get_by_position(arguments[0]).column; | 65 | 54 | if (const auto* col = check_and_get_column<ColumnString>(column.get())) { | 66 | 54 | auto col_res = ColumnString::create(); | 67 | 54 | RETURN_IF_ERROR(Impl::vector(col->get_chars(), col->get_offsets(), col_res->get_chars(), | 68 | 54 | col_res->get_offsets())); | 69 | 54 | block.replace_by_position(result, std::move(col_res)); | 70 | 54 | } else { | 71 | 0 | return Status::RuntimeError("Illegal column {} of argument of function {}", | 72 | 0 | block.get_by_position(arguments[0]).column->get_name(), | 73 | 0 | get_name()); | 74 | 0 | } | 75 | 54 | return Status::OK(); | 76 | 54 | } |
_ZNK5doris22FunctionStringToStringINS_11InitcapImplENS_13NameToInitcapEE12execute_implEPNS_15FunctionContextERNS_5BlockERKSt6vectorIjSaIjEEjm Line | Count | Source | 63 | 8 | uint32_t result, size_t input_rows_count) const override { | 64 | 8 | const ColumnPtr column = block.get_by_position(arguments[0]).column; | 65 | 8 | if (const auto* col = check_and_get_column<ColumnString>(column.get())) { | 66 | 8 | auto col_res = ColumnString::create(); | 67 | 8 | RETURN_IF_ERROR(Impl::vector(col->get_chars(), col->get_offsets(), col_res->get_chars(), | 68 | 8 | col_res->get_offsets())); | 69 | 8 | block.replace_by_position(result, std::move(col_res)); | 70 | 8 | } else { | 71 | 0 | return Status::RuntimeError("Illegal column {} of argument of function {}", | 72 | 0 | block.get_by_position(arguments[0]).column->get_name(), | 73 | 0 | get_name()); | 74 | 0 | } | 75 | 8 | return Status::OK(); | 76 | 8 | } |
_ZNK5doris22FunctionStringToStringINS_20ExtractSubstringImplINS_13ExtractDomainILb0EEEEENS_10NameDomainEE12execute_implEPNS_15FunctionContextERNS_5BlockERKSt6vectorIjSaIjEEjm Line | Count | Source | 63 | 1 | uint32_t result, size_t input_rows_count) const override { | 64 | 1 | const ColumnPtr column = block.get_by_position(arguments[0]).column; | 65 | 1 | if (const auto* col = check_and_get_column<ColumnString>(column.get())) { | 66 | 1 | auto col_res = ColumnString::create(); | 67 | 1 | RETURN_IF_ERROR(Impl::vector(col->get_chars(), col->get_offsets(), col_res->get_chars(), | 68 | 1 | col_res->get_offsets())); | 69 | 1 | block.replace_by_position(result, std::move(col_res)); | 70 | 1 | } else { | 71 | 0 | return Status::RuntimeError("Illegal column {} of argument of function {}", | 72 | 0 | block.get_by_position(arguments[0]).column->get_name(), | 73 | 0 | get_name()); | 74 | 0 | } | 75 | 1 | return Status::OK(); | 76 | 1 | } |
_ZNK5doris22FunctionStringToStringINS_20ExtractSubstringImplINS_13ExtractDomainILb1EEEEENS_20NameDomainWithoutWWWEE12execute_implEPNS_15FunctionContextERNS_5BlockERKSt6vectorIjSaIjEEjm Line | Count | Source | 63 | 1 | uint32_t result, size_t input_rows_count) const override { | 64 | 1 | const ColumnPtr column = block.get_by_position(arguments[0]).column; | 65 | 1 | if (const auto* col = check_and_get_column<ColumnString>(column.get())) { | 66 | 1 | auto col_res = ColumnString::create(); | 67 | 1 | RETURN_IF_ERROR(Impl::vector(col->get_chars(), col->get_offsets(), col_res->get_chars(), | 68 | 1 | col_res->get_offsets())); | 69 | 1 | block.replace_by_position(result, std::move(col_res)); | 70 | 1 | } else { | 71 | 0 | return Status::RuntimeError("Illegal column {} of argument of function {}", | 72 | 0 | block.get_by_position(arguments[0]).column->get_name(), | 73 | 0 | get_name()); | 74 | 0 | } | 75 | 1 | return Status::OK(); | 76 | 1 | } |
_ZNK5doris22FunctionStringToStringINS_20ExtractSubstringImplINS_15ExtractProtocolEEENS_12NameProtocolEE12execute_implEPNS_15FunctionContextERNS_5BlockERKSt6vectorIjSaIjEEjm Line | Count | Source | 63 | 1 | uint32_t result, size_t input_rows_count) const override { | 64 | 1 | const ColumnPtr column = block.get_by_position(arguments[0]).column; | 65 | 1 | if (const auto* col = check_and_get_column<ColumnString>(column.get())) { | 66 | 1 | auto col_res = ColumnString::create(); | 67 | 1 | RETURN_IF_ERROR(Impl::vector(col->get_chars(), col->get_offsets(), col_res->get_chars(), | 68 | 1 | col_res->get_offsets())); | 69 | 1 | block.replace_by_position(result, std::move(col_res)); | 70 | 1 | } else { | 71 | 0 | return Status::RuntimeError("Illegal column {} of argument of function {}", | 72 | 0 | block.get_by_position(arguments[0]).column->get_name(), | 73 | 0 | get_name()); | 74 | 0 | } | 75 | 1 | return Status::OK(); | 76 | 1 | } |
Unexecuted instantiation: _ZNK5doris22FunctionStringToStringINS_20ExtractSubstringImplINS_21ExtractTopLevelDomainEEENS_18NameTopLevelDomainEE12execute_implEPNS_15FunctionContextERNS_5BlockERKSt6vectorIjSaIjEEjm Unexecuted instantiation: _ZNK5doris22FunctionStringToStringINS_20ExtractSubstringImplINS_32ExtractFirstSignificantSubdomainEEENS_29NameFirstSignificantSubdomainEE12execute_implEPNS_15FunctionContextERNS_5BlockERKSt6vectorIjSaIjEEjm Unexecuted instantiation: _ZNK5doris22FunctionStringToStringINS_20ExtractSubstringImplINS_30CutToFirstSignificantSubdomainEEENS_34NameCutToFirstSignificantSubdomainEE12execute_implEPNS_15FunctionContextERNS_5BlockERKSt6vectorIjSaIjEEjm |
77 | | }; |
78 | | |
79 | | } // namespace doris |