Coverage Report

Created: 2026-03-13 09: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
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.64k
size_t IPAddressDictionary::allocated_bytes() const {
53
6.57k
    auto vec_mem = [](const auto& vec) {
54
6.57k
        return vec.capacity() * sizeof(typename std::decay_t<decltype(vec)>::value_type);
55
6.57k
    };
ip_address_dictionary.cpp:_ZZNK5doris19IPAddressDictionary15allocated_bytesEvENK3$_0clISt6vectorIoSaIoEEEEDaRKT_
Line
Count
Source
53
1.64k
    auto vec_mem = [](const auto& vec) {
54
1.64k
        return vec.capacity() * sizeof(typename std::decay_t<decltype(vec)>::value_type);
55
1.64k
    };
ip_address_dictionary.cpp:_ZZNK5doris19IPAddressDictionary15allocated_bytesEvENK3$_0clISt6vectorIhSaIhEEEEDaRKT_
Line
Count
Source
53
1.64k
    auto vec_mem = [](const auto& vec) {
54
1.64k
        return vec.capacity() * sizeof(typename std::decay_t<decltype(vec)>::value_type);
55
1.64k
    };
ip_address_dictionary.cpp:_ZZNK5doris19IPAddressDictionary15allocated_bytesEvENK3$_0clISt6vectorImSaImEEEEDaRKT_
Line
Count
Source
53
3.28k
    auto vec_mem = [](const auto& vec) {
54
3.28k
        return vec.capacity() * sizeof(typename std::decay_t<decltype(vec)>::value_type);
55
3.28k
    };
56
1.64k
    return IDictionary::allocated_bytes() + vec_mem(ip_column) + vec_mem(prefix_column) +
57
1.64k
           vec_mem(origin_row_idx_column) + vec_mem(parent_subnet);
58
1.64k
}
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 ColumnNullable* null_key =
88
4
                key_column->is_nullable() ? assert_cast<const ColumnNullable*>(key_column.get())
89
4
                                          : nullptr;
90
4
        std::visit(
91
4
                [&](auto&& arg, auto key_is_nullable, auto value_is_nullable) {
92
4
                    using ValueDataType = std::decay_t<decltype(arg)>;
93
4
                    using OutputColumnType = ValueDataType::OutputColumnType;
94
4
                    auto* res_real_column = assert_cast<OutputColumnType*>(res_column.get());
95
4
                    const auto* value_column = arg.get();
96
4
                    const auto* value_null_map = arg.get_null_map();
97
27
                    for (size_t i = 0; i < rows; i++) {
98
22
                        if constexpr (key_is_nullable) {
99
4
                            if (null_key->is_null_at(i)) {
100
                                // if input key is null, set the result column to null
101
1
                                res_real_column->insert_default();
102
1
                                res_null_map[i] = true;
103
1
                                continue;
104
1
                            }
105
4
                        }
106
3
                        auto it = look_up_IP(ipv6_column->get_element(i));
107
22
                        if (it == ip_not_found()) {
108
                            // if input key is not found, set the result column to null
109
2
                            res_real_column->insert_default();
110
2
                            res_null_map[i] = true;
111
20
                        } else {
112
20
                            const auto idx = *it;
113
20
                            set_value_data<value_is_nullable>(res_real_column, res_null_map[i],
114
20
                                                              value_column, value_null_map, idx);
115
20
                        }
116
22
                    }
117
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
91
1
                [&](auto&& arg, auto key_is_nullable, auto value_is_nullable) {
92
1
                    using ValueDataType = std::decay_t<decltype(arg)>;
93
1
                    using OutputColumnType = ValueDataType::OutputColumnType;
94
1
                    auto* res_real_column = assert_cast<OutputColumnType*>(res_column.get());
95
1
                    const auto* value_column = arg.get();
96
1
                    const auto* value_null_map = arg.get_null_map();
97
4
                    for (size_t i = 0; i < rows; i++) {
98
                        if constexpr (key_is_nullable) {
99
                            if (null_key->is_null_at(i)) {
100
                                // if input key is null, set the result column to null
101
                                res_real_column->insert_default();
102
                                res_null_map[i] = true;
103
                                continue;
104
                            }
105
                        }
106
3
                        auto it = look_up_IP(ipv6_column->get_element(i));
107
3
                        if (it == ip_not_found()) {
108
                            // if input key is not found, set the result column to null
109
1
                            res_real_column->insert_default();
110
1
                            res_null_map[i] = true;
111
2
                        } else {
112
2
                            const auto idx = *it;
113
2
                            set_value_data<value_is_nullable>(res_real_column, res_null_map[i],
114
2
                                                              value_column, value_null_map, idx);
115
2
                        }
116
3
                    }
117
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
91
1
                [&](auto&& arg, auto key_is_nullable, auto value_is_nullable) {
92
1
                    using ValueDataType = std::decay_t<decltype(arg)>;
93
1
                    using OutputColumnType = ValueDataType::OutputColumnType;
94
1
                    auto* res_real_column = assert_cast<OutputColumnType*>(res_column.get());
95
1
                    const auto* value_column = arg.get();
96
1
                    const auto* value_null_map = arg.get_null_map();
97
6
                    for (size_t i = 0; i < rows; i++) {
98
4
                        if constexpr (key_is_nullable) {
99
4
                            if (null_key->is_null_at(i)) {
100
                                // if input key is null, set the result column to null
101
1
                                res_real_column->insert_default();
102
1
                                res_null_map[i] = true;
103
1
                                continue;
104
1
                            }
105
4
                        }
106
3
                        auto it = look_up_IP(ipv6_column->get_element(i));
107
4
                        if (it == ip_not_found()) {
108
                            // if input key is not found, set the result column to null
109
1
                            res_real_column->insert_default();
110
1
                            res_null_map[i] = true;
111
3
                        } else {
112
3
                            const auto idx = *it;
113
3
                            set_value_data<value_is_nullable>(res_real_column, res_null_map[i],
114
3
                                                              value_column, value_null_map, idx);
115
3
                        }
116
4
                    }
117
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
91
1
                [&](auto&& arg, auto key_is_nullable, auto value_is_nullable) {
92
1
                    using ValueDataType = std::decay_t<decltype(arg)>;
93
1
                    using OutputColumnType = ValueDataType::OutputColumnType;
94
1
                    auto* res_real_column = assert_cast<OutputColumnType*>(res_column.get());
95
1
                    const auto* value_column = arg.get();
96
1
                    const auto* value_null_map = arg.get_null_map();
97
15
                    for (size_t i = 0; i < rows; i++) {
98
                        if constexpr (key_is_nullable) {
99
                            if (null_key->is_null_at(i)) {
100
                                // if input key is null, set the result column to null
101
                                res_real_column->insert_default();
102
                                res_null_map[i] = true;
103
                                continue;
104
                            }
105
                        }
106
14
                        auto it = look_up_IP(ipv6_column->get_element(i));
107
14
                        if (it == ip_not_found()) {
108
                            // if input key is not found, set the result column to null
109
0
                            res_real_column->insert_default();
110
0
                            res_null_map[i] = true;
111
14
                        } else {
112
14
                            const auto idx = *it;
113
14
                            set_value_data<value_is_nullable>(res_real_column, res_null_map[i],
114
14
                                                              value_column, value_null_map, idx);
115
14
                        }
116
14
                    }
117
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
91
1
                [&](auto&& arg, auto key_is_nullable, auto value_is_nullable) {
92
1
                    using ValueDataType = std::decay_t<decltype(arg)>;
93
1
                    using OutputColumnType = ValueDataType::OutputColumnType;
94
1
                    auto* res_real_column = assert_cast<OutputColumnType*>(res_column.get());
95
1
                    const auto* value_column = arg.get();
96
1
                    const auto* value_null_map = arg.get_null_map();
97
2
                    for (size_t i = 0; i < rows; i++) {
98
                        if constexpr (key_is_nullable) {
99
                            if (null_key->is_null_at(i)) {
100
                                // if input key is null, set the result column to null
101
                                res_real_column->insert_default();
102
                                res_null_map[i] = true;
103
                                continue;
104
                            }
105
                        }
106
1
                        auto it = look_up_IP(ipv6_column->get_element(i));
107
1
                        if (it == ip_not_found()) {
108
                            // if input key is not found, set the result column to null
109
0
                            res_real_column->insert_default();
110
0
                            res_null_map[i] = true;
111
1
                        } else {
112
1
                            const auto idx = *it;
113
1
                            set_value_data<value_is_nullable>(res_real_column, res_null_map[i],
114
1
                                                              value_column, value_null_map, idx);
115
1
                        }
116
1
                    }
117
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_
118
4
                value_data, make_bool_variant(null_key != nullptr),
119
4
                attribute_nullable_variant(attribute_index(attribute_name)));
120
15
    } else {
121
        // input key column without nullable
122
15
        const auto* ipv4_column = assert_cast<const ColumnIPv4*>(remove_nullable(key_column).get());
123
        // if input key column is nullable, will not be null
124
15
        const ColumnNullable* null_key =
125
15
                key_column->is_nullable() ? assert_cast<const ColumnNullable*>(key_column.get())
126
15
                                          : nullptr;
127
15
        std::visit(
128
15
                [&](auto&& arg, auto key_is_nullable, auto value_is_nullable) {
129
15
                    using ValueDataType = std::decay_t<decltype(arg)>;
130
15
                    using OutputColumnType = ValueDataType::OutputColumnType;
131
15
                    auto* res_real_column = assert_cast<OutputColumnType*>(res_column.get());
132
15
                    const auto* value_column = arg.get();
133
15
                    const auto* value_null_map = arg.get_null_map();
134
77
                    for (size_t i = 0; i < rows; i++) {
135
60
                        if constexpr (key_is_nullable) {
136
5
                            if (null_key->is_null_at(i)) {
137
                                // if input key is null, set the result column to null
138
2
                                res_real_column->insert_default();
139
2
                                res_null_map[i] = true;
140
2
                                continue;
141
2
                            }
142
5
                        }
143
3
                        auto it = look_up_IP(ipv4_to_ipv6(ipv4_column->get_element(i)));
144
60
                        if (it == ip_not_found()) {
145
                            // if input key is not found, set the result column to null
146
17
                            res_real_column->insert_default();
147
17
                            res_null_map[i] = true;
148
43
                        } else {
149
43
                            const auto idx = *it;
150
43
                            set_value_data<value_is_nullable>(res_real_column, res_null_map[i],
151
43
                                                              value_column, value_null_map, idx);
152
43
                        }
153
60
                    }
154
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
128
4
                [&](auto&& arg, auto key_is_nullable, auto value_is_nullable) {
129
4
                    using ValueDataType = std::decay_t<decltype(arg)>;
130
4
                    using OutputColumnType = ValueDataType::OutputColumnType;
131
4
                    auto* res_real_column = assert_cast<OutputColumnType*>(res_column.get());
132
4
                    const auto* value_column = arg.get();
133
4
                    const auto* value_null_map = arg.get_null_map();
134
8
                    for (size_t i = 0; i < rows; i++) {
135
                        if constexpr (key_is_nullable) {
136
                            if (null_key->is_null_at(i)) {
137
                                // if input key is null, set the result column to null
138
                                res_real_column->insert_default();
139
                                res_null_map[i] = true;
140
                                continue;
141
                            }
142
                        }
143
4
                        auto it = look_up_IP(ipv4_to_ipv6(ipv4_column->get_element(i)));
144
4
                        if (it == ip_not_found()) {
145
                            // if input key is not found, set the result column to null
146
1
                            res_real_column->insert_default();
147
1
                            res_null_map[i] = true;
148
3
                        } else {
149
3
                            const auto idx = *it;
150
3
                            set_value_data<value_is_nullable>(res_real_column, res_null_map[i],
151
3
                                                              value_column, value_null_map, idx);
152
3
                        }
153
4
                    }
154
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
128
1
                [&](auto&& arg, auto key_is_nullable, auto value_is_nullable) {
129
1
                    using ValueDataType = std::decay_t<decltype(arg)>;
130
1
                    using OutputColumnType = ValueDataType::OutputColumnType;
131
1
                    auto* res_real_column = assert_cast<OutputColumnType*>(res_column.get());
132
1
                    const auto* value_column = arg.get();
133
1
                    const auto* value_null_map = arg.get_null_map();
134
4
                    for (size_t i = 0; i < rows; i++) {
135
                        if constexpr (key_is_nullable) {
136
                            if (null_key->is_null_at(i)) {
137
                                // if input key is null, set the result column to null
138
                                res_real_column->insert_default();
139
                                res_null_map[i] = true;
140
                                continue;
141
                            }
142
                        }
143
3
                        auto it = look_up_IP(ipv4_to_ipv6(ipv4_column->get_element(i)));
144
3
                        if (it == ip_not_found()) {
145
                            // if input key is not found, set the result column to null
146
1
                            res_real_column->insert_default();
147
1
                            res_null_map[i] = true;
148
2
                        } else {
149
2
                            const auto idx = *it;
150
2
                            set_value_data<value_is_nullable>(res_real_column, res_null_map[i],
151
2
                                                              value_column, value_null_map, idx);
152
2
                        }
153
3
                    }
154
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
128
1
                [&](auto&& arg, auto key_is_nullable, auto value_is_nullable) {
129
1
                    using ValueDataType = std::decay_t<decltype(arg)>;
130
1
                    using OutputColumnType = ValueDataType::OutputColumnType;
131
1
                    auto* res_real_column = assert_cast<OutputColumnType*>(res_column.get());
132
1
                    const auto* value_column = arg.get();
133
1
                    const auto* value_null_map = arg.get_null_map();
134
6
                    for (size_t i = 0; i < rows; i++) {
135
4
                        if constexpr (key_is_nullable) {
136
4
                            if (null_key->is_null_at(i)) {
137
                                // if input key is null, set the result column to null
138
1
                                res_real_column->insert_default();
139
1
                                res_null_map[i] = true;
140
1
                                continue;
141
1
                            }
142
4
                        }
143
3
                        auto it = look_up_IP(ipv4_to_ipv6(ipv4_column->get_element(i)));
144
4
                        if (it == ip_not_found()) {
145
                            // if input key is not found, set the result column to null
146
1
                            res_real_column->insert_default();
147
1
                            res_null_map[i] = true;
148
3
                        } else {
149
3
                            const auto idx = *it;
150
3
                            set_value_data<value_is_nullable>(res_real_column, res_null_map[i],
151
3
                                                              value_column, value_null_map, idx);
152
3
                        }
153
4
                    }
154
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
128
1
                [&](auto&& arg, auto key_is_nullable, auto value_is_nullable) {
129
1
                    using ValueDataType = std::decay_t<decltype(arg)>;
130
1
                    using OutputColumnType = ValueDataType::OutputColumnType;
131
1
                    auto* res_real_column = assert_cast<OutputColumnType*>(res_column.get());
132
1
                    const auto* value_column = arg.get();
133
1
                    const auto* value_null_map = arg.get_null_map();
134
22
                    for (size_t i = 0; i < rows; i++) {
135
                        if constexpr (key_is_nullable) {
136
                            if (null_key->is_null_at(i)) {
137
                                // if input key is null, set the result column to null
138
                                res_real_column->insert_default();
139
                                res_null_map[i] = true;
140
                                continue;
141
                            }
142
                        }
143
21
                        auto it = look_up_IP(ipv4_to_ipv6(ipv4_column->get_element(i)));
144
21
                        if (it == ip_not_found()) {
145
                            // if input key is not found, set the result column to null
146
6
                            res_real_column->insert_default();
147
6
                            res_null_map[i] = true;
148
15
                        } else {
149
15
                            const auto idx = *it;
150
15
                            set_value_data<value_is_nullable>(res_real_column, res_null_map[i],
151
15
                                                              value_column, value_null_map, idx);
152
15
                        }
153
21
                    }
154
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
128
3
                [&](auto&& arg, auto key_is_nullable, auto value_is_nullable) {
129
3
                    using ValueDataType = std::decay_t<decltype(arg)>;
130
3
                    using OutputColumnType = ValueDataType::OutputColumnType;
131
3
                    auto* res_real_column = assert_cast<OutputColumnType*>(res_column.get());
132
3
                    const auto* value_column = arg.get();
133
3
                    const auto* value_null_map = arg.get_null_map();
134
6
                    for (size_t i = 0; i < rows; i++) {
135
                        if constexpr (key_is_nullable) {
136
                            if (null_key->is_null_at(i)) {
137
                                // if input key is null, set the result column to null
138
                                res_real_column->insert_default();
139
                                res_null_map[i] = true;
140
                                continue;
141
                            }
142
                        }
143
3
                        auto it = look_up_IP(ipv4_to_ipv6(ipv4_column->get_element(i)));
144
3
                        if (it == ip_not_found()) {
145
                            // if input key is not found, set the result column to null
146
1
                            res_real_column->insert_default();
147
1
                            res_null_map[i] = true;
148
2
                        } else {
149
2
                            const auto idx = *it;
150
2
                            set_value_data<value_is_nullable>(res_real_column, res_null_map[i],
151
2
                                                              value_column, value_null_map, idx);
152
2
                        }
153
3
                    }
154
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
128
3
                [&](auto&& arg, auto key_is_nullable, auto value_is_nullable) {
129
3
                    using ValueDataType = std::decay_t<decltype(arg)>;
130
3
                    using OutputColumnType = ValueDataType::OutputColumnType;
131
3
                    auto* res_real_column = assert_cast<OutputColumnType*>(res_column.get());
132
3
                    const auto* value_column = arg.get();
133
3
                    const auto* value_null_map = arg.get_null_map();
134
6
                    for (size_t i = 0; i < rows; i++) {
135
                        if constexpr (key_is_nullable) {
136
                            if (null_key->is_null_at(i)) {
137
                                // if input key is null, set the result column to null
138
                                res_real_column->insert_default();
139
                                res_null_map[i] = true;
140
                                continue;
141
                            }
142
                        }
143
3
                        auto it = look_up_IP(ipv4_to_ipv6(ipv4_column->get_element(i)));
144
3
                        if (it == ip_not_found()) {
145
                            // if input key is not found, set the result column to null
146
1
                            res_real_column->insert_default();
147
1
                            res_null_map[i] = true;
148
2
                        } else {
149
2
                            const auto idx = *it;
150
2
                            set_value_data<value_is_nullable>(res_real_column, res_null_map[i],
151
2
                                                              value_column, value_null_map, idx);
152
2
                        }
153
3
                    }
154
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
128
1
                [&](auto&& arg, auto key_is_nullable, auto value_is_nullable) {
129
1
                    using ValueDataType = std::decay_t<decltype(arg)>;
130
1
                    using OutputColumnType = ValueDataType::OutputColumnType;
131
1
                    auto* res_real_column = assert_cast<OutputColumnType*>(res_column.get());
132
1
                    const auto* value_column = arg.get();
133
1
                    const auto* value_null_map = arg.get_null_map();
134
3
                    for (size_t i = 0; i < rows; i++) {
135
1
                        if constexpr (key_is_nullable) {
136
1
                            if (null_key->is_null_at(i)) {
137
                                // if input key is null, set the result column to null
138
1
                                res_real_column->insert_default();
139
1
                                res_null_map[i] = true;
140
1
                                continue;
141
1
                            }
142
1
                        }
143
0
                        auto it = look_up_IP(ipv4_to_ipv6(ipv4_column->get_element(i)));
144
1
                        if (it == ip_not_found()) {
145
                            // if input key is not found, set the result column to null
146
0
                            res_real_column->insert_default();
147
0
                            res_null_map[i] = true;
148
1
                        } else {
149
1
                            const auto idx = *it;
150
1
                            set_value_data<value_is_nullable>(res_real_column, res_null_map[i],
151
1
                                                              value_column, value_null_map, idx);
152
1
                        }
153
1
                    }
154
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
128
1
                [&](auto&& arg, auto key_is_nullable, auto value_is_nullable) {
129
1
                    using ValueDataType = std::decay_t<decltype(arg)>;
130
1
                    using OutputColumnType = ValueDataType::OutputColumnType;
131
1
                    auto* res_real_column = assert_cast<OutputColumnType*>(res_column.get());
132
1
                    const auto* value_column = arg.get();
133
1
                    const auto* value_null_map = arg.get_null_map();
134
22
                    for (size_t i = 0; i < rows; i++) {
135
                        if constexpr (key_is_nullable) {
136
                            if (null_key->is_null_at(i)) {
137
                                // if input key is null, set the result column to null
138
                                res_real_column->insert_default();
139
                                res_null_map[i] = true;
140
                                continue;
141
                            }
142
                        }
143
21
                        auto it = look_up_IP(ipv4_to_ipv6(ipv4_column->get_element(i)));
144
21
                        if (it == ip_not_found()) {
145
                            // if input key is not found, set the result column to null
146
6
                            res_real_column->insert_default();
147
6
                            res_null_map[i] = true;
148
15
                        } else {
149
15
                            const auto idx = *it;
150
15
                            set_value_data<value_is_nullable>(res_real_column, res_null_map[i],
151
15
                                                              value_column, value_null_map, idx);
152
15
                        }
153
21
                    }
154
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_
155
15
                value_data, make_bool_variant(null_key != nullptr),
156
15
                attribute_nullable_variant(attribute_index(attribute_name)));
157
15
    }
158
159
19
    return ColumnNullable::create(std::move(res_column), std::move(res_null));
160
19
}
161
162
203
IPv6 IPAddressDictionary::format_ipv6_cidr(const uint8_t* addr, uint8_t prefix) {
163
203
    if (prefix > IPV6_BINARY_LENGTH * 8U) {
164
0
        prefix = IPV6_BINARY_LENGTH * 8U;
165
0
    }
166
203
    IPv6 ipv6 = 0;
167
203
    apply_cidr_mask(reinterpret_cast<const char*>(addr), reinterpret_cast<char*>(&ipv6), prefix);
168
203
    return ipv6;
169
203
}
170
171
struct IPRecord {
172
    IPAddressCIDR ip_with_cidr; // IP address with CIDR notation
173
    size_t row;                 // Row index in the original data
174
175
    // Convert the IP address to IPv6 format
176
197
    IPv6 to_ipv6() const {
177
197
        auto origin_ipv6 = _to_ipv6();
178
197
        return IPAddressDictionary::format_ipv6_cidr(reinterpret_cast<const UInt8*>(&origin_ipv6),
179
197
                                                     prefix());
180
197
    }
181
182
    // Get the prefix length of the IP address
183
1.14k
    UInt8 prefix() const {
184
1.14k
        if (ip_with_cidr._address.as_v6()) {
185
462
            return ip_with_cidr._prefix;
186
462
        }
187
679
        return ip_with_cidr._prefix + 96;
188
1.14k
    }
189
190
private:
191
197
    IPv6 _to_ipv6() const {
192
197
        if (const auto* address = ip_with_cidr._address.as_v6()) {
193
4
            IPv6 ipv6;
194
4
            memcpy(reinterpret_cast<UInt8*>(&ipv6), address, sizeof(IPv6));
195
4
            return ipv6;
196
4
        }
197
198
193
        return ipv4_to_ipv6(ip_with_cidr._address.as_v4());
199
197
    }
200
};
201
202
void IPAddressDictionary::load_data(const ColumnPtr& key_column,
203
29
                                    const std::vector<ColumnPtr>& values_column) {
204
    // load att column
205
29
    load_values(values_column);
206
207
    // Construct an IP trie
208
209
    // Step 1: Import the CIDR data.
210
    // Record the parsed CIDR and the corresponding row from the original data.
211
29
    std::vector<IPRecord> ip_records;
212
29
    auto load_key_str = [&](const auto* str_column) {
213
121
        for (size_t i = 0; i < str_column->size(); i++) {
214
95
            auto ip_str = str_column->get_data_at(i);
215
95
            try {
216
95
                ip_records.push_back(IPRecord {parse_ip_with_cidr(ip_str), i});
217
95
            } catch (Exception& e) {
218
                // add data unqualified error tag to the error message
219
3
                throw Exception(e.code(), DICT_DATA_ERROR_TAG + e.message());
220
3
            }
221
95
        }
222
29
    };
ip_address_dictionary.cpp:_ZZN5doris19IPAddressDictionary9load_dataERKNS_3COWINS_7IColumnEE13immutable_ptrIS2_EERKSt6vectorIS5_SaIS5_EEENK3$_0clINS_9ColumnStrImEEEEDaPKT_
Line
Count
Source
212
1
    auto load_key_str = [&](const auto* str_column) {
213
19
        for (size_t i = 0; i < str_column->size(); i++) {
214
18
            auto ip_str = str_column->get_data_at(i);
215
18
            try {
216
18
                ip_records.push_back(IPRecord {parse_ip_with_cidr(ip_str), i});
217
18
            } catch (Exception& e) {
218
                // add data unqualified error tag to the error message
219
0
                throw Exception(e.code(), DICT_DATA_ERROR_TAG + e.message());
220
0
            }
221
18
        }
222
1
    };
ip_address_dictionary.cpp:_ZZN5doris19IPAddressDictionary9load_dataERKNS_3COWINS_7IColumnEE13immutable_ptrIS2_EERKSt6vectorIS5_SaIS5_EEENK3$_0clINS_9ColumnStrIjEEEEDaPKT_
Line
Count
Source
212
28
    auto load_key_str = [&](const auto* str_column) {
213
102
        for (size_t i = 0; i < str_column->size(); i++) {
214
77
            auto ip_str = str_column->get_data_at(i);
215
77
            try {
216
77
                ip_records.push_back(IPRecord {parse_ip_with_cidr(ip_str), i});
217
77
            } catch (Exception& e) {
218
                // add data unqualified error tag to the error message
219
3
                throw Exception(e.code(), DICT_DATA_ERROR_TAG + e.message());
220
3
            }
221
77
        }
222
28
    };
223
29
    if (key_column->is_column_string64()) {
224
1
        load_key_str(assert_cast<const ColumnString64*>(key_column.get()));
225
28
    } else {
226
28
        load_key_str(assert_cast<const ColumnString*>(key_column.get()));
227
28
    }
228
229
    // Step 2: Process IP data.
230
231
    // Step 2.1: Process all corresponding CIDRs as IPv6.
232
    // Sort them by {the value of IPv6, the prefix length of the CIDR in IPv6}.
233
293
    std::sort(ip_records.begin(), ip_records.end(), [&](const IPRecord& a, const IPRecord& b) {
234
293
        if (a.to_ipv6() == b.to_ipv6()) {
235
8
            return a.prefix() < b.prefix();
236
8
        }
237
285
        return a.to_ipv6() < b.to_ipv6();
238
293
    });
239
240
    // Step 2.2: Remove duplicate data.
241
29
    auto new_end = std::unique(ip_records.begin(), ip_records.end(),
242
69
                               [&](const IPRecord& a, const IPRecord& b) {
243
69
                                   return a.to_ipv6() == b.to_ipv6() && a.prefix() == b.prefix();
244
69
                               });
245
29
    ip_records.erase(new_end, ip_records.end());
246
247
29
    if (ip_records.size() < key_column->size()) {
248
4
        throw doris::Exception(
249
4
                ErrorCode::INVALID_ARGUMENT,
250
4
                DICT_DATA_ERROR_TAG + "The CIDR has duplicate data in IpAddressDictionary");
251
4
    }
252
253
    // Step 3: Process the data needed for the Trie.
254
    // You can treat ip_column, prefix_column, and origin_row_idx_column as a whole.
255
    // struct TrieNode {
256
    //     IPv6 ip;
257
    //     UInt8 prefix;
258
    //     size_t origin_row_idx;
259
    // };
260
84
    for (const auto& record : ip_records) {
261
84
        ip_column.push_back(record.to_ipv6());
262
84
        prefix_column.push_back(record.prefix());
263
84
        origin_row_idx_column.push_back(record.row);
264
84
    }
265
266
    // Step 4: Construct subnet relationships.
267
    // The CIDR at index i is a subnet of the CIDR at index parent_subnet[i], for example:
268
    // 192.168.0.0/24 [0]
269
    // ├── 192.168.0.0/25 [1]
270
    // │   ├── 192.168.0.0/26 [2]
271
    // │   └── 192.168.0.64/26 [3]
272
    // └── 192.168.0.128/25 [4]
273
    // parent_subnet[4] = 0
274
    // parent_subnet[3] = 1
275
    // parent_subnet[2] = 1
276
    // parent_subnet[1] = 0
277
    // parent_subnet[0] = 0 (itself)
278
279
25
    parent_subnet.resize(ip_records.size());
280
25
    std::stack<size_t> subnets_stack;
281
    // Use monotonic stack to build IP subnet relationships in trie structure
282
    // https://liuzhenglaichn.gitbook.io/algorithm/monotonic-stack
283
    // Note: The final structure may result in multiple trees rather than a single tree
284
109
    for (auto i = 0; i < ip_records.size(); i++) {
285
84
        parent_subnet[i] = i;
286
141
        while (!subnets_stack.empty()) {
287
86
            size_t pi = subnets_stack.top();
288
289
86
            auto cur_address_ip = ip_records[i].to_ipv6();
290
86
            const auto* addr = reinterpret_cast<UInt8*>(&cur_address_ip);
291
86
            auto parent_subnet_ip = ip_records[pi].to_ipv6();
292
86
            const auto* parent_addr = reinterpret_cast<UInt8*>(&parent_subnet_ip);
293
294
86
            bool is_mask_smaller = ip_records[pi].prefix() < ip_records[i].prefix();
295
86
            if (is_mask_smaller && match_ipv6_subnet(addr, parent_addr, ip_records[pi].prefix())) {
296
29
                parent_subnet[i] = pi;
297
29
                break;
298
29
            }
299
300
57
            subnets_stack.pop();
301
57
        }
302
84
        subnets_stack.push(i);
303
84
    }
304
25
}
305
306
79
IPAddressDictionary::RowIdxConstIter IPAddressDictionary::look_up_IP(const IPv6& target) const {
307
79
    if (origin_row_idx_column.empty()) {
308
0
        return ip_not_found();
309
0
    }
310
311
289
    auto comp = [&](IPv6 value, auto idx) -> bool { return value < ip_column[idx]; };
312
313
79
    auto range = std::ranges::views::iota(0ULL, origin_row_idx_column.size());
314
315
    // Query Step 1: First, use binary search to find a CIDR that is close to the target.
316
79
    auto found_it = std::ranges::upper_bound(range, target, comp);
317
318
79
    if (found_it == range.begin()) {
319
4
        return ip_not_found();
320
4
    }
321
322
75
    --found_it;
323
324
    // Query Step 2: Based on the subnet relationships, find the first matching CIDR.
325
85
    for (auto idx = *found_it;; idx = parent_subnet[idx]) {
326
85
        if (match_ipv6_subnet(reinterpret_cast<const UInt8*>(&target),
327
85
                              reinterpret_cast<const UInt8*>(&ip_column[idx]),
328
85
                              prefix_column[idx])) {
329
60
            return origin_row_idx_column.begin() + idx;
330
60
        }
331
25
        if (idx == parent_subnet[idx]) {
332
15
            return ip_not_found();
333
15
        }
334
25
    }
335
336
0
    return ip_not_found();
337
75
}
338
} // namespace doris