Coverage Report

Created: 2026-07-12 08:37

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
25
IPAddressDictionary::~IPAddressDictionary() {
44
25
    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
25
}
51
52
1.28k
size_t IPAddressDictionary::allocated_bytes() const {
53
5.12k
    auto vec_mem = [](const auto& vec) {
54
5.12k
        return vec.capacity() * sizeof(typename std::decay_t<decltype(vec)>::value_type);
55
5.12k
    };
ip_address_dictionary.cpp:_ZZNK5doris19IPAddressDictionary15allocated_bytesEvENK3$_0clISt6vectorIoSaIoEEEEDaRKT_
Line
Count
Source
53
1.28k
    auto vec_mem = [](const auto& vec) {
54
1.28k
        return vec.capacity() * sizeof(typename std::decay_t<decltype(vec)>::value_type);
55
1.28k
    };
ip_address_dictionary.cpp:_ZZNK5doris19IPAddressDictionary15allocated_bytesEvENK3$_0clISt6vectorIhSaIhEEEEDaRKT_
Line
Count
Source
53
1.28k
    auto vec_mem = [](const auto& vec) {
54
1.28k
        return vec.capacity() * sizeof(typename std::decay_t<decltype(vec)>::value_type);
55
1.28k
    };
ip_address_dictionary.cpp:_ZZNK5doris19IPAddressDictionary15allocated_bytesEvENK3$_0clISt6vectorImSaImEEEEDaRKT_
Line
Count
Source
53
2.56k
    auto vec_mem = [](const auto& vec) {
54
2.56k
        return vec.capacity() * sizeof(typename std::decay_t<decltype(vec)>::value_type);
55
2.56k
    };
56
1.28k
    return IDictionary::allocated_bytes() + vec_mem(ip_column) + vec_mem(prefix_column) +
57
1.28k
           vec_mem(origin_row_idx_column) + vec_mem(parent_subnet);
58
1.28k
}
59
60
ColumnPtr IPAddressDictionary::get_column(const std::string& attribute_name,
61
                                          const DataTypePtr& attribute_type,
62
                                          const ColumnPtr& key_column,
63
26
                                          const DataTypePtr& key_type) const {
64
26
    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
26
    if (key_type->get_primitive_type() != TYPE_IPV4 &&
70
26
        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
26
    const auto rows = key_column->size();
78
26
    MutableColumnPtr res_column = attribute_type->create_column();
79
26
    ColumnUInt8::MutablePtr res_null = ColumnUInt8::create(rows, false);
80
26
    auto& res_null_map = res_null->get_data();
81
26
    const auto& value_data = _values_data[attribute_index(attribute_name)];
82
83
26
    if (key_type->get_primitive_type() == TYPE_IPV6) {
84
        // input key column without nullable
85
7
        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
7
        const auto* null_key = check_and_get_column<ColumnNullable>(key_column.get());
88
7
        std::visit(
89
7
                [&](auto&& arg, auto key_is_nullable, auto value_is_nullable) {
90
7
                    using ValueDataType = std::decay_t<decltype(arg)>;
91
7
                    using OutputColumnType = ValueDataType::OutputColumnType;
92
7
                    auto* res_real_column = assert_cast<OutputColumnType*>(res_column.get());
93
7
                    const auto* value_column = arg.get();
94
7
                    const auto* value_null_map = arg.get_null_map();
95
52
                    for (size_t i = 0; i < rows; i++) {
96
43
                        if constexpr (key_is_nullable) {
97
8
                            if (null_key->is_null_at(i)) {
98
                                // if input key is null, set the result column to null
99
2
                                res_real_column->insert_default();
100
2
                                res_null_map[i] = true;
101
2
                                continue;
102
2
                            }
103
8
                        }
104
6
                        auto it = look_up_IP(ipv6_column->get_element(i));
105
43
                        if (it == ip_not_found()) {
106
                            // if input key is not found, set the result column to null
107
4
                            res_real_column->insert_default();
108
4
                            res_null_map[i] = true;
109
39
                        } else {
110
39
                            const auto idx = *it;
111
39
                            set_value_data<value_is_nullable>(res_real_column, res_null_map[i],
112
39
                                                              value_column, value_null_map, idx);
113
39
                        }
114
43
                    }
115
7
                },
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
2
                [&](auto&& arg, auto key_is_nullable, auto value_is_nullable) {
90
2
                    using ValueDataType = std::decay_t<decltype(arg)>;
91
2
                    using OutputColumnType = ValueDataType::OutputColumnType;
92
2
                    auto* res_real_column = assert_cast<OutputColumnType*>(res_column.get());
93
2
                    const auto* value_column = arg.get();
94
2
                    const auto* value_null_map = arg.get_null_map();
95
8
                    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
6
                        auto it = look_up_IP(ipv6_column->get_element(i));
105
6
                        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
4
                        } else {
110
4
                            const auto idx = *it;
111
4
                            set_value_data<value_is_nullable>(res_real_column, res_null_map[i],
112
4
                                                              value_column, value_null_map, idx);
113
4
                        }
114
6
                    }
115
2
                },
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
2
                [&](auto&& arg, auto key_is_nullable, auto value_is_nullable) {
90
2
                    using ValueDataType = std::decay_t<decltype(arg)>;
91
2
                    using OutputColumnType = ValueDataType::OutputColumnType;
92
2
                    auto* res_real_column = assert_cast<OutputColumnType*>(res_column.get());
93
2
                    const auto* value_column = arg.get();
94
2
                    const auto* value_null_map = arg.get_null_map();
95
12
                    for (size_t i = 0; i < rows; i++) {
96
8
                        if constexpr (key_is_nullable) {
97
8
                            if (null_key->is_null_at(i)) {
98
                                // if input key is null, set the result column to null
99
2
                                res_real_column->insert_default();
100
2
                                res_null_map[i] = true;
101
2
                                continue;
102
2
                            }
103
8
                        }
104
6
                        auto it = look_up_IP(ipv6_column->get_element(i));
105
8
                        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
6
                        } else {
110
6
                            const auto idx = *it;
111
6
                            set_value_data<value_is_nullable>(res_real_column, res_null_map[i],
112
6
                                                              value_column, value_null_map, idx);
113
6
                        }
114
8
                    }
115
2
                },
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
2
                [&](auto&& arg, auto key_is_nullable, auto value_is_nullable) {
90
2
                    using ValueDataType = std::decay_t<decltype(arg)>;
91
2
                    using OutputColumnType = ValueDataType::OutputColumnType;
92
2
                    auto* res_real_column = assert_cast<OutputColumnType*>(res_column.get());
93
2
                    const auto* value_column = arg.get();
94
2
                    const auto* value_null_map = arg.get_null_map();
95
30
                    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
28
                        auto it = look_up_IP(ipv6_column->get_element(i));
105
28
                        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
28
                        } else {
110
28
                            const auto idx = *it;
111
28
                            set_value_data<value_is_nullable>(res_real_column, res_null_map[i],
112
28
                                                              value_column, value_null_map, idx);
113
28
                        }
114
28
                    }
115
2
                },
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
7
                value_data, make_bool_variant(null_key != nullptr),
117
7
                attribute_nullable_variant(attribute_index(attribute_name)));
118
19
    } else {
119
        // input key column without nullable
120
19
        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
19
        const auto* null_key = check_and_get_column<ColumnNullable>(key_column.get());
123
19
        std::visit(
124
19
                [&](auto&& arg, auto key_is_nullable, auto value_is_nullable) {
125
19
                    using ValueDataType = std::decay_t<decltype(arg)>;
126
19
                    using OutputColumnType = ValueDataType::OutputColumnType;
127
19
                    auto* res_real_column = assert_cast<OutputColumnType*>(res_column.get());
128
19
                    const auto* value_column = arg.get();
129
19
                    const auto* value_null_map = arg.get_null_map();
130
131
                    for (size_t i = 0; i < rows; i++) {
131
109
                        if constexpr (key_is_nullable) {
132
9
                            if (null_key->is_null_at(i)) {
133
                                // if input key is null, set the result column to null
134
3
                                res_real_column->insert_default();
135
3
                                res_null_map[i] = true;
136
3
                                continue;
137
3
                            }
138
9
                        }
139
6
                        auto it = look_up_IP(ipv4_to_ipv6(ipv4_column->get_element(i)));
140
109
                        if (it == ip_not_found()) {
141
                            // if input key is not found, set the result column to null
142
31
                            res_real_column->insert_default();
143
31
                            res_null_map[i] = true;
144
78
                        } else {
145
78
                            const auto idx = *it;
146
78
                            set_value_data<value_is_nullable>(res_real_column, res_null_map[i],
147
78
                                                              value_column, value_null_map, idx);
148
78
                        }
149
109
                    }
150
19
                },
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
2
                [&](auto&& arg, auto key_is_nullable, auto value_is_nullable) {
125
2
                    using ValueDataType = std::decay_t<decltype(arg)>;
126
2
                    using OutputColumnType = ValueDataType::OutputColumnType;
127
2
                    auto* res_real_column = assert_cast<OutputColumnType*>(res_column.get());
128
2
                    const auto* value_column = arg.get();
129
2
                    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
6
                        auto it = look_up_IP(ipv4_to_ipv6(ipv4_column->get_element(i)));
140
6
                        if (it == ip_not_found()) {
141
                            // if input key is not found, set the result column to null
142
2
                            res_real_column->insert_default();
143
2
                            res_null_map[i] = true;
144
4
                        } else {
145
4
                            const auto idx = *it;
146
4
                            set_value_data<value_is_nullable>(res_real_column, res_null_map[i],
147
4
                                                              value_column, value_null_map, idx);
148
4
                        }
149
6
                    }
150
2
                },
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
2
                [&](auto&& arg, auto key_is_nullable, auto value_is_nullable) {
125
2
                    using ValueDataType = std::decay_t<decltype(arg)>;
126
2
                    using OutputColumnType = ValueDataType::OutputColumnType;
127
2
                    auto* res_real_column = assert_cast<OutputColumnType*>(res_column.get());
128
2
                    const auto* value_column = arg.get();
129
2
                    const auto* value_null_map = arg.get_null_map();
130
12
                    for (size_t i = 0; i < rows; i++) {
131
8
                        if constexpr (key_is_nullable) {
132
8
                            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
8
                        }
139
6
                        auto it = look_up_IP(ipv4_to_ipv6(ipv4_column->get_element(i)));
140
8
                        if (it == ip_not_found()) {
141
                            // if input key is not found, set the result column to null
142
2
                            res_real_column->insert_default();
143
2
                            res_null_map[i] = true;
144
6
                        } else {
145
6
                            const auto idx = *it;
146
6
                            set_value_data<value_is_nullable>(res_real_column, res_null_map[i],
147
6
                                                              value_column, value_null_map, idx);
148
6
                        }
149
8
                    }
150
2
                },
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
2
                [&](auto&& arg, auto key_is_nullable, auto value_is_nullable) {
125
2
                    using ValueDataType = std::decay_t<decltype(arg)>;
126
2
                    using OutputColumnType = ValueDataType::OutputColumnType;
127
2
                    auto* res_real_column = assert_cast<OutputColumnType*>(res_column.get());
128
2
                    const auto* value_column = arg.get();
129
2
                    const auto* value_null_map = arg.get_null_map();
130
44
                    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
42
                        auto it = look_up_IP(ipv4_to_ipv6(ipv4_column->get_element(i)));
140
42
                        if (it == ip_not_found()) {
141
                            // if input key is not found, set the result column to null
142
12
                            res_real_column->insert_default();
143
12
                            res_null_map[i] = true;
144
30
                        } else {
145
30
                            const auto idx = *it;
146
30
                            set_value_data<value_is_nullable>(res_real_column, res_null_map[i],
147
30
                                                              value_column, value_null_map, idx);
148
30
                        }
149
42
                    }
150
2
                },
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
2
                [&](auto&& arg, auto key_is_nullable, auto value_is_nullable) {
125
2
                    using ValueDataType = std::decay_t<decltype(arg)>;
126
2
                    using OutputColumnType = ValueDataType::OutputColumnType;
127
2
                    auto* res_real_column = assert_cast<OutputColumnType*>(res_column.get());
128
2
                    const auto* value_column = arg.get();
129
2
                    const auto* value_null_map = arg.get_null_map();
130
44
                    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
42
                        auto it = look_up_IP(ipv4_to_ipv6(ipv4_column->get_element(i)));
140
42
                        if (it == ip_not_found()) {
141
                            // if input key is not found, set the result column to null
142
12
                            res_real_column->insert_default();
143
12
                            res_null_map[i] = true;
144
30
                        } else {
145
30
                            const auto idx = *it;
146
30
                            set_value_data<value_is_nullable>(res_real_column, res_null_map[i],
147
30
                                                              value_column, value_null_map, idx);
148
30
                        }
149
42
                    }
150
2
                },
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
19
                value_data, make_bool_variant(null_key != nullptr),
152
19
                attribute_nullable_variant(attribute_index(attribute_name)));
153
19
    }
154
155
26
    return ColumnNullable::create(std::move(res_column), std::move(res_null));
156
26
}
157
158
201
IPv6 IPAddressDictionary::format_ipv6_cidr(const uint8_t* addr, uint8_t prefix) {
159
201
    if (prefix > IPV6_BINARY_LENGTH * 8U) {
160
0
        prefix = IPV6_BINARY_LENGTH * 8U;
161
0
    }
162
201
    IPv6 ipv6 = 0;
163
201
    apply_cidr_mask(reinterpret_cast<const char*>(addr), reinterpret_cast<char*>(&ipv6), prefix);
164
201
    return ipv6;
165
201
}
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
189
    IPv6 to_ipv6() const {
173
189
        auto origin_ipv6 = _to_ipv6();
174
189
        return IPAddressDictionary::format_ipv6_cidr(reinterpret_cast<const UInt8*>(&origin_ipv6),
175
189
                                                     prefix());
176
189
    }
177
178
    // Get the prefix length of the IP address
179
1.98k
    UInt8 prefix() const {
180
1.98k
        if (ip_with_cidr._address.as_v6()) {
181
916
            return ip_with_cidr._prefix;
182
916
        }
183
1.07k
        return ip_with_cidr._prefix + 96;
184
1.98k
    }
185
186
private:
187
189
    IPv6 _to_ipv6() const {
188
189
        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
185
        return ipv4_to_ipv6(ip_with_cidr._address.as_v4());
195
189
    }
196
};
197
198
void IPAddressDictionary::load_data(const ColumnPtr& key_column,
199
33
                                    const std::vector<ColumnPtr>& values_column) {
200
    // load att column
201
33
    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
33
    std::vector<IPRecord> ip_records;
208
33
    auto load_key_str = [&](const auto* str_column) {
209
180
        for (size_t i = 0; i < str_column->size(); i++) {
210
150
            auto ip_str = str_column->get_data_at(i);
211
150
            try {
212
150
                ip_records.push_back(IPRecord {parse_ip_with_cidr(ip_str), i});
213
150
            } 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
150
        }
218
33
    };
ip_address_dictionary.cpp:_ZZN5doris19IPAddressDictionary9load_dataERKNS_3COWINS_7IColumnEE13immutable_ptrIS2_EERKSt6vectorIS5_SaIS5_EEENK3$_0clINS_9ColumnStrImEEEEDaPKT_
Line
Count
Source
208
2
    auto load_key_str = [&](const auto* str_column) {
209
38
        for (size_t i = 0; i < str_column->size(); i++) {
210
36
            auto ip_str = str_column->get_data_at(i);
211
36
            try {
212
36
                ip_records.push_back(IPRecord {parse_ip_with_cidr(ip_str), i});
213
36
            } 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
36
        }
218
2
    };
ip_address_dictionary.cpp:_ZZN5doris19IPAddressDictionary9load_dataERKNS_3COWINS_7IColumnEE13immutable_ptrIS2_EERKSt6vectorIS5_SaIS5_EEENK3$_0clINS_9ColumnStrIjEEEEDaPKT_
Line
Count
Source
208
31
    auto load_key_str = [&](const auto* str_column) {
209
142
        for (size_t i = 0; i < str_column->size(); i++) {
210
114
            auto ip_str = str_column->get_data_at(i);
211
114
            try {
212
114
                ip_records.push_back(IPRecord {parse_ip_with_cidr(ip_str), i});
213
114
            } 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
114
        }
218
31
    };
219
33
    if (key_column->is_column_string64()) {
220
2
        load_key_str(assert_cast<const ColumnString64*>(key_column.get()));
221
31
    } else {
222
31
        load_key_str(assert_cast<const ColumnString*>(key_column.get()));
223
31
    }
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
554
    std::sort(ip_records.begin(), ip_records.end(), [&](const IPRecord& a, const IPRecord& b) {
230
554
        if (a.to_ipv6() == b.to_ipv6()) {
231
8
            return a.prefix() < b.prefix();
232
8
        }
233
546
        return a.to_ipv6() < b.to_ipv6();
234
554
    });
235
236
    // Step 2.2: Remove duplicate data.
237
33
    auto new_end = std::unique(ip_records.begin(), ip_records.end(),
238
120
                               [&](const IPRecord& a, const IPRecord& b) {
239
120
                                   return a.to_ipv6() == b.to_ipv6() && a.prefix() == b.prefix();
240
120
                               });
241
33
    ip_records.erase(new_end, ip_records.end());
242
243
33
    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
139
    for (const auto& record : ip_records) {
257
139
        ip_column.push_back(record.to_ipv6());
258
139
        prefix_column.push_back(record.prefix());
259
139
        origin_row_idx_column.push_back(record.row);
260
139
    }
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
29
    parent_subnet.resize(ip_records.size());
276
29
    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
168
    for (auto i = 0; i < ip_records.size(); i++) {
281
139
        parent_subnet[i] = i;
282
246
        while (!subnets_stack.empty()) {
283
158
            size_t pi = subnets_stack.top();
284
285
158
            auto cur_address_ip = ip_records[i].to_ipv6();
286
158
            const auto* addr = reinterpret_cast<UInt8*>(&cur_address_ip);
287
158
            auto parent_subnet_ip = ip_records[pi].to_ipv6();
288
158
            const auto* parent_addr = reinterpret_cast<UInt8*>(&parent_subnet_ip);
289
290
158
            bool is_mask_smaller = ip_records[pi].prefix() < ip_records[i].prefix();
291
158
            if (is_mask_smaller && match_ipv6_subnet(addr, parent_addr, ip_records[pi].prefix())) {
292
51
                parent_subnet[i] = pi;
293
51
                break;
294
51
            }
295
296
107
            subnets_stack.pop();
297
107
        }
298
139
        subnets_stack.push(i);
299
139
    }
300
29
}
301
302
147
IPAddressDictionary::RowIdxConstIter IPAddressDictionary::look_up_IP(const IPv6& target) const {
303
147
    if (origin_row_idx_column.empty()) {
304
0
        return ip_not_found();
305
0
    }
306
307
560
    auto comp = [&](IPv6 value, auto idx) -> bool { return value < ip_column[idx]; };
308
309
147
    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
147
    auto found_it = std::ranges::upper_bound(range, target, comp);
313
314
147
    if (found_it == range.begin()) {
315
6
        return ip_not_found();
316
6
    }
317
318
141
    --found_it;
319
320
    // Query Step 2: Based on the subnet relationships, find the first matching CIDR.
321
161
    for (auto idx = *found_it;; idx = parent_subnet[idx]) {
322
161
        if (match_ipv6_subnet(reinterpret_cast<const UInt8*>(&target),
323
161
                              reinterpret_cast<const UInt8*>(&ip_column[idx]),
324
161
                              prefix_column[idx])) {
325
112
            return origin_row_idx_column.begin() + idx;
326
112
        }
327
49
        if (idx == parent_subnet[idx]) {
328
29
            return ip_not_found();
329
29
        }
330
49
    }
331
332
0
    return ip_not_found();
333
141
}
334
} // namespace doris