Coverage Report

Created: 2026-06-11 15:14

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
be/src/exprs/function/ip_address_dictionary.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
// This file is copied from
18
// https://github.com/ClickHouse/ClickHouse/blob/master/src/Dictionaries/IPAddressDictionary.cpp
19
// and modified by Doris
20
21
#include "exprs/function/ip_address_dictionary.h"
22
23
#include <algorithm>
24
#include <ranges>
25
#include <vector>
26
27
#include "common/exception.h"
28
#include "common/status.h"
29
#include "core/assert_cast.h"
30
#include "core/column/column.h"
31
#include "core/column/column_string.h"
32
#include "core/data_type/data_type_decimal.h"
33
#include "core/data_type/data_type_nullable.h"
34
#include "core/data_type/data_type_number.h" // IWYU pragma: keep
35
#include "core/types.h"
36
#include "core/value/ip_address_cidr.h"
37
#include "core/value/ipv4_value.h"
38
#include "exec/common/template_helpers.hpp"
39
#include "exprs/function/dictionary.h"
40
41
namespace doris {
42
43
21
IPAddressDictionary::~IPAddressDictionary() {
44
21
    if (_mem_tracker) {
45
10
        std::vector<IPv6> {}.swap(ip_column);
46
10
        std::vector<UInt8> {}.swap(prefix_column);
47
10
        std::vector<size_t> {}.swap(origin_row_idx_column);
48
10
        std::vector<size_t> {}.swap(parent_subnet);
49
10
    }
50
21
}
51
52
1.48k
size_t IPAddressDictionary::allocated_bytes() const {
53
5.95k
    auto vec_mem = [](const auto& vec) {
54
5.95k
        return vec.capacity() * sizeof(typename std::decay_t<decltype(vec)>::value_type);
55
5.95k
    };
ip_address_dictionary.cpp:_ZZNK5doris19IPAddressDictionary15allocated_bytesEvENK3$_0clISt6vectorIoSaIoEEEEDaRKT_
Line
Count
Source
53
1.48k
    auto vec_mem = [](const auto& vec) {
54
1.48k
        return vec.capacity() * sizeof(typename std::decay_t<decltype(vec)>::value_type);
55
1.48k
    };
ip_address_dictionary.cpp:_ZZNK5doris19IPAddressDictionary15allocated_bytesEvENK3$_0clISt6vectorIhSaIhEEEEDaRKT_
Line
Count
Source
53
1.48k
    auto vec_mem = [](const auto& vec) {
54
1.48k
        return vec.capacity() * sizeof(typename std::decay_t<decltype(vec)>::value_type);
55
1.48k
    };
ip_address_dictionary.cpp:_ZZNK5doris19IPAddressDictionary15allocated_bytesEvENK3$_0clISt6vectorImSaImEEEEDaRKT_
Line
Count
Source
53
2.97k
    auto vec_mem = [](const auto& vec) {
54
2.97k
        return vec.capacity() * sizeof(typename std::decay_t<decltype(vec)>::value_type);
55
2.97k
    };
56
1.48k
    return IDictionary::allocated_bytes() + vec_mem(ip_column) + vec_mem(prefix_column) +
57
1.48k
           vec_mem(origin_row_idx_column) + vec_mem(parent_subnet);
58
1.48k
}
59
60
ColumnPtr IPAddressDictionary::get_column(const std::string& attribute_name,
61
                                          const DataTypePtr& attribute_type,
62
                                          const ColumnPtr& key_column,
63
19
                                          const DataTypePtr& key_type) const {
64
19
    if (have_nullable({attribute_type}) || have_nullable({key_type})) {
65
0
        throw doris::Exception(
66
0
                ErrorCode::INTERNAL_ERROR,
67
0
                "IPAddressDictionary get_column attribute_type or key_type must not nullable type");
68
0
    }
69
19
    if (key_type->get_primitive_type() != TYPE_IPV4 &&
70
19
        key_type->get_primitive_type() != TYPE_IPV6) {
71
0
        throw doris::Exception(
72
0
                ErrorCode::INTERNAL_ERROR,
73
0
                "IPAddressDictionary only support ip type key , input key type is {} ",
74
0
                key_type->get_name());
75
0
    }
76
77
19
    const auto rows = key_column->size();
78
19
    MutableColumnPtr res_column = attribute_type->create_column();
79
19
    ColumnUInt8::MutablePtr res_null = ColumnUInt8::create(rows, false);
80
19
    auto& res_null_map = res_null->get_data();
81
19
    const auto& value_data = _values_data[attribute_index(attribute_name)];
82
83
19
    if (key_type->get_primitive_type() == TYPE_IPV6) {
84
        // input key column without nullable
85
4
        const auto* ipv6_column = assert_cast<const ColumnIPv6*>(remove_nullable(key_column).get());
86
        // if input key column is nullable, will not be null
87
4
        const auto* null_key = check_and_get_column<ColumnNullable>(key_column.get());
88
4
        std::visit(
89
4
                [&](auto&& arg, auto key_is_nullable, auto value_is_nullable) {
90
4
                    using ValueDataType = std::decay_t<decltype(arg)>;
91
4
                    using OutputColumnType = ValueDataType::OutputColumnType;
92
4
                    auto* res_real_column = assert_cast<OutputColumnType*>(res_column.get());
93
4
                    const auto* value_column = arg.get();
94
4
                    const auto* value_null_map = arg.get_null_map();
95
27
                    for (size_t i = 0; i < rows; i++) {
96
22
                        if constexpr (key_is_nullable) {
97
4
                            if (null_key->is_null_at(i)) {
98
                                // if input key is null, set the result column to null
99
1
                                res_real_column->insert_default();
100
1
                                res_null_map[i] = true;
101
1
                                continue;
102
1
                            }
103
4
                        }
104
3
                        auto it = look_up_IP(ipv6_column->get_element(i));
105
22
                        if (it == ip_not_found()) {
106
                            // if input key is not found, set the result column to null
107
2
                            res_real_column->insert_default();
108
2
                            res_null_map[i] = true;
109
20
                        } else {
110
20
                            const auto idx = *it;
111
20
                            set_value_data<value_is_nullable>(res_real_column, res_null_map[i],
112
20
                                                              value_column, value_null_map, idx);
113
20
                        }
114
22
                    }
115
4
                },
Unexecuted instantiation: ip_address_dictionary.cpp:_ZZNK5doris19IPAddressDictionary10get_columnERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt10shared_ptrIKNS_9IDataTypeEERKNS_3COWINS_7IColumnEE13immutable_ptrISG_EESE_ENK3$_0clIRKNS_11IDictionary14ColumnWithTypeINS_14DataTypeNumberILNS_13PrimitiveTypeE2EEEEESt17integral_constantIbLb0EESX_EEDaOT_T0_T1_
Unexecuted instantiation: ip_address_dictionary.cpp:_ZZNK5doris19IPAddressDictionary10get_columnERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt10shared_ptrIKNS_9IDataTypeEERKNS_3COWINS_7IColumnEE13immutable_ptrISG_EESE_ENK3$_0clIRKNS_11IDictionary14ColumnWithTypeINS_14DataTypeNumberILNS_13PrimitiveTypeE2EEEEESt17integral_constantIbLb0EESW_IbLb1EEEEDaOT_T0_T1_
Unexecuted instantiation: ip_address_dictionary.cpp:_ZZNK5doris19IPAddressDictionary10get_columnERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt10shared_ptrIKNS_9IDataTypeEERKNS_3COWINS_7IColumnEE13immutable_ptrISG_EESE_ENK3$_0clIRKNS_11IDictionary14ColumnWithTypeINS_14DataTypeNumberILNS_13PrimitiveTypeE2EEEEESt17integral_constantIbLb1EESW_IbLb0EEEEDaOT_T0_T1_
Unexecuted instantiation: ip_address_dictionary.cpp:_ZZNK5doris19IPAddressDictionary10get_columnERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt10shared_ptrIKNS_9IDataTypeEERKNS_3COWINS_7IColumnEE13immutable_ptrISG_EESE_ENK3$_0clIRKNS_11IDictionary14ColumnWithTypeINS_14DataTypeNumberILNS_13PrimitiveTypeE2EEEEESt17integral_constantIbLb1EESX_EEDaOT_T0_T1_
Unexecuted instantiation: ip_address_dictionary.cpp:_ZZNK5doris19IPAddressDictionary10get_columnERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt10shared_ptrIKNS_9IDataTypeEERKNS_3COWINS_7IColumnEE13immutable_ptrISG_EESE_ENK3$_0clIRKNS_11IDictionary14ColumnWithTypeINS_14DataTypeNumberILNS_13PrimitiveTypeE3EEEEESt17integral_constantIbLb0EESX_EEDaOT_T0_T1_
Unexecuted instantiation: ip_address_dictionary.cpp:_ZZNK5doris19IPAddressDictionary10get_columnERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt10shared_ptrIKNS_9IDataTypeEERKNS_3COWINS_7IColumnEE13immutable_ptrISG_EESE_ENK3$_0clIRKNS_11IDictionary14ColumnWithTypeINS_14DataTypeNumberILNS_13PrimitiveTypeE3EEEEESt17integral_constantIbLb0EESW_IbLb1EEEEDaOT_T0_T1_
Unexecuted instantiation: ip_address_dictionary.cpp:_ZZNK5doris19IPAddressDictionary10get_columnERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt10shared_ptrIKNS_9IDataTypeEERKNS_3COWINS_7IColumnEE13immutable_ptrISG_EESE_ENK3$_0clIRKNS_11IDictionary14ColumnWithTypeINS_14DataTypeNumberILNS_13PrimitiveTypeE3EEEEESt17integral_constantIbLb1EESW_IbLb0EEEEDaOT_T0_T1_
Unexecuted instantiation: ip_address_dictionary.cpp:_ZZNK5doris19IPAddressDictionary10get_columnERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt10shared_ptrIKNS_9IDataTypeEERKNS_3COWINS_7IColumnEE13immutable_ptrISG_EESE_ENK3$_0clIRKNS_11IDictionary14ColumnWithTypeINS_14DataTypeNumberILNS_13PrimitiveTypeE3EEEEESt17integral_constantIbLb1EESX_EEDaOT_T0_T1_
Unexecuted instantiation: ip_address_dictionary.cpp:_ZZNK5doris19IPAddressDictionary10get_columnERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt10shared_ptrIKNS_9IDataTypeEERKNS_3COWINS_7IColumnEE13immutable_ptrISG_EESE_ENK3$_0clIRKNS_11IDictionary14ColumnWithTypeINS_14DataTypeNumberILNS_13PrimitiveTypeE4EEEEESt17integral_constantIbLb0EESX_EEDaOT_T0_T1_
Unexecuted instantiation: ip_address_dictionary.cpp:_ZZNK5doris19IPAddressDictionary10get_columnERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt10shared_ptrIKNS_9IDataTypeEERKNS_3COWINS_7IColumnEE13immutable_ptrISG_EESE_ENK3$_0clIRKNS_11IDictionary14ColumnWithTypeINS_14DataTypeNumberILNS_13PrimitiveTypeE4EEEEESt17integral_constantIbLb0EESW_IbLb1EEEEDaOT_T0_T1_
Unexecuted instantiation: ip_address_dictionary.cpp:_ZZNK5doris19IPAddressDictionary10get_columnERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt10shared_ptrIKNS_9IDataTypeEERKNS_3COWINS_7IColumnEE13immutable_ptrISG_EESE_ENK3$_0clIRKNS_11IDictionary14ColumnWithTypeINS_14DataTypeNumberILNS_13PrimitiveTypeE4EEEEESt17integral_constantIbLb1EESW_IbLb0EEEEDaOT_T0_T1_
Unexecuted instantiation: ip_address_dictionary.cpp:_ZZNK5doris19IPAddressDictionary10get_columnERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt10shared_ptrIKNS_9IDataTypeEERKNS_3COWINS_7IColumnEE13immutable_ptrISG_EESE_ENK3$_0clIRKNS_11IDictionary14ColumnWithTypeINS_14DataTypeNumberILNS_13PrimitiveTypeE4EEEEESt17integral_constantIbLb1EESX_EEDaOT_T0_T1_
Unexecuted instantiation: ip_address_dictionary.cpp:_ZZNK5doris19IPAddressDictionary10get_columnERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt10shared_ptrIKNS_9IDataTypeEERKNS_3COWINS_7IColumnEE13immutable_ptrISG_EESE_ENK3$_0clIRKNS_11IDictionary14ColumnWithTypeINS_14DataTypeNumberILNS_13PrimitiveTypeE5EEEEESt17integral_constantIbLb0EESX_EEDaOT_T0_T1_
ip_address_dictionary.cpp:_ZZNK5doris19IPAddressDictionary10get_columnERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt10shared_ptrIKNS_9IDataTypeEERKNS_3COWINS_7IColumnEE13immutable_ptrISG_EESE_ENK3$_0clIRKNS_11IDictionary14ColumnWithTypeINS_14DataTypeNumberILNS_13PrimitiveTypeE5EEEEESt17integral_constantIbLb0EESW_IbLb1EEEEDaOT_T0_T1_
Line
Count
Source
89
1
                [&](auto&& arg, auto key_is_nullable, auto value_is_nullable) {
90
1
                    using ValueDataType = std::decay_t<decltype(arg)>;
91
1
                    using OutputColumnType = ValueDataType::OutputColumnType;
92
1
                    auto* res_real_column = assert_cast<OutputColumnType*>(res_column.get());
93
1
                    const auto* value_column = arg.get();
94
1
                    const auto* value_null_map = arg.get_null_map();
95
4
                    for (size_t i = 0; i < rows; i++) {
96
                        if constexpr (key_is_nullable) {
97
                            if (null_key->is_null_at(i)) {
98
                                // if input key is null, set the result column to null
99
                                res_real_column->insert_default();
100
                                res_null_map[i] = true;
101
                                continue;
102
                            }
103
                        }
104
3
                        auto it = look_up_IP(ipv6_column->get_element(i));
105
3
                        if (it == ip_not_found()) {
106
                            // if input key is not found, set the result column to null
107
1
                            res_real_column->insert_default();
108
1
                            res_null_map[i] = true;
109
2
                        } else {
110
2
                            const auto idx = *it;
111
2
                            set_value_data<value_is_nullable>(res_real_column, res_null_map[i],
112
2
                                                              value_column, value_null_map, idx);
113
2
                        }
114
3
                    }
115
1
                },
Unexecuted instantiation: ip_address_dictionary.cpp:_ZZNK5doris19IPAddressDictionary10get_columnERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt10shared_ptrIKNS_9IDataTypeEERKNS_3COWINS_7IColumnEE13immutable_ptrISG_EESE_ENK3$_0clIRKNS_11IDictionary14ColumnWithTypeINS_14DataTypeNumberILNS_13PrimitiveTypeE5EEEEESt17integral_constantIbLb1EESW_IbLb0EEEEDaOT_T0_T1_
ip_address_dictionary.cpp:_ZZNK5doris19IPAddressDictionary10get_columnERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt10shared_ptrIKNS_9IDataTypeEERKNS_3COWINS_7IColumnEE13immutable_ptrISG_EESE_ENK3$_0clIRKNS_11IDictionary14ColumnWithTypeINS_14DataTypeNumberILNS_13PrimitiveTypeE5EEEEESt17integral_constantIbLb1EESX_EEDaOT_T0_T1_
Line
Count
Source
89
1
                [&](auto&& arg, auto key_is_nullable, auto value_is_nullable) {
90
1
                    using ValueDataType = std::decay_t<decltype(arg)>;
91
1
                    using OutputColumnType = ValueDataType::OutputColumnType;
92
1
                    auto* res_real_column = assert_cast<OutputColumnType*>(res_column.get());
93
1
                    const auto* value_column = arg.get();
94
1
                    const auto* value_null_map = arg.get_null_map();
95
6
                    for (size_t i = 0; i < rows; i++) {
96
4
                        if constexpr (key_is_nullable) {
97
4
                            if (null_key->is_null_at(i)) {
98
                                // if input key is null, set the result column to null
99
1
                                res_real_column->insert_default();
100
1
                                res_null_map[i] = true;
101
1
                                continue;
102
1
                            }
103
4
                        }
104
3
                        auto it = look_up_IP(ipv6_column->get_element(i));
105
4
                        if (it == ip_not_found()) {
106
                            // if input key is not found, set the result column to null
107
1
                            res_real_column->insert_default();
108
1
                            res_null_map[i] = true;
109
3
                        } else {
110
3
                            const auto idx = *it;
111
3
                            set_value_data<value_is_nullable>(res_real_column, res_null_map[i],
112
3
                                                              value_column, value_null_map, idx);
113
3
                        }
114
4
                    }
115
1
                },
ip_address_dictionary.cpp:_ZZNK5doris19IPAddressDictionary10get_columnERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt10shared_ptrIKNS_9IDataTypeEERKNS_3COWINS_7IColumnEE13immutable_ptrISG_EESE_ENK3$_0clIRKNS_11IDictionary14ColumnWithTypeINS_14DataTypeNumberILNS_13PrimitiveTypeE6EEEEESt17integral_constantIbLb0EESX_EEDaOT_T0_T1_
Line
Count
Source
89
1
                [&](auto&& arg, auto key_is_nullable, auto value_is_nullable) {
90
1
                    using ValueDataType = std::decay_t<decltype(arg)>;
91
1
                    using OutputColumnType = ValueDataType::OutputColumnType;
92
1
                    auto* res_real_column = assert_cast<OutputColumnType*>(res_column.get());
93
1
                    const auto* value_column = arg.get();
94
1
                    const auto* value_null_map = arg.get_null_map();
95
15
                    for (size_t i = 0; i < rows; i++) {
96
                        if constexpr (key_is_nullable) {
97
                            if (null_key->is_null_at(i)) {
98
                                // if input key is null, set the result column to null
99
                                res_real_column->insert_default();
100
                                res_null_map[i] = true;
101
                                continue;
102
                            }
103
                        }
104
14
                        auto it = look_up_IP(ipv6_column->get_element(i));
105
14
                        if (it == ip_not_found()) {
106
                            // if input key is not found, set the result column to null
107
0
                            res_real_column->insert_default();
108
0
                            res_null_map[i] = true;
109
14
                        } else {
110
14
                            const auto idx = *it;
111
14
                            set_value_data<value_is_nullable>(res_real_column, res_null_map[i],
112
14
                                                              value_column, value_null_map, idx);
113
14
                        }
114
14
                    }
115
1
                },
Unexecuted instantiation: ip_address_dictionary.cpp:_ZZNK5doris19IPAddressDictionary10get_columnERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt10shared_ptrIKNS_9IDataTypeEERKNS_3COWINS_7IColumnEE13immutable_ptrISG_EESE_ENK3$_0clIRKNS_11IDictionary14ColumnWithTypeINS_14DataTypeNumberILNS_13PrimitiveTypeE6EEEEESt17integral_constantIbLb0EESW_IbLb1EEEEDaOT_T0_T1_
Unexecuted instantiation: ip_address_dictionary.cpp:_ZZNK5doris19IPAddressDictionary10get_columnERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt10shared_ptrIKNS_9IDataTypeEERKNS_3COWINS_7IColumnEE13immutable_ptrISG_EESE_ENK3$_0clIRKNS_11IDictionary14ColumnWithTypeINS_14DataTypeNumberILNS_13PrimitiveTypeE6EEEEESt17integral_constantIbLb1EESW_IbLb0EEEEDaOT_T0_T1_
Unexecuted instantiation: ip_address_dictionary.cpp:_ZZNK5doris19IPAddressDictionary10get_columnERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt10shared_ptrIKNS_9IDataTypeEERKNS_3COWINS_7IColumnEE13immutable_ptrISG_EESE_ENK3$_0clIRKNS_11IDictionary14ColumnWithTypeINS_14DataTypeNumberILNS_13PrimitiveTypeE6EEEEESt17integral_constantIbLb1EESX_EEDaOT_T0_T1_
Unexecuted instantiation: ip_address_dictionary.cpp:_ZZNK5doris19IPAddressDictionary10get_columnERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt10shared_ptrIKNS_9IDataTypeEERKNS_3COWINS_7IColumnEE13immutable_ptrISG_EESE_ENK3$_0clIRKNS_11IDictionary14ColumnWithTypeINS_14DataTypeNumberILNS_13PrimitiveTypeE7EEEEESt17integral_constantIbLb0EESX_EEDaOT_T0_T1_
Unexecuted instantiation: ip_address_dictionary.cpp:_ZZNK5doris19IPAddressDictionary10get_columnERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt10shared_ptrIKNS_9IDataTypeEERKNS_3COWINS_7IColumnEE13immutable_ptrISG_EESE_ENK3$_0clIRKNS_11IDictionary14ColumnWithTypeINS_14DataTypeNumberILNS_13PrimitiveTypeE7EEEEESt17integral_constantIbLb0EESW_IbLb1EEEEDaOT_T0_T1_
Unexecuted instantiation: ip_address_dictionary.cpp:_ZZNK5doris19IPAddressDictionary10get_columnERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt10shared_ptrIKNS_9IDataTypeEERKNS_3COWINS_7IColumnEE13immutable_ptrISG_EESE_ENK3$_0clIRKNS_11IDictionary14ColumnWithTypeINS_14DataTypeNumberILNS_13PrimitiveTypeE7EEEEESt17integral_constantIbLb1EESW_IbLb0EEEEDaOT_T0_T1_
Unexecuted instantiation: ip_address_dictionary.cpp:_ZZNK5doris19IPAddressDictionary10get_columnERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt10shared_ptrIKNS_9IDataTypeEERKNS_3COWINS_7IColumnEE13immutable_ptrISG_EESE_ENK3$_0clIRKNS_11IDictionary14ColumnWithTypeINS_14DataTypeNumberILNS_13PrimitiveTypeE7EEEEESt17integral_constantIbLb1EESX_EEDaOT_T0_T1_
Unexecuted instantiation: ip_address_dictionary.cpp:_ZZNK5doris19IPAddressDictionary10get_columnERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt10shared_ptrIKNS_9IDataTypeEERKNS_3COWINS_7IColumnEE13immutable_ptrISG_EESE_ENK3$_0clIRKNS_11IDictionary14ColumnWithTypeINS_14DataTypeNumberILNS_13PrimitiveTypeE8EEEEESt17integral_constantIbLb0EESX_EEDaOT_T0_T1_
Unexecuted instantiation: ip_address_dictionary.cpp:_ZZNK5doris19IPAddressDictionary10get_columnERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt10shared_ptrIKNS_9IDataTypeEERKNS_3COWINS_7IColumnEE13immutable_ptrISG_EESE_ENK3$_0clIRKNS_11IDictionary14ColumnWithTypeINS_14DataTypeNumberILNS_13PrimitiveTypeE8EEEEESt17integral_constantIbLb0EESW_IbLb1EEEEDaOT_T0_T1_
Unexecuted instantiation: ip_address_dictionary.cpp:_ZZNK5doris19IPAddressDictionary10get_columnERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt10shared_ptrIKNS_9IDataTypeEERKNS_3COWINS_7IColumnEE13immutable_ptrISG_EESE_ENK3$_0clIRKNS_11IDictionary14ColumnWithTypeINS_14DataTypeNumberILNS_13PrimitiveTypeE8EEEEESt17integral_constantIbLb1EESW_IbLb0EEEEDaOT_T0_T1_
Unexecuted instantiation: ip_address_dictionary.cpp:_ZZNK5doris19IPAddressDictionary10get_columnERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt10shared_ptrIKNS_9IDataTypeEERKNS_3COWINS_7IColumnEE13immutable_ptrISG_EESE_ENK3$_0clIRKNS_11IDictionary14ColumnWithTypeINS_14DataTypeNumberILNS_13PrimitiveTypeE8EEEEESt17integral_constantIbLb1EESX_EEDaOT_T0_T1_
Unexecuted instantiation: ip_address_dictionary.cpp:_ZZNK5doris19IPAddressDictionary10get_columnERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt10shared_ptrIKNS_9IDataTypeEERKNS_3COWINS_7IColumnEE13immutable_ptrISG_EESE_ENK3$_0clIRKNS_11IDictionary14ColumnWithTypeINS_14DataTypeNumberILNS_13PrimitiveTypeE9EEEEESt17integral_constantIbLb0EESX_EEDaOT_T0_T1_
Unexecuted instantiation: ip_address_dictionary.cpp:_ZZNK5doris19IPAddressDictionary10get_columnERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt10shared_ptrIKNS_9IDataTypeEERKNS_3COWINS_7IColumnEE13immutable_ptrISG_EESE_ENK3$_0clIRKNS_11IDictionary14ColumnWithTypeINS_14DataTypeNumberILNS_13PrimitiveTypeE9EEEEESt17integral_constantIbLb0EESW_IbLb1EEEEDaOT_T0_T1_
Unexecuted instantiation: ip_address_dictionary.cpp:_ZZNK5doris19IPAddressDictionary10get_columnERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt10shared_ptrIKNS_9IDataTypeEERKNS_3COWINS_7IColumnEE13immutable_ptrISG_EESE_ENK3$_0clIRKNS_11IDictionary14ColumnWithTypeINS_14DataTypeNumberILNS_13PrimitiveTypeE9EEEEESt17integral_constantIbLb1EESW_IbLb0EEEEDaOT_T0_T1_
Unexecuted instantiation: ip_address_dictionary.cpp:_ZZNK5doris19IPAddressDictionary10get_columnERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt10shared_ptrIKNS_9IDataTypeEERKNS_3COWINS_7IColumnEE13immutable_ptrISG_EESE_ENK3$_0clIRKNS_11IDictionary14ColumnWithTypeINS_14DataTypeNumberILNS_13PrimitiveTypeE9EEEEESt17integral_constantIbLb1EESX_EEDaOT_T0_T1_
Unexecuted instantiation: ip_address_dictionary.cpp:_ZZNK5doris19IPAddressDictionary10get_columnERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt10shared_ptrIKNS_9IDataTypeEERKNS_3COWINS_7IColumnEE13immutable_ptrISG_EESE_ENK3$_0clIRKNS_11IDictionary14ColumnWithTypeINS_12DataTypeIPv4EEESt17integral_constantIbLb0EESV_EEDaOT_T0_T1_
Unexecuted instantiation: ip_address_dictionary.cpp:_ZZNK5doris19IPAddressDictionary10get_columnERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt10shared_ptrIKNS_9IDataTypeEERKNS_3COWINS_7IColumnEE13immutable_ptrISG_EESE_ENK3$_0clIRKNS_11IDictionary14ColumnWithTypeINS_12DataTypeIPv4EEESt17integral_constantIbLb0EESU_IbLb1EEEEDaOT_T0_T1_
Unexecuted instantiation: ip_address_dictionary.cpp:_ZZNK5doris19IPAddressDictionary10get_columnERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt10shared_ptrIKNS_9IDataTypeEERKNS_3COWINS_7IColumnEE13immutable_ptrISG_EESE_ENK3$_0clIRKNS_11IDictionary14ColumnWithTypeINS_12DataTypeIPv4EEESt17integral_constantIbLb1EESU_IbLb0EEEEDaOT_T0_T1_
Unexecuted instantiation: ip_address_dictionary.cpp:_ZZNK5doris19IPAddressDictionary10get_columnERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt10shared_ptrIKNS_9IDataTypeEERKNS_3COWINS_7IColumnEE13immutable_ptrISG_EESE_ENK3$_0clIRKNS_11IDictionary14ColumnWithTypeINS_12DataTypeIPv4EEESt17integral_constantIbLb1EESV_EEDaOT_T0_T1_
Unexecuted instantiation: ip_address_dictionary.cpp:_ZZNK5doris19IPAddressDictionary10get_columnERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt10shared_ptrIKNS_9IDataTypeEERKNS_3COWINS_7IColumnEE13immutable_ptrISG_EESE_ENK3$_0clIRKNS_11IDictionary14ColumnWithTypeINS_12DataTypeIPv6EEESt17integral_constantIbLb0EESV_EEDaOT_T0_T1_
Unexecuted instantiation: ip_address_dictionary.cpp:_ZZNK5doris19IPAddressDictionary10get_columnERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt10shared_ptrIKNS_9IDataTypeEERKNS_3COWINS_7IColumnEE13immutable_ptrISG_EESE_ENK3$_0clIRKNS_11IDictionary14ColumnWithTypeINS_12DataTypeIPv6EEESt17integral_constantIbLb0EESU_IbLb1EEEEDaOT_T0_T1_
Unexecuted instantiation: ip_address_dictionary.cpp:_ZZNK5doris19IPAddressDictionary10get_columnERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt10shared_ptrIKNS_9IDataTypeEERKNS_3COWINS_7IColumnEE13immutable_ptrISG_EESE_ENK3$_0clIRKNS_11IDictionary14ColumnWithTypeINS_12DataTypeIPv6EEESt17integral_constantIbLb1EESU_IbLb0EEEEDaOT_T0_T1_
Unexecuted instantiation: ip_address_dictionary.cpp:_ZZNK5doris19IPAddressDictionary10get_columnERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt10shared_ptrIKNS_9IDataTypeEERKNS_3COWINS_7IColumnEE13immutable_ptrISG_EESE_ENK3$_0clIRKNS_11IDictionary14ColumnWithTypeINS_12DataTypeIPv6EEESt17integral_constantIbLb1EESV_EEDaOT_T0_T1_
ip_address_dictionary.cpp:_ZZNK5doris19IPAddressDictionary10get_columnERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt10shared_ptrIKNS_9IDataTypeEERKNS_3COWINS_7IColumnEE13immutable_ptrISG_EESE_ENK3$_0clIRKNS_11IDictionary14ColumnWithTypeINS_14DataTypeStringEEESt17integral_constantIbLb0EESV_EEDaOT_T0_T1_
Line
Count
Source
89
1
                [&](auto&& arg, auto key_is_nullable, auto value_is_nullable) {
90
1
                    using ValueDataType = std::decay_t<decltype(arg)>;
91
1
                    using OutputColumnType = ValueDataType::OutputColumnType;
92
1
                    auto* res_real_column = assert_cast<OutputColumnType*>(res_column.get());
93
1
                    const auto* value_column = arg.get();
94
1
                    const auto* value_null_map = arg.get_null_map();
95
2
                    for (size_t i = 0; i < rows; i++) {
96
                        if constexpr (key_is_nullable) {
97
                            if (null_key->is_null_at(i)) {
98
                                // if input key is null, set the result column to null
99
                                res_real_column->insert_default();
100
                                res_null_map[i] = true;
101
                                continue;
102
                            }
103
                        }
104
1
                        auto it = look_up_IP(ipv6_column->get_element(i));
105
1
                        if (it == ip_not_found()) {
106
                            // if input key is not found, set the result column to null
107
0
                            res_real_column->insert_default();
108
0
                            res_null_map[i] = true;
109
1
                        } else {
110
1
                            const auto idx = *it;
111
1
                            set_value_data<value_is_nullable>(res_real_column, res_null_map[i],
112
1
                                                              value_column, value_null_map, idx);
113
1
                        }
114
1
                    }
115
1
                },
Unexecuted instantiation: ip_address_dictionary.cpp:_ZZNK5doris19IPAddressDictionary10get_columnERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt10shared_ptrIKNS_9IDataTypeEERKNS_3COWINS_7IColumnEE13immutable_ptrISG_EESE_ENK3$_0clIRKNS_11IDictionary14ColumnWithTypeINS_14DataTypeStringEEESt17integral_constantIbLb0EESU_IbLb1EEEEDaOT_T0_T1_
Unexecuted instantiation: ip_address_dictionary.cpp:_ZZNK5doris19IPAddressDictionary10get_columnERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt10shared_ptrIKNS_9IDataTypeEERKNS_3COWINS_7IColumnEE13immutable_ptrISG_EESE_ENK3$_0clIRKNS_11IDictionary14ColumnWithTypeINS_14DataTypeStringEEESt17integral_constantIbLb1EESU_IbLb0EEEEDaOT_T0_T1_
Unexecuted instantiation: ip_address_dictionary.cpp:_ZZNK5doris19IPAddressDictionary10get_columnERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt10shared_ptrIKNS_9IDataTypeEERKNS_3COWINS_7IColumnEE13immutable_ptrISG_EESE_ENK3$_0clIRKNS_11IDictionary14ColumnWithTypeINS_14DataTypeStringEEESt17integral_constantIbLb1EESV_EEDaOT_T0_T1_
Unexecuted instantiation: ip_address_dictionary.cpp:_ZZNK5doris19IPAddressDictionary10get_columnERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt10shared_ptrIKNS_9IDataTypeEERKNS_3COWINS_7IColumnEE13immutable_ptrISG_EESE_ENK3$_0clIRKNS_11IDictionary14ColumnWithTypeINSO_20DictDataTypeString64EEESt17integral_constantIbLb0EESV_EEDaOT_T0_T1_
Unexecuted instantiation: ip_address_dictionary.cpp:_ZZNK5doris19IPAddressDictionary10get_columnERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt10shared_ptrIKNS_9IDataTypeEERKNS_3COWINS_7IColumnEE13immutable_ptrISG_EESE_ENK3$_0clIRKNS_11IDictionary14ColumnWithTypeINSO_20DictDataTypeString64EEESt17integral_constantIbLb0EESU_IbLb1EEEEDaOT_T0_T1_
Unexecuted instantiation: ip_address_dictionary.cpp:_ZZNK5doris19IPAddressDictionary10get_columnERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt10shared_ptrIKNS_9IDataTypeEERKNS_3COWINS_7IColumnEE13immutable_ptrISG_EESE_ENK3$_0clIRKNS_11IDictionary14ColumnWithTypeINSO_20DictDataTypeString64EEESt17integral_constantIbLb1EESU_IbLb0EEEEDaOT_T0_T1_
Unexecuted instantiation: ip_address_dictionary.cpp:_ZZNK5doris19IPAddressDictionary10get_columnERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt10shared_ptrIKNS_9IDataTypeEERKNS_3COWINS_7IColumnEE13immutable_ptrISG_EESE_ENK3$_0clIRKNS_11IDictionary14ColumnWithTypeINSO_20DictDataTypeString64EEESt17integral_constantIbLb1EESV_EEDaOT_T0_T1_
Unexecuted instantiation: ip_address_dictionary.cpp:_ZZNK5doris19IPAddressDictionary10get_columnERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt10shared_ptrIKNS_9IDataTypeEERKNS_3COWINS_7IColumnEE13immutable_ptrISG_EESE_ENK3$_0clIRKNS_11IDictionary14ColumnWithTypeINS_14DataTypeDateV2EEESt17integral_constantIbLb0EESV_EEDaOT_T0_T1_
Unexecuted instantiation: ip_address_dictionary.cpp:_ZZNK5doris19IPAddressDictionary10get_columnERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt10shared_ptrIKNS_9IDataTypeEERKNS_3COWINS_7IColumnEE13immutable_ptrISG_EESE_ENK3$_0clIRKNS_11IDictionary14ColumnWithTypeINS_14DataTypeDateV2EEESt17integral_constantIbLb0EESU_IbLb1EEEEDaOT_T0_T1_
Unexecuted instantiation: ip_address_dictionary.cpp:_ZZNK5doris19IPAddressDictionary10get_columnERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt10shared_ptrIKNS_9IDataTypeEERKNS_3COWINS_7IColumnEE13immutable_ptrISG_EESE_ENK3$_0clIRKNS_11IDictionary14ColumnWithTypeINS_14DataTypeDateV2EEESt17integral_constantIbLb1EESU_IbLb0EEEEDaOT_T0_T1_
Unexecuted instantiation: ip_address_dictionary.cpp:_ZZNK5doris19IPAddressDictionary10get_columnERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt10shared_ptrIKNS_9IDataTypeEERKNS_3COWINS_7IColumnEE13immutable_ptrISG_EESE_ENK3$_0clIRKNS_11IDictionary14ColumnWithTypeINS_14DataTypeDateV2EEESt17integral_constantIbLb1EESV_EEDaOT_T0_T1_
Unexecuted instantiation: ip_address_dictionary.cpp:_ZZNK5doris19IPAddressDictionary10get_columnERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt10shared_ptrIKNS_9IDataTypeEERKNS_3COWINS_7IColumnEE13immutable_ptrISG_EESE_ENK3$_0clIRKNS_11IDictionary14ColumnWithTypeINS_18DataTypeDateTimeV2EEESt17integral_constantIbLb0EESV_EEDaOT_T0_T1_
Unexecuted instantiation: ip_address_dictionary.cpp:_ZZNK5doris19IPAddressDictionary10get_columnERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt10shared_ptrIKNS_9IDataTypeEERKNS_3COWINS_7IColumnEE13immutable_ptrISG_EESE_ENK3$_0clIRKNS_11IDictionary14ColumnWithTypeINS_18DataTypeDateTimeV2EEESt17integral_constantIbLb0EESU_IbLb1EEEEDaOT_T0_T1_
Unexecuted instantiation: ip_address_dictionary.cpp:_ZZNK5doris19IPAddressDictionary10get_columnERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt10shared_ptrIKNS_9IDataTypeEERKNS_3COWINS_7IColumnEE13immutable_ptrISG_EESE_ENK3$_0clIRKNS_11IDictionary14ColumnWithTypeINS_18DataTypeDateTimeV2EEESt17integral_constantIbLb1EESU_IbLb0EEEEDaOT_T0_T1_
Unexecuted instantiation: ip_address_dictionary.cpp:_ZZNK5doris19IPAddressDictionary10get_columnERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt10shared_ptrIKNS_9IDataTypeEERKNS_3COWINS_7IColumnEE13immutable_ptrISG_EESE_ENK3$_0clIRKNS_11IDictionary14ColumnWithTypeINS_18DataTypeDateTimeV2EEESt17integral_constantIbLb1EESV_EEDaOT_T0_T1_
Unexecuted instantiation: ip_address_dictionary.cpp:_ZZNK5doris19IPAddressDictionary10get_columnERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt10shared_ptrIKNS_9IDataTypeEERKNS_3COWINS_7IColumnEE13immutable_ptrISG_EESE_ENK3$_0clIRKNS_11IDictionary14ColumnWithTypeINS_15DataTypeDecimalILNS_13PrimitiveTypeE28EEEEESt17integral_constantIbLb0EESX_EEDaOT_T0_T1_
Unexecuted instantiation: ip_address_dictionary.cpp:_ZZNK5doris19IPAddressDictionary10get_columnERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt10shared_ptrIKNS_9IDataTypeEERKNS_3COWINS_7IColumnEE13immutable_ptrISG_EESE_ENK3$_0clIRKNS_11IDictionary14ColumnWithTypeINS_15DataTypeDecimalILNS_13PrimitiveTypeE28EEEEESt17integral_constantIbLb0EESW_IbLb1EEEEDaOT_T0_T1_
Unexecuted instantiation: ip_address_dictionary.cpp:_ZZNK5doris19IPAddressDictionary10get_columnERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt10shared_ptrIKNS_9IDataTypeEERKNS_3COWINS_7IColumnEE13immutable_ptrISG_EESE_ENK3$_0clIRKNS_11IDictionary14ColumnWithTypeINS_15DataTypeDecimalILNS_13PrimitiveTypeE28EEEEESt17integral_constantIbLb1EESW_IbLb0EEEEDaOT_T0_T1_
Unexecuted instantiation: ip_address_dictionary.cpp:_ZZNK5doris19IPAddressDictionary10get_columnERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt10shared_ptrIKNS_9IDataTypeEERKNS_3COWINS_7IColumnEE13immutable_ptrISG_EESE_ENK3$_0clIRKNS_11IDictionary14ColumnWithTypeINS_15DataTypeDecimalILNS_13PrimitiveTypeE28EEEEESt17integral_constantIbLb1EESX_EEDaOT_T0_T1_
Unexecuted instantiation: ip_address_dictionary.cpp:_ZZNK5doris19IPAddressDictionary10get_columnERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt10shared_ptrIKNS_9IDataTypeEERKNS_3COWINS_7IColumnEE13immutable_ptrISG_EESE_ENK3$_0clIRKNS_11IDictionary14ColumnWithTypeINS_15DataTypeDecimalILNS_13PrimitiveTypeE29EEEEESt17integral_constantIbLb0EESX_EEDaOT_T0_T1_
Unexecuted instantiation: ip_address_dictionary.cpp:_ZZNK5doris19IPAddressDictionary10get_columnERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt10shared_ptrIKNS_9IDataTypeEERKNS_3COWINS_7IColumnEE13immutable_ptrISG_EESE_ENK3$_0clIRKNS_11IDictionary14ColumnWithTypeINS_15DataTypeDecimalILNS_13PrimitiveTypeE29EEEEESt17integral_constantIbLb0EESW_IbLb1EEEEDaOT_T0_T1_
Unexecuted instantiation: ip_address_dictionary.cpp:_ZZNK5doris19IPAddressDictionary10get_columnERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt10shared_ptrIKNS_9IDataTypeEERKNS_3COWINS_7IColumnEE13immutable_ptrISG_EESE_ENK3$_0clIRKNS_11IDictionary14ColumnWithTypeINS_15DataTypeDecimalILNS_13PrimitiveTypeE29EEEEESt17integral_constantIbLb1EESW_IbLb0EEEEDaOT_T0_T1_
Unexecuted instantiation: ip_address_dictionary.cpp:_ZZNK5doris19IPAddressDictionary10get_columnERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt10shared_ptrIKNS_9IDataTypeEERKNS_3COWINS_7IColumnEE13immutable_ptrISG_EESE_ENK3$_0clIRKNS_11IDictionary14ColumnWithTypeINS_15DataTypeDecimalILNS_13PrimitiveTypeE29EEEEESt17integral_constantIbLb1EESX_EEDaOT_T0_T1_
Unexecuted instantiation: ip_address_dictionary.cpp:_ZZNK5doris19IPAddressDictionary10get_columnERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt10shared_ptrIKNS_9IDataTypeEERKNS_3COWINS_7IColumnEE13immutable_ptrISG_EESE_ENK3$_0clIRKNS_11IDictionary14ColumnWithTypeINS_15DataTypeDecimalILNS_13PrimitiveTypeE30EEEEESt17integral_constantIbLb0EESX_EEDaOT_T0_T1_
Unexecuted instantiation: ip_address_dictionary.cpp:_ZZNK5doris19IPAddressDictionary10get_columnERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt10shared_ptrIKNS_9IDataTypeEERKNS_3COWINS_7IColumnEE13immutable_ptrISG_EESE_ENK3$_0clIRKNS_11IDictionary14ColumnWithTypeINS_15DataTypeDecimalILNS_13PrimitiveTypeE30EEEEESt17integral_constantIbLb0EESW_IbLb1EEEEDaOT_T0_T1_
Unexecuted instantiation: ip_address_dictionary.cpp:_ZZNK5doris19IPAddressDictionary10get_columnERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt10shared_ptrIKNS_9IDataTypeEERKNS_3COWINS_7IColumnEE13immutable_ptrISG_EESE_ENK3$_0clIRKNS_11IDictionary14ColumnWithTypeINS_15DataTypeDecimalILNS_13PrimitiveTypeE30EEEEESt17integral_constantIbLb1EESW_IbLb0EEEEDaOT_T0_T1_
Unexecuted instantiation: ip_address_dictionary.cpp:_ZZNK5doris19IPAddressDictionary10get_columnERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt10shared_ptrIKNS_9IDataTypeEERKNS_3COWINS_7IColumnEE13immutable_ptrISG_EESE_ENK3$_0clIRKNS_11IDictionary14ColumnWithTypeINS_15DataTypeDecimalILNS_13PrimitiveTypeE30EEEEESt17integral_constantIbLb1EESX_EEDaOT_T0_T1_
Unexecuted instantiation: ip_address_dictionary.cpp:_ZZNK5doris19IPAddressDictionary10get_columnERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt10shared_ptrIKNS_9IDataTypeEERKNS_3COWINS_7IColumnEE13immutable_ptrISG_EESE_ENK3$_0clIRKNS_11IDictionary14ColumnWithTypeINS_15DataTypeDecimalILNS_13PrimitiveTypeE35EEEEESt17integral_constantIbLb0EESX_EEDaOT_T0_T1_
Unexecuted instantiation: ip_address_dictionary.cpp:_ZZNK5doris19IPAddressDictionary10get_columnERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt10shared_ptrIKNS_9IDataTypeEERKNS_3COWINS_7IColumnEE13immutable_ptrISG_EESE_ENK3$_0clIRKNS_11IDictionary14ColumnWithTypeINS_15DataTypeDecimalILNS_13PrimitiveTypeE35EEEEESt17integral_constantIbLb0EESW_IbLb1EEEEDaOT_T0_T1_
Unexecuted instantiation: ip_address_dictionary.cpp:_ZZNK5doris19IPAddressDictionary10get_columnERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt10shared_ptrIKNS_9IDataTypeEERKNS_3COWINS_7IColumnEE13immutable_ptrISG_EESE_ENK3$_0clIRKNS_11IDictionary14ColumnWithTypeINS_15DataTypeDecimalILNS_13PrimitiveTypeE35EEEEESt17integral_constantIbLb1EESW_IbLb0EEEEDaOT_T0_T1_
Unexecuted instantiation: ip_address_dictionary.cpp:_ZZNK5doris19IPAddressDictionary10get_columnERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt10shared_ptrIKNS_9IDataTypeEERKNS_3COWINS_7IColumnEE13immutable_ptrISG_EESE_ENK3$_0clIRKNS_11IDictionary14ColumnWithTypeINS_15DataTypeDecimalILNS_13PrimitiveTypeE35EEEEESt17integral_constantIbLb1EESX_EEDaOT_T0_T1_
116
4
                value_data, make_bool_variant(null_key != nullptr),
117
4
                attribute_nullable_variant(attribute_index(attribute_name)));
118
15
    } else {
119
        // input key column without nullable
120
15
        const auto* ipv4_column = assert_cast<const ColumnIPv4*>(remove_nullable(key_column).get());
121
        // if input key column is nullable, will not be null
122
15
        const auto* null_key = check_and_get_column<ColumnNullable>(key_column.get());
123
15
        std::visit(
124
15
                [&](auto&& arg, auto key_is_nullable, auto value_is_nullable) {
125
15
                    using ValueDataType = std::decay_t<decltype(arg)>;
126
15
                    using OutputColumnType = ValueDataType::OutputColumnType;
127
15
                    auto* res_real_column = assert_cast<OutputColumnType*>(res_column.get());
128
15
                    const auto* value_column = arg.get();
129
15
                    const auto* value_null_map = arg.get_null_map();
130
77
                    for (size_t i = 0; i < rows; i++) {
131
60
                        if constexpr (key_is_nullable) {
132
5
                            if (null_key->is_null_at(i)) {
133
                                // if input key is null, set the result column to null
134
2
                                res_real_column->insert_default();
135
2
                                res_null_map[i] = true;
136
2
                                continue;
137
2
                            }
138
5
                        }
139
3
                        auto it = look_up_IP(ipv4_to_ipv6(ipv4_column->get_element(i)));
140
60
                        if (it == ip_not_found()) {
141
                            // if input key is not found, set the result column to null
142
17
                            res_real_column->insert_default();
143
17
                            res_null_map[i] = true;
144
43
                        } else {
145
43
                            const auto idx = *it;
146
43
                            set_value_data<value_is_nullable>(res_real_column, res_null_map[i],
147
43
                                                              value_column, value_null_map, idx);
148
43
                        }
149
60
                    }
150
15
                },
Unexecuted instantiation: ip_address_dictionary.cpp:_ZZNK5doris19IPAddressDictionary10get_columnERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt10shared_ptrIKNS_9IDataTypeEERKNS_3COWINS_7IColumnEE13immutable_ptrISG_EESE_ENK3$_1clIRKNS_11IDictionary14ColumnWithTypeINS_14DataTypeNumberILNS_13PrimitiveTypeE2EEEEESt17integral_constantIbLb0EESX_EEDaOT_T0_T1_
Unexecuted instantiation: ip_address_dictionary.cpp:_ZZNK5doris19IPAddressDictionary10get_columnERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt10shared_ptrIKNS_9IDataTypeEERKNS_3COWINS_7IColumnEE13immutable_ptrISG_EESE_ENK3$_1clIRKNS_11IDictionary14ColumnWithTypeINS_14DataTypeNumberILNS_13PrimitiveTypeE2EEEEESt17integral_constantIbLb0EESW_IbLb1EEEEDaOT_T0_T1_
Unexecuted instantiation: ip_address_dictionary.cpp:_ZZNK5doris19IPAddressDictionary10get_columnERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt10shared_ptrIKNS_9IDataTypeEERKNS_3COWINS_7IColumnEE13immutable_ptrISG_EESE_ENK3$_1clIRKNS_11IDictionary14ColumnWithTypeINS_14DataTypeNumberILNS_13PrimitiveTypeE2EEEEESt17integral_constantIbLb1EESW_IbLb0EEEEDaOT_T0_T1_
Unexecuted instantiation: ip_address_dictionary.cpp:_ZZNK5doris19IPAddressDictionary10get_columnERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt10shared_ptrIKNS_9IDataTypeEERKNS_3COWINS_7IColumnEE13immutable_ptrISG_EESE_ENK3$_1clIRKNS_11IDictionary14ColumnWithTypeINS_14DataTypeNumberILNS_13PrimitiveTypeE2EEEEESt17integral_constantIbLb1EESX_EEDaOT_T0_T1_
Unexecuted instantiation: ip_address_dictionary.cpp:_ZZNK5doris19IPAddressDictionary10get_columnERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt10shared_ptrIKNS_9IDataTypeEERKNS_3COWINS_7IColumnEE13immutable_ptrISG_EESE_ENK3$_1clIRKNS_11IDictionary14ColumnWithTypeINS_14DataTypeNumberILNS_13PrimitiveTypeE3EEEEESt17integral_constantIbLb0EESX_EEDaOT_T0_T1_
Unexecuted instantiation: ip_address_dictionary.cpp:_ZZNK5doris19IPAddressDictionary10get_columnERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt10shared_ptrIKNS_9IDataTypeEERKNS_3COWINS_7IColumnEE13immutable_ptrISG_EESE_ENK3$_1clIRKNS_11IDictionary14ColumnWithTypeINS_14DataTypeNumberILNS_13PrimitiveTypeE3EEEEESt17integral_constantIbLb0EESW_IbLb1EEEEDaOT_T0_T1_
Unexecuted instantiation: ip_address_dictionary.cpp:_ZZNK5doris19IPAddressDictionary10get_columnERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt10shared_ptrIKNS_9IDataTypeEERKNS_3COWINS_7IColumnEE13immutable_ptrISG_EESE_ENK3$_1clIRKNS_11IDictionary14ColumnWithTypeINS_14DataTypeNumberILNS_13PrimitiveTypeE3EEEEESt17integral_constantIbLb1EESW_IbLb0EEEEDaOT_T0_T1_
Unexecuted instantiation: ip_address_dictionary.cpp:_ZZNK5doris19IPAddressDictionary10get_columnERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt10shared_ptrIKNS_9IDataTypeEERKNS_3COWINS_7IColumnEE13immutable_ptrISG_EESE_ENK3$_1clIRKNS_11IDictionary14ColumnWithTypeINS_14DataTypeNumberILNS_13PrimitiveTypeE3EEEEESt17integral_constantIbLb1EESX_EEDaOT_T0_T1_
Unexecuted instantiation: ip_address_dictionary.cpp:_ZZNK5doris19IPAddressDictionary10get_columnERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt10shared_ptrIKNS_9IDataTypeEERKNS_3COWINS_7IColumnEE13immutable_ptrISG_EESE_ENK3$_1clIRKNS_11IDictionary14ColumnWithTypeINS_14DataTypeNumberILNS_13PrimitiveTypeE4EEEEESt17integral_constantIbLb0EESX_EEDaOT_T0_T1_
Unexecuted instantiation: ip_address_dictionary.cpp:_ZZNK5doris19IPAddressDictionary10get_columnERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt10shared_ptrIKNS_9IDataTypeEERKNS_3COWINS_7IColumnEE13immutable_ptrISG_EESE_ENK3$_1clIRKNS_11IDictionary14ColumnWithTypeINS_14DataTypeNumberILNS_13PrimitiveTypeE4EEEEESt17integral_constantIbLb0EESW_IbLb1EEEEDaOT_T0_T1_
Unexecuted instantiation: ip_address_dictionary.cpp:_ZZNK5doris19IPAddressDictionary10get_columnERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt10shared_ptrIKNS_9IDataTypeEERKNS_3COWINS_7IColumnEE13immutable_ptrISG_EESE_ENK3$_1clIRKNS_11IDictionary14ColumnWithTypeINS_14DataTypeNumberILNS_13PrimitiveTypeE4EEEEESt17integral_constantIbLb1EESW_IbLb0EEEEDaOT_T0_T1_
Unexecuted instantiation: ip_address_dictionary.cpp:_ZZNK5doris19IPAddressDictionary10get_columnERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt10shared_ptrIKNS_9IDataTypeEERKNS_3COWINS_7IColumnEE13immutable_ptrISG_EESE_ENK3$_1clIRKNS_11IDictionary14ColumnWithTypeINS_14DataTypeNumberILNS_13PrimitiveTypeE4EEEEESt17integral_constantIbLb1EESX_EEDaOT_T0_T1_
ip_address_dictionary.cpp:_ZZNK5doris19IPAddressDictionary10get_columnERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt10shared_ptrIKNS_9IDataTypeEERKNS_3COWINS_7IColumnEE13immutable_ptrISG_EESE_ENK3$_1clIRKNS_11IDictionary14ColumnWithTypeINS_14DataTypeNumberILNS_13PrimitiveTypeE5EEEEESt17integral_constantIbLb0EESX_EEDaOT_T0_T1_
Line
Count
Source
124
4
                [&](auto&& arg, auto key_is_nullable, auto value_is_nullable) {
125
4
                    using ValueDataType = std::decay_t<decltype(arg)>;
126
4
                    using OutputColumnType = ValueDataType::OutputColumnType;
127
4
                    auto* res_real_column = assert_cast<OutputColumnType*>(res_column.get());
128
4
                    const auto* value_column = arg.get();
129
4
                    const auto* value_null_map = arg.get_null_map();
130
8
                    for (size_t i = 0; i < rows; i++) {
131
                        if constexpr (key_is_nullable) {
132
                            if (null_key->is_null_at(i)) {
133
                                // if input key is null, set the result column to null
134
                                res_real_column->insert_default();
135
                                res_null_map[i] = true;
136
                                continue;
137
                            }
138
                        }
139
4
                        auto it = look_up_IP(ipv4_to_ipv6(ipv4_column->get_element(i)));
140
4
                        if (it == ip_not_found()) {
141
                            // if input key is not found, set the result column to null
142
1
                            res_real_column->insert_default();
143
1
                            res_null_map[i] = true;
144
3
                        } else {
145
3
                            const auto idx = *it;
146
3
                            set_value_data<value_is_nullable>(res_real_column, res_null_map[i],
147
3
                                                              value_column, value_null_map, idx);
148
3
                        }
149
4
                    }
150
4
                },
ip_address_dictionary.cpp:_ZZNK5doris19IPAddressDictionary10get_columnERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt10shared_ptrIKNS_9IDataTypeEERKNS_3COWINS_7IColumnEE13immutable_ptrISG_EESE_ENK3$_1clIRKNS_11IDictionary14ColumnWithTypeINS_14DataTypeNumberILNS_13PrimitiveTypeE5EEEEESt17integral_constantIbLb0EESW_IbLb1EEEEDaOT_T0_T1_
Line
Count
Source
124
1
                [&](auto&& arg, auto key_is_nullable, auto value_is_nullable) {
125
1
                    using ValueDataType = std::decay_t<decltype(arg)>;
126
1
                    using OutputColumnType = ValueDataType::OutputColumnType;
127
1
                    auto* res_real_column = assert_cast<OutputColumnType*>(res_column.get());
128
1
                    const auto* value_column = arg.get();
129
1
                    const auto* value_null_map = arg.get_null_map();
130
4
                    for (size_t i = 0; i < rows; i++) {
131
                        if constexpr (key_is_nullable) {
132
                            if (null_key->is_null_at(i)) {
133
                                // if input key is null, set the result column to null
134
                                res_real_column->insert_default();
135
                                res_null_map[i] = true;
136
                                continue;
137
                            }
138
                        }
139
3
                        auto it = look_up_IP(ipv4_to_ipv6(ipv4_column->get_element(i)));
140
3
                        if (it == ip_not_found()) {
141
                            // if input key is not found, set the result column to null
142
1
                            res_real_column->insert_default();
143
1
                            res_null_map[i] = true;
144
2
                        } else {
145
2
                            const auto idx = *it;
146
2
                            set_value_data<value_is_nullable>(res_real_column, res_null_map[i],
147
2
                                                              value_column, value_null_map, idx);
148
2
                        }
149
3
                    }
150
1
                },
Unexecuted instantiation: ip_address_dictionary.cpp:_ZZNK5doris19IPAddressDictionary10get_columnERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt10shared_ptrIKNS_9IDataTypeEERKNS_3COWINS_7IColumnEE13immutable_ptrISG_EESE_ENK3$_1clIRKNS_11IDictionary14ColumnWithTypeINS_14DataTypeNumberILNS_13PrimitiveTypeE5EEEEESt17integral_constantIbLb1EESW_IbLb0EEEEDaOT_T0_T1_
ip_address_dictionary.cpp:_ZZNK5doris19IPAddressDictionary10get_columnERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt10shared_ptrIKNS_9IDataTypeEERKNS_3COWINS_7IColumnEE13immutable_ptrISG_EESE_ENK3$_1clIRKNS_11IDictionary14ColumnWithTypeINS_14DataTypeNumberILNS_13PrimitiveTypeE5EEEEESt17integral_constantIbLb1EESX_EEDaOT_T0_T1_
Line
Count
Source
124
1
                [&](auto&& arg, auto key_is_nullable, auto value_is_nullable) {
125
1
                    using ValueDataType = std::decay_t<decltype(arg)>;
126
1
                    using OutputColumnType = ValueDataType::OutputColumnType;
127
1
                    auto* res_real_column = assert_cast<OutputColumnType*>(res_column.get());
128
1
                    const auto* value_column = arg.get();
129
1
                    const auto* value_null_map = arg.get_null_map();
130
6
                    for (size_t i = 0; i < rows; i++) {
131
4
                        if constexpr (key_is_nullable) {
132
4
                            if (null_key->is_null_at(i)) {
133
                                // if input key is null, set the result column to null
134
1
                                res_real_column->insert_default();
135
1
                                res_null_map[i] = true;
136
1
                                continue;
137
1
                            }
138
4
                        }
139
3
                        auto it = look_up_IP(ipv4_to_ipv6(ipv4_column->get_element(i)));
140
4
                        if (it == ip_not_found()) {
141
                            // if input key is not found, set the result column to null
142
1
                            res_real_column->insert_default();
143
1
                            res_null_map[i] = true;
144
3
                        } else {
145
3
                            const auto idx = *it;
146
3
                            set_value_data<value_is_nullable>(res_real_column, res_null_map[i],
147
3
                                                              value_column, value_null_map, idx);
148
3
                        }
149
4
                    }
150
1
                },
ip_address_dictionary.cpp:_ZZNK5doris19IPAddressDictionary10get_columnERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt10shared_ptrIKNS_9IDataTypeEERKNS_3COWINS_7IColumnEE13immutable_ptrISG_EESE_ENK3$_1clIRKNS_11IDictionary14ColumnWithTypeINS_14DataTypeNumberILNS_13PrimitiveTypeE6EEEEESt17integral_constantIbLb0EESX_EEDaOT_T0_T1_
Line
Count
Source
124
1
                [&](auto&& arg, auto key_is_nullable, auto value_is_nullable) {
125
1
                    using ValueDataType = std::decay_t<decltype(arg)>;
126
1
                    using OutputColumnType = ValueDataType::OutputColumnType;
127
1
                    auto* res_real_column = assert_cast<OutputColumnType*>(res_column.get());
128
1
                    const auto* value_column = arg.get();
129
1
                    const auto* value_null_map = arg.get_null_map();
130
22
                    for (size_t i = 0; i < rows; i++) {
131
                        if constexpr (key_is_nullable) {
132
                            if (null_key->is_null_at(i)) {
133
                                // if input key is null, set the result column to null
134
                                res_real_column->insert_default();
135
                                res_null_map[i] = true;
136
                                continue;
137
                            }
138
                        }
139
21
                        auto it = look_up_IP(ipv4_to_ipv6(ipv4_column->get_element(i)));
140
21
                        if (it == ip_not_found()) {
141
                            // if input key is not found, set the result column to null
142
6
                            res_real_column->insert_default();
143
6
                            res_null_map[i] = true;
144
15
                        } else {
145
15
                            const auto idx = *it;
146
15
                            set_value_data<value_is_nullable>(res_real_column, res_null_map[i],
147
15
                                                              value_column, value_null_map, idx);
148
15
                        }
149
21
                    }
150
1
                },
Unexecuted instantiation: ip_address_dictionary.cpp:_ZZNK5doris19IPAddressDictionary10get_columnERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt10shared_ptrIKNS_9IDataTypeEERKNS_3COWINS_7IColumnEE13immutable_ptrISG_EESE_ENK3$_1clIRKNS_11IDictionary14ColumnWithTypeINS_14DataTypeNumberILNS_13PrimitiveTypeE6EEEEESt17integral_constantIbLb0EESW_IbLb1EEEEDaOT_T0_T1_
Unexecuted instantiation: ip_address_dictionary.cpp:_ZZNK5doris19IPAddressDictionary10get_columnERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt10shared_ptrIKNS_9IDataTypeEERKNS_3COWINS_7IColumnEE13immutable_ptrISG_EESE_ENK3$_1clIRKNS_11IDictionary14ColumnWithTypeINS_14DataTypeNumberILNS_13PrimitiveTypeE6EEEEESt17integral_constantIbLb1EESW_IbLb0EEEEDaOT_T0_T1_
Unexecuted instantiation: ip_address_dictionary.cpp:_ZZNK5doris19IPAddressDictionary10get_columnERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt10shared_ptrIKNS_9IDataTypeEERKNS_3COWINS_7IColumnEE13immutable_ptrISG_EESE_ENK3$_1clIRKNS_11IDictionary14ColumnWithTypeINS_14DataTypeNumberILNS_13PrimitiveTypeE6EEEEESt17integral_constantIbLb1EESX_EEDaOT_T0_T1_
Unexecuted instantiation: ip_address_dictionary.cpp:_ZZNK5doris19IPAddressDictionary10get_columnERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt10shared_ptrIKNS_9IDataTypeEERKNS_3COWINS_7IColumnEE13immutable_ptrISG_EESE_ENK3$_1clIRKNS_11IDictionary14ColumnWithTypeINS_14DataTypeNumberILNS_13PrimitiveTypeE7EEEEESt17integral_constantIbLb0EESX_EEDaOT_T0_T1_
Unexecuted instantiation: ip_address_dictionary.cpp:_ZZNK5doris19IPAddressDictionary10get_columnERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt10shared_ptrIKNS_9IDataTypeEERKNS_3COWINS_7IColumnEE13immutable_ptrISG_EESE_ENK3$_1clIRKNS_11IDictionary14ColumnWithTypeINS_14DataTypeNumberILNS_13PrimitiveTypeE7EEEEESt17integral_constantIbLb0EESW_IbLb1EEEEDaOT_T0_T1_
Unexecuted instantiation: ip_address_dictionary.cpp:_ZZNK5doris19IPAddressDictionary10get_columnERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt10shared_ptrIKNS_9IDataTypeEERKNS_3COWINS_7IColumnEE13immutable_ptrISG_EESE_ENK3$_1clIRKNS_11IDictionary14ColumnWithTypeINS_14DataTypeNumberILNS_13PrimitiveTypeE7EEEEESt17integral_constantIbLb1EESW_IbLb0EEEEDaOT_T0_T1_
Unexecuted instantiation: ip_address_dictionary.cpp:_ZZNK5doris19IPAddressDictionary10get_columnERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt10shared_ptrIKNS_9IDataTypeEERKNS_3COWINS_7IColumnEE13immutable_ptrISG_EESE_ENK3$_1clIRKNS_11IDictionary14ColumnWithTypeINS_14DataTypeNumberILNS_13PrimitiveTypeE7EEEEESt17integral_constantIbLb1EESX_EEDaOT_T0_T1_
Unexecuted instantiation: ip_address_dictionary.cpp:_ZZNK5doris19IPAddressDictionary10get_columnERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt10shared_ptrIKNS_9IDataTypeEERKNS_3COWINS_7IColumnEE13immutable_ptrISG_EESE_ENK3$_1clIRKNS_11IDictionary14ColumnWithTypeINS_14DataTypeNumberILNS_13PrimitiveTypeE8EEEEESt17integral_constantIbLb0EESX_EEDaOT_T0_T1_
Unexecuted instantiation: ip_address_dictionary.cpp:_ZZNK5doris19IPAddressDictionary10get_columnERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt10shared_ptrIKNS_9IDataTypeEERKNS_3COWINS_7IColumnEE13immutable_ptrISG_EESE_ENK3$_1clIRKNS_11IDictionary14ColumnWithTypeINS_14DataTypeNumberILNS_13PrimitiveTypeE8EEEEESt17integral_constantIbLb0EESW_IbLb1EEEEDaOT_T0_T1_
Unexecuted instantiation: ip_address_dictionary.cpp:_ZZNK5doris19IPAddressDictionary10get_columnERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt10shared_ptrIKNS_9IDataTypeEERKNS_3COWINS_7IColumnEE13immutable_ptrISG_EESE_ENK3$_1clIRKNS_11IDictionary14ColumnWithTypeINS_14DataTypeNumberILNS_13PrimitiveTypeE8EEEEESt17integral_constantIbLb1EESW_IbLb0EEEEDaOT_T0_T1_
Unexecuted instantiation: ip_address_dictionary.cpp:_ZZNK5doris19IPAddressDictionary10get_columnERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt10shared_ptrIKNS_9IDataTypeEERKNS_3COWINS_7IColumnEE13immutable_ptrISG_EESE_ENK3$_1clIRKNS_11IDictionary14ColumnWithTypeINS_14DataTypeNumberILNS_13PrimitiveTypeE8EEEEESt17integral_constantIbLb1EESX_EEDaOT_T0_T1_
Unexecuted instantiation: ip_address_dictionary.cpp:_ZZNK5doris19IPAddressDictionary10get_columnERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt10shared_ptrIKNS_9IDataTypeEERKNS_3COWINS_7IColumnEE13immutable_ptrISG_EESE_ENK3$_1clIRKNS_11IDictionary14ColumnWithTypeINS_14DataTypeNumberILNS_13PrimitiveTypeE9EEEEESt17integral_constantIbLb0EESX_EEDaOT_T0_T1_
Unexecuted instantiation: ip_address_dictionary.cpp:_ZZNK5doris19IPAddressDictionary10get_columnERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt10shared_ptrIKNS_9IDataTypeEERKNS_3COWINS_7IColumnEE13immutable_ptrISG_EESE_ENK3$_1clIRKNS_11IDictionary14ColumnWithTypeINS_14DataTypeNumberILNS_13PrimitiveTypeE9EEEEESt17integral_constantIbLb0EESW_IbLb1EEEEDaOT_T0_T1_
Unexecuted instantiation: ip_address_dictionary.cpp:_ZZNK5doris19IPAddressDictionary10get_columnERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt10shared_ptrIKNS_9IDataTypeEERKNS_3COWINS_7IColumnEE13immutable_ptrISG_EESE_ENK3$_1clIRKNS_11IDictionary14ColumnWithTypeINS_14DataTypeNumberILNS_13PrimitiveTypeE9EEEEESt17integral_constantIbLb1EESW_IbLb0EEEEDaOT_T0_T1_
Unexecuted instantiation: ip_address_dictionary.cpp:_ZZNK5doris19IPAddressDictionary10get_columnERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt10shared_ptrIKNS_9IDataTypeEERKNS_3COWINS_7IColumnEE13immutable_ptrISG_EESE_ENK3$_1clIRKNS_11IDictionary14ColumnWithTypeINS_14DataTypeNumberILNS_13PrimitiveTypeE9EEEEESt17integral_constantIbLb1EESX_EEDaOT_T0_T1_
Unexecuted instantiation: ip_address_dictionary.cpp:_ZZNK5doris19IPAddressDictionary10get_columnERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt10shared_ptrIKNS_9IDataTypeEERKNS_3COWINS_7IColumnEE13immutable_ptrISG_EESE_ENK3$_1clIRKNS_11IDictionary14ColumnWithTypeINS_12DataTypeIPv4EEESt17integral_constantIbLb0EESV_EEDaOT_T0_T1_
Unexecuted instantiation: ip_address_dictionary.cpp:_ZZNK5doris19IPAddressDictionary10get_columnERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt10shared_ptrIKNS_9IDataTypeEERKNS_3COWINS_7IColumnEE13immutable_ptrISG_EESE_ENK3$_1clIRKNS_11IDictionary14ColumnWithTypeINS_12DataTypeIPv4EEESt17integral_constantIbLb0EESU_IbLb1EEEEDaOT_T0_T1_
Unexecuted instantiation: ip_address_dictionary.cpp:_ZZNK5doris19IPAddressDictionary10get_columnERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt10shared_ptrIKNS_9IDataTypeEERKNS_3COWINS_7IColumnEE13immutable_ptrISG_EESE_ENK3$_1clIRKNS_11IDictionary14ColumnWithTypeINS_12DataTypeIPv4EEESt17integral_constantIbLb1EESU_IbLb0EEEEDaOT_T0_T1_
Unexecuted instantiation: ip_address_dictionary.cpp:_ZZNK5doris19IPAddressDictionary10get_columnERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt10shared_ptrIKNS_9IDataTypeEERKNS_3COWINS_7IColumnEE13immutable_ptrISG_EESE_ENK3$_1clIRKNS_11IDictionary14ColumnWithTypeINS_12DataTypeIPv4EEESt17integral_constantIbLb1EESV_EEDaOT_T0_T1_
Unexecuted instantiation: ip_address_dictionary.cpp:_ZZNK5doris19IPAddressDictionary10get_columnERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt10shared_ptrIKNS_9IDataTypeEERKNS_3COWINS_7IColumnEE13immutable_ptrISG_EESE_ENK3$_1clIRKNS_11IDictionary14ColumnWithTypeINS_12DataTypeIPv6EEESt17integral_constantIbLb0EESV_EEDaOT_T0_T1_
Unexecuted instantiation: ip_address_dictionary.cpp:_ZZNK5doris19IPAddressDictionary10get_columnERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt10shared_ptrIKNS_9IDataTypeEERKNS_3COWINS_7IColumnEE13immutable_ptrISG_EESE_ENK3$_1clIRKNS_11IDictionary14ColumnWithTypeINS_12DataTypeIPv6EEESt17integral_constantIbLb0EESU_IbLb1EEEEDaOT_T0_T1_
Unexecuted instantiation: ip_address_dictionary.cpp:_ZZNK5doris19IPAddressDictionary10get_columnERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt10shared_ptrIKNS_9IDataTypeEERKNS_3COWINS_7IColumnEE13immutable_ptrISG_EESE_ENK3$_1clIRKNS_11IDictionary14ColumnWithTypeINS_12DataTypeIPv6EEESt17integral_constantIbLb1EESU_IbLb0EEEEDaOT_T0_T1_
Unexecuted instantiation: ip_address_dictionary.cpp:_ZZNK5doris19IPAddressDictionary10get_columnERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt10shared_ptrIKNS_9IDataTypeEERKNS_3COWINS_7IColumnEE13immutable_ptrISG_EESE_ENK3$_1clIRKNS_11IDictionary14ColumnWithTypeINS_12DataTypeIPv6EEESt17integral_constantIbLb1EESV_EEDaOT_T0_T1_
ip_address_dictionary.cpp:_ZZNK5doris19IPAddressDictionary10get_columnERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt10shared_ptrIKNS_9IDataTypeEERKNS_3COWINS_7IColumnEE13immutable_ptrISG_EESE_ENK3$_1clIRKNS_11IDictionary14ColumnWithTypeINS_14DataTypeStringEEESt17integral_constantIbLb0EESV_EEDaOT_T0_T1_
Line
Count
Source
124
3
                [&](auto&& arg, auto key_is_nullable, auto value_is_nullable) {
125
3
                    using ValueDataType = std::decay_t<decltype(arg)>;
126
3
                    using OutputColumnType = ValueDataType::OutputColumnType;
127
3
                    auto* res_real_column = assert_cast<OutputColumnType*>(res_column.get());
128
3
                    const auto* value_column = arg.get();
129
3
                    const auto* value_null_map = arg.get_null_map();
130
6
                    for (size_t i = 0; i < rows; i++) {
131
                        if constexpr (key_is_nullable) {
132
                            if (null_key->is_null_at(i)) {
133
                                // if input key is null, set the result column to null
134
                                res_real_column->insert_default();
135
                                res_null_map[i] = true;
136
                                continue;
137
                            }
138
                        }
139
3
                        auto it = look_up_IP(ipv4_to_ipv6(ipv4_column->get_element(i)));
140
3
                        if (it == ip_not_found()) {
141
                            // if input key is not found, set the result column to null
142
1
                            res_real_column->insert_default();
143
1
                            res_null_map[i] = true;
144
2
                        } else {
145
2
                            const auto idx = *it;
146
2
                            set_value_data<value_is_nullable>(res_real_column, res_null_map[i],
147
2
                                                              value_column, value_null_map, idx);
148
2
                        }
149
3
                    }
150
3
                },
ip_address_dictionary.cpp:_ZZNK5doris19IPAddressDictionary10get_columnERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt10shared_ptrIKNS_9IDataTypeEERKNS_3COWINS_7IColumnEE13immutable_ptrISG_EESE_ENK3$_1clIRKNS_11IDictionary14ColumnWithTypeINS_14DataTypeStringEEESt17integral_constantIbLb0EESU_IbLb1EEEEDaOT_T0_T1_
Line
Count
Source
124
3
                [&](auto&& arg, auto key_is_nullable, auto value_is_nullable) {
125
3
                    using ValueDataType = std::decay_t<decltype(arg)>;
126
3
                    using OutputColumnType = ValueDataType::OutputColumnType;
127
3
                    auto* res_real_column = assert_cast<OutputColumnType*>(res_column.get());
128
3
                    const auto* value_column = arg.get();
129
3
                    const auto* value_null_map = arg.get_null_map();
130
6
                    for (size_t i = 0; i < rows; i++) {
131
                        if constexpr (key_is_nullable) {
132
                            if (null_key->is_null_at(i)) {
133
                                // if input key is null, set the result column to null
134
                                res_real_column->insert_default();
135
                                res_null_map[i] = true;
136
                                continue;
137
                            }
138
                        }
139
3
                        auto it = look_up_IP(ipv4_to_ipv6(ipv4_column->get_element(i)));
140
3
                        if (it == ip_not_found()) {
141
                            // if input key is not found, set the result column to null
142
1
                            res_real_column->insert_default();
143
1
                            res_null_map[i] = true;
144
2
                        } else {
145
2
                            const auto idx = *it;
146
2
                            set_value_data<value_is_nullable>(res_real_column, res_null_map[i],
147
2
                                                              value_column, value_null_map, idx);
148
2
                        }
149
3
                    }
150
3
                },
Unexecuted instantiation: ip_address_dictionary.cpp:_ZZNK5doris19IPAddressDictionary10get_columnERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt10shared_ptrIKNS_9IDataTypeEERKNS_3COWINS_7IColumnEE13immutable_ptrISG_EESE_ENK3$_1clIRKNS_11IDictionary14ColumnWithTypeINS_14DataTypeStringEEESt17integral_constantIbLb1EESU_IbLb0EEEEDaOT_T0_T1_
ip_address_dictionary.cpp:_ZZNK5doris19IPAddressDictionary10get_columnERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt10shared_ptrIKNS_9IDataTypeEERKNS_3COWINS_7IColumnEE13immutable_ptrISG_EESE_ENK3$_1clIRKNS_11IDictionary14ColumnWithTypeINS_14DataTypeStringEEESt17integral_constantIbLb1EESV_EEDaOT_T0_T1_
Line
Count
Source
124
1
                [&](auto&& arg, auto key_is_nullable, auto value_is_nullable) {
125
1
                    using ValueDataType = std::decay_t<decltype(arg)>;
126
1
                    using OutputColumnType = ValueDataType::OutputColumnType;
127
1
                    auto* res_real_column = assert_cast<OutputColumnType*>(res_column.get());
128
1
                    const auto* value_column = arg.get();
129
1
                    const auto* value_null_map = arg.get_null_map();
130
3
                    for (size_t i = 0; i < rows; i++) {
131
1
                        if constexpr (key_is_nullable) {
132
1
                            if (null_key->is_null_at(i)) {
133
                                // if input key is null, set the result column to null
134
1
                                res_real_column->insert_default();
135
1
                                res_null_map[i] = true;
136
1
                                continue;
137
1
                            }
138
1
                        }
139
0
                        auto it = look_up_IP(ipv4_to_ipv6(ipv4_column->get_element(i)));
140
1
                        if (it == ip_not_found()) {
141
                            // if input key is not found, set the result column to null
142
0
                            res_real_column->insert_default();
143
0
                            res_null_map[i] = true;
144
1
                        } else {
145
1
                            const auto idx = *it;
146
1
                            set_value_data<value_is_nullable>(res_real_column, res_null_map[i],
147
1
                                                              value_column, value_null_map, idx);
148
1
                        }
149
1
                    }
150
1
                },
ip_address_dictionary.cpp:_ZZNK5doris19IPAddressDictionary10get_columnERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt10shared_ptrIKNS_9IDataTypeEERKNS_3COWINS_7IColumnEE13immutable_ptrISG_EESE_ENK3$_1clIRKNS_11IDictionary14ColumnWithTypeINSO_20DictDataTypeString64EEESt17integral_constantIbLb0EESV_EEDaOT_T0_T1_
Line
Count
Source
124
1
                [&](auto&& arg, auto key_is_nullable, auto value_is_nullable) {
125
1
                    using ValueDataType = std::decay_t<decltype(arg)>;
126
1
                    using OutputColumnType = ValueDataType::OutputColumnType;
127
1
                    auto* res_real_column = assert_cast<OutputColumnType*>(res_column.get());
128
1
                    const auto* value_column = arg.get();
129
1
                    const auto* value_null_map = arg.get_null_map();
130
22
                    for (size_t i = 0; i < rows; i++) {
131
                        if constexpr (key_is_nullable) {
132
                            if (null_key->is_null_at(i)) {
133
                                // if input key is null, set the result column to null
134
                                res_real_column->insert_default();
135
                                res_null_map[i] = true;
136
                                continue;
137
                            }
138
                        }
139
21
                        auto it = look_up_IP(ipv4_to_ipv6(ipv4_column->get_element(i)));
140
21
                        if (it == ip_not_found()) {
141
                            // if input key is not found, set the result column to null
142
6
                            res_real_column->insert_default();
143
6
                            res_null_map[i] = true;
144
15
                        } else {
145
15
                            const auto idx = *it;
146
15
                            set_value_data<value_is_nullable>(res_real_column, res_null_map[i],
147
15
                                                              value_column, value_null_map, idx);
148
15
                        }
149
21
                    }
150
1
                },
Unexecuted instantiation: ip_address_dictionary.cpp:_ZZNK5doris19IPAddressDictionary10get_columnERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt10shared_ptrIKNS_9IDataTypeEERKNS_3COWINS_7IColumnEE13immutable_ptrISG_EESE_ENK3$_1clIRKNS_11IDictionary14ColumnWithTypeINSO_20DictDataTypeString64EEESt17integral_constantIbLb0EESU_IbLb1EEEEDaOT_T0_T1_
Unexecuted instantiation: ip_address_dictionary.cpp:_ZZNK5doris19IPAddressDictionary10get_columnERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt10shared_ptrIKNS_9IDataTypeEERKNS_3COWINS_7IColumnEE13immutable_ptrISG_EESE_ENK3$_1clIRKNS_11IDictionary14ColumnWithTypeINSO_20DictDataTypeString64EEESt17integral_constantIbLb1EESU_IbLb0EEEEDaOT_T0_T1_
Unexecuted instantiation: ip_address_dictionary.cpp:_ZZNK5doris19IPAddressDictionary10get_columnERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt10shared_ptrIKNS_9IDataTypeEERKNS_3COWINS_7IColumnEE13immutable_ptrISG_EESE_ENK3$_1clIRKNS_11IDictionary14ColumnWithTypeINSO_20DictDataTypeString64EEESt17integral_constantIbLb1EESV_EEDaOT_T0_T1_
Unexecuted instantiation: ip_address_dictionary.cpp:_ZZNK5doris19IPAddressDictionary10get_columnERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt10shared_ptrIKNS_9IDataTypeEERKNS_3COWINS_7IColumnEE13immutable_ptrISG_EESE_ENK3$_1clIRKNS_11IDictionary14ColumnWithTypeINS_14DataTypeDateV2EEESt17integral_constantIbLb0EESV_EEDaOT_T0_T1_
Unexecuted instantiation: ip_address_dictionary.cpp:_ZZNK5doris19IPAddressDictionary10get_columnERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt10shared_ptrIKNS_9IDataTypeEERKNS_3COWINS_7IColumnEE13immutable_ptrISG_EESE_ENK3$_1clIRKNS_11IDictionary14ColumnWithTypeINS_14DataTypeDateV2EEESt17integral_constantIbLb0EESU_IbLb1EEEEDaOT_T0_T1_
Unexecuted instantiation: ip_address_dictionary.cpp:_ZZNK5doris19IPAddressDictionary10get_columnERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt10shared_ptrIKNS_9IDataTypeEERKNS_3COWINS_7IColumnEE13immutable_ptrISG_EESE_ENK3$_1clIRKNS_11IDictionary14ColumnWithTypeINS_14DataTypeDateV2EEESt17integral_constantIbLb1EESU_IbLb0EEEEDaOT_T0_T1_
Unexecuted instantiation: ip_address_dictionary.cpp:_ZZNK5doris19IPAddressDictionary10get_columnERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt10shared_ptrIKNS_9IDataTypeEERKNS_3COWINS_7IColumnEE13immutable_ptrISG_EESE_ENK3$_1clIRKNS_11IDictionary14ColumnWithTypeINS_14DataTypeDateV2EEESt17integral_constantIbLb1EESV_EEDaOT_T0_T1_
Unexecuted instantiation: ip_address_dictionary.cpp:_ZZNK5doris19IPAddressDictionary10get_columnERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt10shared_ptrIKNS_9IDataTypeEERKNS_3COWINS_7IColumnEE13immutable_ptrISG_EESE_ENK3$_1clIRKNS_11IDictionary14ColumnWithTypeINS_18DataTypeDateTimeV2EEESt17integral_constantIbLb0EESV_EEDaOT_T0_T1_
Unexecuted instantiation: ip_address_dictionary.cpp:_ZZNK5doris19IPAddressDictionary10get_columnERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt10shared_ptrIKNS_9IDataTypeEERKNS_3COWINS_7IColumnEE13immutable_ptrISG_EESE_ENK3$_1clIRKNS_11IDictionary14ColumnWithTypeINS_18DataTypeDateTimeV2EEESt17integral_constantIbLb0EESU_IbLb1EEEEDaOT_T0_T1_
Unexecuted instantiation: ip_address_dictionary.cpp:_ZZNK5doris19IPAddressDictionary10get_columnERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt10shared_ptrIKNS_9IDataTypeEERKNS_3COWINS_7IColumnEE13immutable_ptrISG_EESE_ENK3$_1clIRKNS_11IDictionary14ColumnWithTypeINS_18DataTypeDateTimeV2EEESt17integral_constantIbLb1EESU_IbLb0EEEEDaOT_T0_T1_
Unexecuted instantiation: ip_address_dictionary.cpp:_ZZNK5doris19IPAddressDictionary10get_columnERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt10shared_ptrIKNS_9IDataTypeEERKNS_3COWINS_7IColumnEE13immutable_ptrISG_EESE_ENK3$_1clIRKNS_11IDictionary14ColumnWithTypeINS_18DataTypeDateTimeV2EEESt17integral_constantIbLb1EESV_EEDaOT_T0_T1_
Unexecuted instantiation: ip_address_dictionary.cpp:_ZZNK5doris19IPAddressDictionary10get_columnERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt10shared_ptrIKNS_9IDataTypeEERKNS_3COWINS_7IColumnEE13immutable_ptrISG_EESE_ENK3$_1clIRKNS_11IDictionary14ColumnWithTypeINS_15DataTypeDecimalILNS_13PrimitiveTypeE28EEEEESt17integral_constantIbLb0EESX_EEDaOT_T0_T1_
Unexecuted instantiation: ip_address_dictionary.cpp:_ZZNK5doris19IPAddressDictionary10get_columnERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt10shared_ptrIKNS_9IDataTypeEERKNS_3COWINS_7IColumnEE13immutable_ptrISG_EESE_ENK3$_1clIRKNS_11IDictionary14ColumnWithTypeINS_15DataTypeDecimalILNS_13PrimitiveTypeE28EEEEESt17integral_constantIbLb0EESW_IbLb1EEEEDaOT_T0_T1_
Unexecuted instantiation: ip_address_dictionary.cpp:_ZZNK5doris19IPAddressDictionary10get_columnERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt10shared_ptrIKNS_9IDataTypeEERKNS_3COWINS_7IColumnEE13immutable_ptrISG_EESE_ENK3$_1clIRKNS_11IDictionary14ColumnWithTypeINS_15DataTypeDecimalILNS_13PrimitiveTypeE28EEEEESt17integral_constantIbLb1EESW_IbLb0EEEEDaOT_T0_T1_
Unexecuted instantiation: ip_address_dictionary.cpp:_ZZNK5doris19IPAddressDictionary10get_columnERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt10shared_ptrIKNS_9IDataTypeEERKNS_3COWINS_7IColumnEE13immutable_ptrISG_EESE_ENK3$_1clIRKNS_11IDictionary14ColumnWithTypeINS_15DataTypeDecimalILNS_13PrimitiveTypeE28EEEEESt17integral_constantIbLb1EESX_EEDaOT_T0_T1_
Unexecuted instantiation: ip_address_dictionary.cpp:_ZZNK5doris19IPAddressDictionary10get_columnERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt10shared_ptrIKNS_9IDataTypeEERKNS_3COWINS_7IColumnEE13immutable_ptrISG_EESE_ENK3$_1clIRKNS_11IDictionary14ColumnWithTypeINS_15DataTypeDecimalILNS_13PrimitiveTypeE29EEEEESt17integral_constantIbLb0EESX_EEDaOT_T0_T1_
Unexecuted instantiation: ip_address_dictionary.cpp:_ZZNK5doris19IPAddressDictionary10get_columnERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt10shared_ptrIKNS_9IDataTypeEERKNS_3COWINS_7IColumnEE13immutable_ptrISG_EESE_ENK3$_1clIRKNS_11IDictionary14ColumnWithTypeINS_15DataTypeDecimalILNS_13PrimitiveTypeE29EEEEESt17integral_constantIbLb0EESW_IbLb1EEEEDaOT_T0_T1_
Unexecuted instantiation: ip_address_dictionary.cpp:_ZZNK5doris19IPAddressDictionary10get_columnERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt10shared_ptrIKNS_9IDataTypeEERKNS_3COWINS_7IColumnEE13immutable_ptrISG_EESE_ENK3$_1clIRKNS_11IDictionary14ColumnWithTypeINS_15DataTypeDecimalILNS_13PrimitiveTypeE29EEEEESt17integral_constantIbLb1EESW_IbLb0EEEEDaOT_T0_T1_
Unexecuted instantiation: ip_address_dictionary.cpp:_ZZNK5doris19IPAddressDictionary10get_columnERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt10shared_ptrIKNS_9IDataTypeEERKNS_3COWINS_7IColumnEE13immutable_ptrISG_EESE_ENK3$_1clIRKNS_11IDictionary14ColumnWithTypeINS_15DataTypeDecimalILNS_13PrimitiveTypeE29EEEEESt17integral_constantIbLb1EESX_EEDaOT_T0_T1_
Unexecuted instantiation: ip_address_dictionary.cpp:_ZZNK5doris19IPAddressDictionary10get_columnERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt10shared_ptrIKNS_9IDataTypeEERKNS_3COWINS_7IColumnEE13immutable_ptrISG_EESE_ENK3$_1clIRKNS_11IDictionary14ColumnWithTypeINS_15DataTypeDecimalILNS_13PrimitiveTypeE30EEEEESt17integral_constantIbLb0EESX_EEDaOT_T0_T1_
Unexecuted instantiation: ip_address_dictionary.cpp:_ZZNK5doris19IPAddressDictionary10get_columnERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt10shared_ptrIKNS_9IDataTypeEERKNS_3COWINS_7IColumnEE13immutable_ptrISG_EESE_ENK3$_1clIRKNS_11IDictionary14ColumnWithTypeINS_15DataTypeDecimalILNS_13PrimitiveTypeE30EEEEESt17integral_constantIbLb0EESW_IbLb1EEEEDaOT_T0_T1_
Unexecuted instantiation: ip_address_dictionary.cpp:_ZZNK5doris19IPAddressDictionary10get_columnERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt10shared_ptrIKNS_9IDataTypeEERKNS_3COWINS_7IColumnEE13immutable_ptrISG_EESE_ENK3$_1clIRKNS_11IDictionary14ColumnWithTypeINS_15DataTypeDecimalILNS_13PrimitiveTypeE30EEEEESt17integral_constantIbLb1EESW_IbLb0EEEEDaOT_T0_T1_
Unexecuted instantiation: ip_address_dictionary.cpp:_ZZNK5doris19IPAddressDictionary10get_columnERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt10shared_ptrIKNS_9IDataTypeEERKNS_3COWINS_7IColumnEE13immutable_ptrISG_EESE_ENK3$_1clIRKNS_11IDictionary14ColumnWithTypeINS_15DataTypeDecimalILNS_13PrimitiveTypeE30EEEEESt17integral_constantIbLb1EESX_EEDaOT_T0_T1_
Unexecuted instantiation: ip_address_dictionary.cpp:_ZZNK5doris19IPAddressDictionary10get_columnERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt10shared_ptrIKNS_9IDataTypeEERKNS_3COWINS_7IColumnEE13immutable_ptrISG_EESE_ENK3$_1clIRKNS_11IDictionary14ColumnWithTypeINS_15DataTypeDecimalILNS_13PrimitiveTypeE35EEEEESt17integral_constantIbLb0EESX_EEDaOT_T0_T1_
Unexecuted instantiation: ip_address_dictionary.cpp:_ZZNK5doris19IPAddressDictionary10get_columnERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt10shared_ptrIKNS_9IDataTypeEERKNS_3COWINS_7IColumnEE13immutable_ptrISG_EESE_ENK3$_1clIRKNS_11IDictionary14ColumnWithTypeINS_15DataTypeDecimalILNS_13PrimitiveTypeE35EEEEESt17integral_constantIbLb0EESW_IbLb1EEEEDaOT_T0_T1_
Unexecuted instantiation: ip_address_dictionary.cpp:_ZZNK5doris19IPAddressDictionary10get_columnERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt10shared_ptrIKNS_9IDataTypeEERKNS_3COWINS_7IColumnEE13immutable_ptrISG_EESE_ENK3$_1clIRKNS_11IDictionary14ColumnWithTypeINS_15DataTypeDecimalILNS_13PrimitiveTypeE35EEEEESt17integral_constantIbLb1EESW_IbLb0EEEEDaOT_T0_T1_
Unexecuted instantiation: ip_address_dictionary.cpp:_ZZNK5doris19IPAddressDictionary10get_columnERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt10shared_ptrIKNS_9IDataTypeEERKNS_3COWINS_7IColumnEE13immutable_ptrISG_EESE_ENK3$_1clIRKNS_11IDictionary14ColumnWithTypeINS_15DataTypeDecimalILNS_13PrimitiveTypeE35EEEEESt17integral_constantIbLb1EESX_EEDaOT_T0_T1_
151
15
                value_data, make_bool_variant(null_key != nullptr),
152
15
                attribute_nullable_variant(attribute_index(attribute_name)));
153
15
    }
154
155
19
    return ColumnNullable::create(std::move(res_column), std::move(res_null));
156
19
}
157
158
187
IPv6 IPAddressDictionary::format_ipv6_cidr(const uint8_t* addr, uint8_t prefix) {
159
187
    if (prefix > IPV6_BINARY_LENGTH * 8U) {
160
0
        prefix = IPV6_BINARY_LENGTH * 8U;
161
0
    }
162
187
    IPv6 ipv6 = 0;
163
187
    apply_cidr_mask(reinterpret_cast<const char*>(addr), reinterpret_cast<char*>(&ipv6), prefix);
164
187
    return ipv6;
165
187
}
166
167
struct IPRecord {
168
    IPAddressCIDR ip_with_cidr; // IP address with CIDR notation
169
    size_t row;                 // Row index in the original data
170
171
    // Convert the IP address to IPv6 format
172
181
    IPv6 to_ipv6() const {
173
181
        auto origin_ipv6 = _to_ipv6();
174
181
        return IPAddressDictionary::format_ipv6_cidr(reinterpret_cast<const UInt8*>(&origin_ipv6),
175
181
                                                     prefix());
176
181
    }
177
178
    // Get the prefix length of the IP address
179
1.12k
    UInt8 prefix() const {
180
1.12k
        if (ip_with_cidr._address.as_v6()) {
181
462
            return ip_with_cidr._prefix;
182
462
        }
183
663
        return ip_with_cidr._prefix + 96;
184
1.12k
    }
185
186
private:
187
181
    IPv6 _to_ipv6() const {
188
181
        if (const auto* address = ip_with_cidr._address.as_v6()) {
189
4
            IPv6 ipv6;
190
4
            memcpy(reinterpret_cast<UInt8*>(&ipv6), address, sizeof(IPv6));
191
4
            return ipv6;
192
4
        }
193
194
177
        return ipv4_to_ipv6(ip_with_cidr._address.as_v4());
195
181
    }
196
};
197
198
void IPAddressDictionary::load_data(const ColumnPtr& key_column,
199
29
                                    const std::vector<ColumnPtr>& values_column) {
200
    // load att column
201
29
    load_values(values_column);
202
203
    // Construct an IP trie
204
205
    // Step 1: Import the CIDR data.
206
    // Record the parsed CIDR and the corresponding row from the original data.
207
29
    std::vector<IPRecord> ip_records;
208
29
    auto load_key_str = [&](const auto* str_column) {
209
121
        for (size_t i = 0; i < str_column->size(); i++) {
210
95
            auto ip_str = str_column->get_data_at(i);
211
95
            try {
212
95
                ip_records.push_back(IPRecord {parse_ip_with_cidr(ip_str), i});
213
95
            } catch (Exception& e) {
214
                // add data unqualified error tag to the error message
215
3
                throw Exception(e.code(), DICT_DATA_ERROR_TAG + e.message());
216
3
            }
217
95
        }
218
29
    };
ip_address_dictionary.cpp:_ZZN5doris19IPAddressDictionary9load_dataERKNS_3COWINS_7IColumnEE13immutable_ptrIS2_EERKSt6vectorIS5_SaIS5_EEENK3$_0clINS_9ColumnStrImEEEEDaPKT_
Line
Count
Source
208
1
    auto load_key_str = [&](const auto* str_column) {
209
19
        for (size_t i = 0; i < str_column->size(); i++) {
210
18
            auto ip_str = str_column->get_data_at(i);
211
18
            try {
212
18
                ip_records.push_back(IPRecord {parse_ip_with_cidr(ip_str), i});
213
18
            } catch (Exception& e) {
214
                // add data unqualified error tag to the error message
215
0
                throw Exception(e.code(), DICT_DATA_ERROR_TAG + e.message());
216
0
            }
217
18
        }
218
1
    };
ip_address_dictionary.cpp:_ZZN5doris19IPAddressDictionary9load_dataERKNS_3COWINS_7IColumnEE13immutable_ptrIS2_EERKSt6vectorIS5_SaIS5_EEENK3$_0clINS_9ColumnStrIjEEEEDaPKT_
Line
Count
Source
208
28
    auto load_key_str = [&](const auto* str_column) {
209
102
        for (size_t i = 0; i < str_column->size(); i++) {
210
77
            auto ip_str = str_column->get_data_at(i);
211
77
            try {
212
77
                ip_records.push_back(IPRecord {parse_ip_with_cidr(ip_str), i});
213
77
            } catch (Exception& e) {
214
                // add data unqualified error tag to the error message
215
3
                throw Exception(e.code(), DICT_DATA_ERROR_TAG + e.message());
216
3
            }
217
77
        }
218
28
    };
219
29
    if (key_column->is_column_string64()) {
220
1
        load_key_str(assert_cast<const ColumnString64*>(key_column.get()));
221
28
    } else {
222
28
        load_key_str(assert_cast<const ColumnString*>(key_column.get()));
223
28
    }
224
225
    // Step 2: Process IP data.
226
227
    // Step 2.1: Process all corresponding CIDRs as IPv6.
228
    // Sort them by {the value of IPv6, the prefix length of the CIDR in IPv6}.
229
289
    std::sort(ip_records.begin(), ip_records.end(), [&](const IPRecord& a, const IPRecord& b) {
230
289
        if (a.to_ipv6() == b.to_ipv6()) {
231
8
            return a.prefix() < b.prefix();
232
8
        }
233
281
        return a.to_ipv6() < b.to_ipv6();
234
289
    });
235
236
    // Step 2.2: Remove duplicate data.
237
29
    auto new_end = std::unique(ip_records.begin(), ip_records.end(),
238
69
                               [&](const IPRecord& a, const IPRecord& b) {
239
69
                                   return a.to_ipv6() == b.to_ipv6() && a.prefix() == b.prefix();
240
69
                               });
241
29
    ip_records.erase(new_end, ip_records.end());
242
243
29
    if (ip_records.size() < key_column->size()) {
244
4
        throw doris::Exception(
245
4
                ErrorCode::INVALID_ARGUMENT,
246
4
                DICT_DATA_ERROR_TAG + "The CIDR has duplicate data in IpAddressDictionary");
247
4
    }
248
249
    // Step 3: Process the data needed for the Trie.
250
    // You can treat ip_column, prefix_column, and origin_row_idx_column as a whole.
251
    // struct TrieNode {
252
    //     IPv6 ip;
253
    //     UInt8 prefix;
254
    //     size_t origin_row_idx;
255
    // };
256
84
    for (const auto& record : ip_records) {
257
84
        ip_column.push_back(record.to_ipv6());
258
84
        prefix_column.push_back(record.prefix());
259
84
        origin_row_idx_column.push_back(record.row);
260
84
    }
261
262
    // Step 4: Construct subnet relationships.
263
    // The CIDR at index i is a subnet of the CIDR at index parent_subnet[i], for example:
264
    // 192.168.0.0/24 [0]
265
    // ├── 192.168.0.0/25 [1]
266
    // │   ├── 192.168.0.0/26 [2]
267
    // │   └── 192.168.0.64/26 [3]
268
    // └── 192.168.0.128/25 [4]
269
    // parent_subnet[4] = 0
270
    // parent_subnet[3] = 1
271
    // parent_subnet[2] = 1
272
    // parent_subnet[1] = 0
273
    // parent_subnet[0] = 0 (itself)
274
275
25
    parent_subnet.resize(ip_records.size());
276
25
    std::stack<size_t> subnets_stack;
277
    // Use monotonic stack to build IP subnet relationships in trie structure
278
    // https://liuzhenglaichn.gitbook.io/algorithm/monotonic-stack
279
    // Note: The final structure may result in multiple trees rather than a single tree
280
109
    for (auto i = 0; i < ip_records.size(); i++) {
281
84
        parent_subnet[i] = i;
282
141
        while (!subnets_stack.empty()) {
283
86
            size_t pi = subnets_stack.top();
284
285
86
            auto cur_address_ip = ip_records[i].to_ipv6();
286
86
            const auto* addr = reinterpret_cast<UInt8*>(&cur_address_ip);
287
86
            auto parent_subnet_ip = ip_records[pi].to_ipv6();
288
86
            const auto* parent_addr = reinterpret_cast<UInt8*>(&parent_subnet_ip);
289
290
86
            bool is_mask_smaller = ip_records[pi].prefix() < ip_records[i].prefix();
291
86
            if (is_mask_smaller && match_ipv6_subnet(addr, parent_addr, ip_records[pi].prefix())) {
292
29
                parent_subnet[i] = pi;
293
29
                break;
294
29
            }
295
296
57
            subnets_stack.pop();
297
57
        }
298
84
        subnets_stack.push(i);
299
84
    }
300
25
}
301
302
79
IPAddressDictionary::RowIdxConstIter IPAddressDictionary::look_up_IP(const IPv6& target) const {
303
79
    if (origin_row_idx_column.empty()) {
304
0
        return ip_not_found();
305
0
    }
306
307
289
    auto comp = [&](IPv6 value, auto idx) -> bool { return value < ip_column[idx]; };
308
309
79
    auto range = std::ranges::views::iota(0ULL, origin_row_idx_column.size());
310
311
    // Query Step 1: First, use binary search to find a CIDR that is close to the target.
312
79
    auto found_it = std::ranges::upper_bound(range, target, comp);
313
314
79
    if (found_it == range.begin()) {
315
4
        return ip_not_found();
316
4
    }
317
318
75
    --found_it;
319
320
    // Query Step 2: Based on the subnet relationships, find the first matching CIDR.
321
85
    for (auto idx = *found_it;; idx = parent_subnet[idx]) {
322
85
        if (match_ipv6_subnet(reinterpret_cast<const UInt8*>(&target),
323
85
                              reinterpret_cast<const UInt8*>(&ip_column[idx]),
324
85
                              prefix_column[idx])) {
325
60
            return origin_row_idx_column.begin() + idx;
326
60
        }
327
25
        if (idx == parent_subnet[idx]) {
328
15
            return ip_not_found();
329
15
        }
330
25
    }
331
332
0
    return ip_not_found();
333
75
}
334
} // namespace doris