Coverage Report

Created: 2026-03-21 03:59

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
be/src/exec/common/field_visitors.h
Line
Count
Source
1
// Licensed to the Apache Software Foundation (ASF) under one
2
// or more contributor license agreements.  See the NOTICE file
3
// distributed with this work for additional information
4
// regarding copyright ownership.  The ASF licenses this file
5
// to you under the Apache License, Version 2.0 (the
6
// "License"); you may not use this file except in compliance
7
// with the License.  You may obtain a copy of the License at
8
//
9
//   http://www.apache.org/licenses/LICENSE-2.0
10
//
11
// Unless required by applicable law or agreed to in writing,
12
// software distributed under the License is distributed on an
13
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14
// KIND, either express or implied.  See the License for the
15
// specific language governing permissions and limitations
16
// under the License.
17
// This file is copied from
18
// https://github.com/ClickHouse/ClickHouse/blob/master/src/Common/FieldVisitors.h
19
// and modified by Doris
20
21
#pragma once
22
23
#include "common/demangle.h"
24
#include "common/exception.h"
25
#include "common/status.h"
26
#include "core/accurate_comparison.h"
27
#include "core/data_type/primitive_type.h"
28
#include "core/field.h"
29
30
namespace doris {
31
32
/** StaticVisitor (and its descendants) - class with overloaded operator() for all types of fields.
33
  * You could call visitor for field using function 'apply_visitor'.
34
  * Also "binary visitor" is supported - its operator() takes two arguments.
35
  */
36
template <typename R = void>
37
struct StaticVisitor {
38
    using ResultType = R;
39
};
40
41
/// F is template parameter, to allow universal reference for field, that is useful for const and non-const values.
42
template <typename Visitor, typename F>
43
47.7M
typename std::decay_t<Visitor>::ResultType apply_visitor(Visitor&& visitor, F&& field) {
44
47.7M
    switch (field.get_type()) {
45
245k
    case PrimitiveType::TYPE_NULL:
46
245k
        return visitor.template apply<PrimitiveType::TYPE_NULL>(field.template get<TYPE_NULL>());
47
960
    case PrimitiveType::TYPE_DATETIMEV2:
48
960
        return visitor.template apply<PrimitiveType::TYPE_DATETIMEV2>(
49
960
                field.template get<TYPE_DATETIMEV2>());
50
0
    case PrimitiveType::TYPE_TIMESTAMPTZ:
51
0
        return visitor.template apply<PrimitiveType::TYPE_TIMESTAMPTZ>(
52
0
                field.template get<TYPE_TIMESTAMPTZ>());
53
83.9k
    case PrimitiveType::TYPE_LARGEINT:
54
83.9k
        return visitor.template apply<PrimitiveType::TYPE_LARGEINT>(
55
83.9k
                field.template get<TYPE_LARGEINT>());
56
0
    case PrimitiveType::TYPE_DATETIME:
57
0
        return visitor.template apply<PrimitiveType::TYPE_DATETIME>(
58
0
                field.template get<TYPE_DATETIME>());
59
0
    case PrimitiveType::TYPE_DATE:
60
0
        return visitor.template apply<PrimitiveType::TYPE_DATE>(field.template get<TYPE_DATE>());
61
792
    case PrimitiveType::TYPE_DATEV2:
62
792
        return visitor.template apply<PrimitiveType::TYPE_DATEV2>(
63
792
                field.template get<TYPE_DATEV2>());
64
664k
    case PrimitiveType::TYPE_BOOLEAN:
65
664k
        return visitor.template apply<PrimitiveType::TYPE_BOOLEAN>(
66
664k
                field.template get<TYPE_BOOLEAN>());
67
2.06k
    case PrimitiveType::TYPE_TINYINT:
68
2.06k
        return visitor.template apply<PrimitiveType::TYPE_TINYINT>(
69
2.06k
                field.template get<TYPE_TINYINT>());
70
2.05k
    case PrimitiveType::TYPE_SMALLINT:
71
2.05k
        return visitor.template apply<PrimitiveType::TYPE_SMALLINT>(
72
2.05k
                field.template get<TYPE_SMALLINT>());
73
3.91k
    case PrimitiveType::TYPE_INT:
74
3.91k
        return visitor.template apply<PrimitiveType::TYPE_INT>(field.template get<TYPE_INT>());
75
13.1M
    case PrimitiveType::TYPE_BIGINT:
76
13.1M
        return visitor.template apply<PrimitiveType::TYPE_BIGINT>(
77
13.1M
                field.template get<TYPE_BIGINT>());
78
0
    case PrimitiveType::TYPE_UINT32:
79
0
        return visitor.template apply<PrimitiveType::TYPE_UINT32>(
80
0
                field.template get<TYPE_UINT32>());
81
0
    case PrimitiveType::TYPE_UINT64:
82
0
        return visitor.template apply<PrimitiveType::TYPE_UINT64>(
83
0
                field.template get<TYPE_UINT64>());
84
1.71k
    case PrimitiveType::TYPE_FLOAT:
85
1.71k
        return visitor.template apply<PrimitiveType::TYPE_FLOAT>(field.template get<TYPE_FLOAT>());
86
0
    case PrimitiveType::TYPE_TIMEV2:
87
0
        return visitor.template apply<PrimitiveType::TYPE_TIMEV2>(
88
0
                field.template get<TYPE_TIMEV2>());
89
5.93M
    case PrimitiveType::TYPE_DOUBLE:
90
5.93M
        return visitor.template apply<PrimitiveType::TYPE_DOUBLE>(
91
5.93M
                field.template get<TYPE_DOUBLE>());
92
612
    case PrimitiveType::TYPE_IPV4:
93
612
        return visitor.template apply<PrimitiveType::TYPE_IPV4>(field.template get<TYPE_IPV4>());
94
624
    case PrimitiveType::TYPE_IPV6:
95
624
        return visitor.template apply<PrimitiveType::TYPE_IPV6>(field.template get<TYPE_IPV6>());
96
22.7M
    case PrimitiveType::TYPE_STRING:
97
22.7M
        return visitor.template apply<PrimitiveType::TYPE_STRING>(
98
22.7M
                field.template get<TYPE_STRING>());
99
0
    case PrimitiveType::TYPE_CHAR:
100
0
        return visitor.template apply<PrimitiveType::TYPE_CHAR>(field.template get<TYPE_CHAR>());
101
0
    case PrimitiveType::TYPE_VARCHAR:
102
0
        return visitor.template apply<PrimitiveType::TYPE_VARCHAR>(
103
0
                field.template get<TYPE_VARCHAR>());
104
0
    case PrimitiveType::TYPE_VARBINARY:
105
0
        return visitor.template apply<PrimitiveType::TYPE_VARBINARY>(
106
0
                field.template get<TYPE_VARBINARY>());
107
5.20M
    case PrimitiveType::TYPE_ARRAY:
108
5.20M
        return visitor.template apply<PrimitiveType::TYPE_ARRAY>(field.template get<TYPE_ARRAY>());
109
2
    case PrimitiveType::TYPE_STRUCT:
110
2
        return visitor.template apply<PrimitiveType::TYPE_STRUCT>(
111
2
                field.template get<TYPE_STRUCT>());
112
0
    case PrimitiveType::TYPE_MAP:
113
0
        return visitor.template apply<PrimitiveType::TYPE_MAP>(field.template get<TYPE_MAP>());
114
2
    case PrimitiveType::TYPE_VARIANT:
115
2
        return visitor.template apply<PrimitiveType::TYPE_VARIANT>(
116
2
                field.template get<TYPE_VARIANT>());
117
1.51k
    case PrimitiveType::TYPE_DECIMAL32:
118
1.51k
        return visitor.template apply<PrimitiveType::TYPE_DECIMAL32>(
119
1.51k
                field.template get<TYPE_DECIMAL32>());
120
1.39k
    case PrimitiveType::TYPE_DECIMAL64:
121
1.39k
        return visitor.template apply<PrimitiveType::TYPE_DECIMAL64>(
122
1.39k
                field.template get<TYPE_DECIMAL64>());
123
0
    case PrimitiveType::TYPE_DECIMALV2:
124
0
        return visitor.template apply<PrimitiveType::TYPE_DECIMALV2>(
125
0
                field.template get<TYPE_DECIMALV2>());
126
1.46k
    case PrimitiveType::TYPE_DECIMAL128I:
127
1.46k
        return visitor.template apply<PrimitiveType::TYPE_DECIMAL128I>(
128
1.46k
                field.template get<TYPE_DECIMAL128I>());
129
1.11k
    case PrimitiveType::TYPE_DECIMAL256:
130
1.11k
        return visitor.template apply<PrimitiveType::TYPE_DECIMAL256>(
131
1.11k
                field.template get<TYPE_DECIMAL256>());
132
0
    case PrimitiveType::TYPE_BITMAP:
133
0
        return visitor.template apply<PrimitiveType::TYPE_BITMAP>(
134
0
                field.template get<TYPE_BITMAP>());
135
0
    case PrimitiveType::TYPE_HLL:
136
0
        return visitor.template apply<PrimitiveType::TYPE_HLL>(field.template get<TYPE_HLL>());
137
0
    case PrimitiveType::TYPE_QUANTILE_STATE:
138
0
        return visitor.template apply<PrimitiveType::TYPE_QUANTILE_STATE>(
139
0
                field.template get<TYPE_QUANTILE_STATE>());
140
93.7k
    case PrimitiveType::TYPE_JSONB:
141
93.7k
        return visitor.template apply<PrimitiveType::TYPE_JSONB>(field.template get<TYPE_JSONB>());
142
0
    default:
143
0
        throw doris::Exception(ErrorCode::INTERNAL_ERROR, "Bad type of Field {}",
144
0
                               static_cast<int>(field.get_type()));
145
0
        return {};
146
47.7M
    }
147
47.7M
}
_ZN5doris13apply_visitorINS_26FieldVisitorReplaceScalarsERNS_5FieldEEENSt5decayIT_E4type10ResultTypeEOS5_OT0_
Line
Count
Source
43
2
typename std::decay_t<Visitor>::ResultType apply_visitor(Visitor&& visitor, F&& field) {
44
2
    switch (field.get_type()) {
45
0
    case PrimitiveType::TYPE_NULL:
46
0
        return visitor.template apply<PrimitiveType::TYPE_NULL>(field.template get<TYPE_NULL>());
47
0
    case PrimitiveType::TYPE_DATETIMEV2:
48
0
        return visitor.template apply<PrimitiveType::TYPE_DATETIMEV2>(
49
0
                field.template get<TYPE_DATETIMEV2>());
50
0
    case PrimitiveType::TYPE_TIMESTAMPTZ:
51
0
        return visitor.template apply<PrimitiveType::TYPE_TIMESTAMPTZ>(
52
0
                field.template get<TYPE_TIMESTAMPTZ>());
53
0
    case PrimitiveType::TYPE_LARGEINT:
54
0
        return visitor.template apply<PrimitiveType::TYPE_LARGEINT>(
55
0
                field.template get<TYPE_LARGEINT>());
56
0
    case PrimitiveType::TYPE_DATETIME:
57
0
        return visitor.template apply<PrimitiveType::TYPE_DATETIME>(
58
0
                field.template get<TYPE_DATETIME>());
59
0
    case PrimitiveType::TYPE_DATE:
60
0
        return visitor.template apply<PrimitiveType::TYPE_DATE>(field.template get<TYPE_DATE>());
61
0
    case PrimitiveType::TYPE_DATEV2:
62
0
        return visitor.template apply<PrimitiveType::TYPE_DATEV2>(
63
0
                field.template get<TYPE_DATEV2>());
64
0
    case PrimitiveType::TYPE_BOOLEAN:
65
0
        return visitor.template apply<PrimitiveType::TYPE_BOOLEAN>(
66
0
                field.template get<TYPE_BOOLEAN>());
67
0
    case PrimitiveType::TYPE_TINYINT:
68
0
        return visitor.template apply<PrimitiveType::TYPE_TINYINT>(
69
0
                field.template get<TYPE_TINYINT>());
70
0
    case PrimitiveType::TYPE_SMALLINT:
71
0
        return visitor.template apply<PrimitiveType::TYPE_SMALLINT>(
72
0
                field.template get<TYPE_SMALLINT>());
73
0
    case PrimitiveType::TYPE_INT:
74
0
        return visitor.template apply<PrimitiveType::TYPE_INT>(field.template get<TYPE_INT>());
75
0
    case PrimitiveType::TYPE_BIGINT:
76
0
        return visitor.template apply<PrimitiveType::TYPE_BIGINT>(
77
0
                field.template get<TYPE_BIGINT>());
78
0
    case PrimitiveType::TYPE_UINT32:
79
0
        return visitor.template apply<PrimitiveType::TYPE_UINT32>(
80
0
                field.template get<TYPE_UINT32>());
81
0
    case PrimitiveType::TYPE_UINT64:
82
0
        return visitor.template apply<PrimitiveType::TYPE_UINT64>(
83
0
                field.template get<TYPE_UINT64>());
84
0
    case PrimitiveType::TYPE_FLOAT:
85
0
        return visitor.template apply<PrimitiveType::TYPE_FLOAT>(field.template get<TYPE_FLOAT>());
86
0
    case PrimitiveType::TYPE_TIMEV2:
87
0
        return visitor.template apply<PrimitiveType::TYPE_TIMEV2>(
88
0
                field.template get<TYPE_TIMEV2>());
89
0
    case PrimitiveType::TYPE_DOUBLE:
90
0
        return visitor.template apply<PrimitiveType::TYPE_DOUBLE>(
91
0
                field.template get<TYPE_DOUBLE>());
92
0
    case PrimitiveType::TYPE_IPV4:
93
0
        return visitor.template apply<PrimitiveType::TYPE_IPV4>(field.template get<TYPE_IPV4>());
94
0
    case PrimitiveType::TYPE_IPV6:
95
0
        return visitor.template apply<PrimitiveType::TYPE_IPV6>(field.template get<TYPE_IPV6>());
96
0
    case PrimitiveType::TYPE_STRING:
97
0
        return visitor.template apply<PrimitiveType::TYPE_STRING>(
98
0
                field.template get<TYPE_STRING>());
99
0
    case PrimitiveType::TYPE_CHAR:
100
0
        return visitor.template apply<PrimitiveType::TYPE_CHAR>(field.template get<TYPE_CHAR>());
101
0
    case PrimitiveType::TYPE_VARCHAR:
102
0
        return visitor.template apply<PrimitiveType::TYPE_VARCHAR>(
103
0
                field.template get<TYPE_VARCHAR>());
104
0
    case PrimitiveType::TYPE_VARBINARY:
105
0
        return visitor.template apply<PrimitiveType::TYPE_VARBINARY>(
106
0
                field.template get<TYPE_VARBINARY>());
107
2
    case PrimitiveType::TYPE_ARRAY:
108
2
        return visitor.template apply<PrimitiveType::TYPE_ARRAY>(field.template get<TYPE_ARRAY>());
109
0
    case PrimitiveType::TYPE_STRUCT:
110
0
        return visitor.template apply<PrimitiveType::TYPE_STRUCT>(
111
0
                field.template get<TYPE_STRUCT>());
112
0
    case PrimitiveType::TYPE_MAP:
113
0
        return visitor.template apply<PrimitiveType::TYPE_MAP>(field.template get<TYPE_MAP>());
114
0
    case PrimitiveType::TYPE_VARIANT:
115
0
        return visitor.template apply<PrimitiveType::TYPE_VARIANT>(
116
0
                field.template get<TYPE_VARIANT>());
117
0
    case PrimitiveType::TYPE_DECIMAL32:
118
0
        return visitor.template apply<PrimitiveType::TYPE_DECIMAL32>(
119
0
                field.template get<TYPE_DECIMAL32>());
120
0
    case PrimitiveType::TYPE_DECIMAL64:
121
0
        return visitor.template apply<PrimitiveType::TYPE_DECIMAL64>(
122
0
                field.template get<TYPE_DECIMAL64>());
123
0
    case PrimitiveType::TYPE_DECIMALV2:
124
0
        return visitor.template apply<PrimitiveType::TYPE_DECIMALV2>(
125
0
                field.template get<TYPE_DECIMALV2>());
126
0
    case PrimitiveType::TYPE_DECIMAL128I:
127
0
        return visitor.template apply<PrimitiveType::TYPE_DECIMAL128I>(
128
0
                field.template get<TYPE_DECIMAL128I>());
129
0
    case PrimitiveType::TYPE_DECIMAL256:
130
0
        return visitor.template apply<PrimitiveType::TYPE_DECIMAL256>(
131
0
                field.template get<TYPE_DECIMAL256>());
132
0
    case PrimitiveType::TYPE_BITMAP:
133
0
        return visitor.template apply<PrimitiveType::TYPE_BITMAP>(
134
0
                field.template get<TYPE_BITMAP>());
135
0
    case PrimitiveType::TYPE_HLL:
136
0
        return visitor.template apply<PrimitiveType::TYPE_HLL>(field.template get<TYPE_HLL>());
137
0
    case PrimitiveType::TYPE_QUANTILE_STATE:
138
0
        return visitor.template apply<PrimitiveType::TYPE_QUANTILE_STATE>(
139
0
                field.template get<TYPE_QUANTILE_STATE>());
140
0
    case PrimitiveType::TYPE_JSONB:
141
0
        return visitor.template apply<PrimitiveType::TYPE_JSONB>(field.template get<TYPE_JSONB>());
142
0
    default:
143
0
        throw doris::Exception(ErrorCode::INTERNAL_ERROR, "Bad type of Field {}",
144
0
                               static_cast<int>(field.get_type()));
145
0
        return {};
146
2
    }
147
2
}
_ZN5doris13apply_visitorINS_26FieldVisitorReplaceScalarsERKNS_5FieldEEENSt5decayIT_E4type10ResultTypeEOS6_OT0_
Line
Count
Source
43
3
typename std::decay_t<Visitor>::ResultType apply_visitor(Visitor&& visitor, F&& field) {
44
3
    switch (field.get_type()) {
45
0
    case PrimitiveType::TYPE_NULL:
46
0
        return visitor.template apply<PrimitiveType::TYPE_NULL>(field.template get<TYPE_NULL>());
47
0
    case PrimitiveType::TYPE_DATETIMEV2:
48
0
        return visitor.template apply<PrimitiveType::TYPE_DATETIMEV2>(
49
0
                field.template get<TYPE_DATETIMEV2>());
50
0
    case PrimitiveType::TYPE_TIMESTAMPTZ:
51
0
        return visitor.template apply<PrimitiveType::TYPE_TIMESTAMPTZ>(
52
0
                field.template get<TYPE_TIMESTAMPTZ>());
53
0
    case PrimitiveType::TYPE_LARGEINT:
54
0
        return visitor.template apply<PrimitiveType::TYPE_LARGEINT>(
55
0
                field.template get<TYPE_LARGEINT>());
56
0
    case PrimitiveType::TYPE_DATETIME:
57
0
        return visitor.template apply<PrimitiveType::TYPE_DATETIME>(
58
0
                field.template get<TYPE_DATETIME>());
59
0
    case PrimitiveType::TYPE_DATE:
60
0
        return visitor.template apply<PrimitiveType::TYPE_DATE>(field.template get<TYPE_DATE>());
61
0
    case PrimitiveType::TYPE_DATEV2:
62
0
        return visitor.template apply<PrimitiveType::TYPE_DATEV2>(
63
0
                field.template get<TYPE_DATEV2>());
64
0
    case PrimitiveType::TYPE_BOOLEAN:
65
0
        return visitor.template apply<PrimitiveType::TYPE_BOOLEAN>(
66
0
                field.template get<TYPE_BOOLEAN>());
67
0
    case PrimitiveType::TYPE_TINYINT:
68
0
        return visitor.template apply<PrimitiveType::TYPE_TINYINT>(
69
0
                field.template get<TYPE_TINYINT>());
70
0
    case PrimitiveType::TYPE_SMALLINT:
71
0
        return visitor.template apply<PrimitiveType::TYPE_SMALLINT>(
72
0
                field.template get<TYPE_SMALLINT>());
73
0
    case PrimitiveType::TYPE_INT:
74
0
        return visitor.template apply<PrimitiveType::TYPE_INT>(field.template get<TYPE_INT>());
75
3
    case PrimitiveType::TYPE_BIGINT:
76
3
        return visitor.template apply<PrimitiveType::TYPE_BIGINT>(
77
3
                field.template get<TYPE_BIGINT>());
78
0
    case PrimitiveType::TYPE_UINT32:
79
0
        return visitor.template apply<PrimitiveType::TYPE_UINT32>(
80
0
                field.template get<TYPE_UINT32>());
81
0
    case PrimitiveType::TYPE_UINT64:
82
0
        return visitor.template apply<PrimitiveType::TYPE_UINT64>(
83
0
                field.template get<TYPE_UINT64>());
84
0
    case PrimitiveType::TYPE_FLOAT:
85
0
        return visitor.template apply<PrimitiveType::TYPE_FLOAT>(field.template get<TYPE_FLOAT>());
86
0
    case PrimitiveType::TYPE_TIMEV2:
87
0
        return visitor.template apply<PrimitiveType::TYPE_TIMEV2>(
88
0
                field.template get<TYPE_TIMEV2>());
89
0
    case PrimitiveType::TYPE_DOUBLE:
90
0
        return visitor.template apply<PrimitiveType::TYPE_DOUBLE>(
91
0
                field.template get<TYPE_DOUBLE>());
92
0
    case PrimitiveType::TYPE_IPV4:
93
0
        return visitor.template apply<PrimitiveType::TYPE_IPV4>(field.template get<TYPE_IPV4>());
94
0
    case PrimitiveType::TYPE_IPV6:
95
0
        return visitor.template apply<PrimitiveType::TYPE_IPV6>(field.template get<TYPE_IPV6>());
96
0
    case PrimitiveType::TYPE_STRING:
97
0
        return visitor.template apply<PrimitiveType::TYPE_STRING>(
98
0
                field.template get<TYPE_STRING>());
99
0
    case PrimitiveType::TYPE_CHAR:
100
0
        return visitor.template apply<PrimitiveType::TYPE_CHAR>(field.template get<TYPE_CHAR>());
101
0
    case PrimitiveType::TYPE_VARCHAR:
102
0
        return visitor.template apply<PrimitiveType::TYPE_VARCHAR>(
103
0
                field.template get<TYPE_VARCHAR>());
104
0
    case PrimitiveType::TYPE_VARBINARY:
105
0
        return visitor.template apply<PrimitiveType::TYPE_VARBINARY>(
106
0
                field.template get<TYPE_VARBINARY>());
107
0
    case PrimitiveType::TYPE_ARRAY:
108
0
        return visitor.template apply<PrimitiveType::TYPE_ARRAY>(field.template get<TYPE_ARRAY>());
109
0
    case PrimitiveType::TYPE_STRUCT:
110
0
        return visitor.template apply<PrimitiveType::TYPE_STRUCT>(
111
0
                field.template get<TYPE_STRUCT>());
112
0
    case PrimitiveType::TYPE_MAP:
113
0
        return visitor.template apply<PrimitiveType::TYPE_MAP>(field.template get<TYPE_MAP>());
114
0
    case PrimitiveType::TYPE_VARIANT:
115
0
        return visitor.template apply<PrimitiveType::TYPE_VARIANT>(
116
0
                field.template get<TYPE_VARIANT>());
117
0
    case PrimitiveType::TYPE_DECIMAL32:
118
0
        return visitor.template apply<PrimitiveType::TYPE_DECIMAL32>(
119
0
                field.template get<TYPE_DECIMAL32>());
120
0
    case PrimitiveType::TYPE_DECIMAL64:
121
0
        return visitor.template apply<PrimitiveType::TYPE_DECIMAL64>(
122
0
                field.template get<TYPE_DECIMAL64>());
123
0
    case PrimitiveType::TYPE_DECIMALV2:
124
0
        return visitor.template apply<PrimitiveType::TYPE_DECIMALV2>(
125
0
                field.template get<TYPE_DECIMALV2>());
126
0
    case PrimitiveType::TYPE_DECIMAL128I:
127
0
        return visitor.template apply<PrimitiveType::TYPE_DECIMAL128I>(
128
0
                field.template get<TYPE_DECIMAL128I>());
129
0
    case PrimitiveType::TYPE_DECIMAL256:
130
0
        return visitor.template apply<PrimitiveType::TYPE_DECIMAL256>(
131
0
                field.template get<TYPE_DECIMAL256>());
132
0
    case PrimitiveType::TYPE_BITMAP:
133
0
        return visitor.template apply<PrimitiveType::TYPE_BITMAP>(
134
0
                field.template get<TYPE_BITMAP>());
135
0
    case PrimitiveType::TYPE_HLL:
136
0
        return visitor.template apply<PrimitiveType::TYPE_HLL>(field.template get<TYPE_HLL>());
137
0
    case PrimitiveType::TYPE_QUANTILE_STATE:
138
0
        return visitor.template apply<PrimitiveType::TYPE_QUANTILE_STATE>(
139
0
                field.template get<TYPE_QUANTILE_STATE>());
140
0
    case PrimitiveType::TYPE_JSONB:
141
0
        return visitor.template apply<PrimitiveType::TYPE_JSONB>(field.template get<TYPE_JSONB>());
142
0
    default:
143
0
        throw doris::Exception(ErrorCode::INTERNAL_ERROR, "Bad type of Field {}",
144
0
                               static_cast<int>(field.get_type()));
145
0
        return {};
146
3
    }
147
3
}
Unexecuted instantiation: _ZN5doris13apply_visitorIRNS_26FieldVisitorToStringSimpleERKNS_5FieldEEENSt5decayIT_E4type10ResultTypeEOS7_OT0_
_ZN5doris13apply_visitorIRNS_12variant_util24FieldVisitorToScalarTypeERKNS_5FieldEEENSt5decayIT_E4type10ResultTypeEOS8_OT0_
Line
Count
Source
43
5.32M
typename std::decay_t<Visitor>::ResultType apply_visitor(Visitor&& visitor, F&& field) {
44
5.32M
    switch (field.get_type()) {
45
13.4k
    case PrimitiveType::TYPE_NULL:
46
13.4k
        return visitor.template apply<PrimitiveType::TYPE_NULL>(field.template get<TYPE_NULL>());
47
480
    case PrimitiveType::TYPE_DATETIMEV2:
48
480
        return visitor.template apply<PrimitiveType::TYPE_DATETIMEV2>(
49
480
                field.template get<TYPE_DATETIMEV2>());
50
0
    case PrimitiveType::TYPE_TIMESTAMPTZ:
51
0
        return visitor.template apply<PrimitiveType::TYPE_TIMESTAMPTZ>(
52
0
                field.template get<TYPE_TIMESTAMPTZ>());
53
29.6k
    case PrimitiveType::TYPE_LARGEINT:
54
29.6k
        return visitor.template apply<PrimitiveType::TYPE_LARGEINT>(
55
29.6k
                field.template get<TYPE_LARGEINT>());
56
0
    case PrimitiveType::TYPE_DATETIME:
57
0
        return visitor.template apply<PrimitiveType::TYPE_DATETIME>(
58
0
                field.template get<TYPE_DATETIME>());
59
0
    case PrimitiveType::TYPE_DATE:
60
0
        return visitor.template apply<PrimitiveType::TYPE_DATE>(field.template get<TYPE_DATE>());
61
396
    case PrimitiveType::TYPE_DATEV2:
62
396
        return visitor.template apply<PrimitiveType::TYPE_DATEV2>(
63
396
                field.template get<TYPE_DATEV2>());
64
58.3k
    case PrimitiveType::TYPE_BOOLEAN:
65
58.3k
        return visitor.template apply<PrimitiveType::TYPE_BOOLEAN>(
66
58.3k
                field.template get<TYPE_BOOLEAN>());
67
1.03k
    case PrimitiveType::TYPE_TINYINT:
68
1.03k
        return visitor.template apply<PrimitiveType::TYPE_TINYINT>(
69
1.03k
                field.template get<TYPE_TINYINT>());
70
1.02k
    case PrimitiveType::TYPE_SMALLINT:
71
1.02k
        return visitor.template apply<PrimitiveType::TYPE_SMALLINT>(
72
1.02k
                field.template get<TYPE_SMALLINT>());
73
1.38k
    case PrimitiveType::TYPE_INT:
74
1.38k
        return visitor.template apply<PrimitiveType::TYPE_INT>(field.template get<TYPE_INT>());
75
1.65M
    case PrimitiveType::TYPE_BIGINT:
76
1.65M
        return visitor.template apply<PrimitiveType::TYPE_BIGINT>(
77
1.65M
                field.template get<TYPE_BIGINT>());
78
0
    case PrimitiveType::TYPE_UINT32:
79
0
        return visitor.template apply<PrimitiveType::TYPE_UINT32>(
80
0
                field.template get<TYPE_UINT32>());
81
0
    case PrimitiveType::TYPE_UINT64:
82
0
        return visitor.template apply<PrimitiveType::TYPE_UINT64>(
83
0
                field.template get<TYPE_UINT64>());
84
858
    case PrimitiveType::TYPE_FLOAT:
85
858
        return visitor.template apply<PrimitiveType::TYPE_FLOAT>(field.template get<TYPE_FLOAT>());
86
0
    case PrimitiveType::TYPE_TIMEV2:
87
0
        return visitor.template apply<PrimitiveType::TYPE_TIMEV2>(
88
0
                field.template get<TYPE_TIMEV2>());
89
190k
    case PrimitiveType::TYPE_DOUBLE:
90
190k
        return visitor.template apply<PrimitiveType::TYPE_DOUBLE>(
91
190k
                field.template get<TYPE_DOUBLE>());
92
306
    case PrimitiveType::TYPE_IPV4:
93
306
        return visitor.template apply<PrimitiveType::TYPE_IPV4>(field.template get<TYPE_IPV4>());
94
312
    case PrimitiveType::TYPE_IPV6:
95
312
        return visitor.template apply<PrimitiveType::TYPE_IPV6>(field.template get<TYPE_IPV6>());
96
770k
    case PrimitiveType::TYPE_STRING:
97
770k
        return visitor.template apply<PrimitiveType::TYPE_STRING>(
98
770k
                field.template get<TYPE_STRING>());
99
0
    case PrimitiveType::TYPE_CHAR:
100
0
        return visitor.template apply<PrimitiveType::TYPE_CHAR>(field.template get<TYPE_CHAR>());
101
0
    case PrimitiveType::TYPE_VARCHAR:
102
0
        return visitor.template apply<PrimitiveType::TYPE_VARCHAR>(
103
0
                field.template get<TYPE_VARCHAR>());
104
0
    case PrimitiveType::TYPE_VARBINARY:
105
0
        return visitor.template apply<PrimitiveType::TYPE_VARBINARY>(
106
0
                field.template get<TYPE_VARBINARY>());
107
2.60M
    case PrimitiveType::TYPE_ARRAY:
108
2.60M
        return visitor.template apply<PrimitiveType::TYPE_ARRAY>(field.template get<TYPE_ARRAY>());
109
1
    case PrimitiveType::TYPE_STRUCT:
110
1
        return visitor.template apply<PrimitiveType::TYPE_STRUCT>(
111
1
                field.template get<TYPE_STRUCT>());
112
0
    case PrimitiveType::TYPE_MAP:
113
0
        return visitor.template apply<PrimitiveType::TYPE_MAP>(field.template get<TYPE_MAP>());
114
1
    case PrimitiveType::TYPE_VARIANT:
115
1
        return visitor.template apply<PrimitiveType::TYPE_VARIANT>(
116
1
                field.template get<TYPE_VARIANT>());
117
756
    case PrimitiveType::TYPE_DECIMAL32:
118
756
        return visitor.template apply<PrimitiveType::TYPE_DECIMAL32>(
119
756
                field.template get<TYPE_DECIMAL32>());
120
696
    case PrimitiveType::TYPE_DECIMAL64:
121
696
        return visitor.template apply<PrimitiveType::TYPE_DECIMAL64>(
122
696
                field.template get<TYPE_DECIMAL64>());
123
0
    case PrimitiveType::TYPE_DECIMALV2:
124
0
        return visitor.template apply<PrimitiveType::TYPE_DECIMALV2>(
125
0
                field.template get<TYPE_DECIMALV2>());
126
734
    case PrimitiveType::TYPE_DECIMAL128I:
127
734
        return visitor.template apply<PrimitiveType::TYPE_DECIMAL128I>(
128
734
                field.template get<TYPE_DECIMAL128I>());
129
558
    case PrimitiveType::TYPE_DECIMAL256:
130
558
        return visitor.template apply<PrimitiveType::TYPE_DECIMAL256>(
131
558
                field.template get<TYPE_DECIMAL256>());
132
0
    case PrimitiveType::TYPE_BITMAP:
133
0
        return visitor.template apply<PrimitiveType::TYPE_BITMAP>(
134
0
                field.template get<TYPE_BITMAP>());
135
0
    case PrimitiveType::TYPE_HLL:
136
0
        return visitor.template apply<PrimitiveType::TYPE_HLL>(field.template get<TYPE_HLL>());
137
0
    case PrimitiveType::TYPE_QUANTILE_STATE:
138
0
        return visitor.template apply<PrimitiveType::TYPE_QUANTILE_STATE>(
139
0
                field.template get<TYPE_QUANTILE_STATE>());
140
26
    case PrimitiveType::TYPE_JSONB:
141
26
        return visitor.template apply<PrimitiveType::TYPE_JSONB>(field.template get<TYPE_JSONB>());
142
0
    default:
143
0
        throw doris::Exception(ErrorCode::INTERNAL_ERROR, "Bad type of Field {}",
144
0
                               static_cast<int>(field.get_type()));
145
0
        return {};
146
5.32M
    }
147
5.32M
}
_ZN5doris13apply_visitorINS_12variant_util32FieldVisitorToNumberOfDimensionsERKNS_5FieldEEENSt5decayIT_E4type10ResultTypeEOS7_OT0_
Line
Count
Source
43
20.3M
typename std::decay_t<Visitor>::ResultType apply_visitor(Visitor&& visitor, F&& field) {
44
20.3M
    switch (field.get_type()) {
45
109k
    case PrimitiveType::TYPE_NULL:
46
109k
        return visitor.template apply<PrimitiveType::TYPE_NULL>(field.template get<TYPE_NULL>());
47
0
    case PrimitiveType::TYPE_DATETIMEV2:
48
0
        return visitor.template apply<PrimitiveType::TYPE_DATETIMEV2>(
49
0
                field.template get<TYPE_DATETIMEV2>());
50
0
    case PrimitiveType::TYPE_TIMESTAMPTZ:
51
0
        return visitor.template apply<PrimitiveType::TYPE_TIMESTAMPTZ>(
52
0
                field.template get<TYPE_TIMESTAMPTZ>());
53
12.3k
    case PrimitiveType::TYPE_LARGEINT:
54
12.3k
        return visitor.template apply<PrimitiveType::TYPE_LARGEINT>(
55
12.3k
                field.template get<TYPE_LARGEINT>());
56
0
    case PrimitiveType::TYPE_DATETIME:
57
0
        return visitor.template apply<PrimitiveType::TYPE_DATETIME>(
58
0
                field.template get<TYPE_DATETIME>());
59
0
    case PrimitiveType::TYPE_DATE:
60
0
        return visitor.template apply<PrimitiveType::TYPE_DATE>(field.template get<TYPE_DATE>());
61
0
    case PrimitiveType::TYPE_DATEV2:
62
0
        return visitor.template apply<PrimitiveType::TYPE_DATEV2>(
63
0
                field.template get<TYPE_DATEV2>());
64
273k
    case PrimitiveType::TYPE_BOOLEAN:
65
273k
        return visitor.template apply<PrimitiveType::TYPE_BOOLEAN>(
66
273k
                field.template get<TYPE_BOOLEAN>());
67
2
    case PrimitiveType::TYPE_TINYINT:
68
2
        return visitor.template apply<PrimitiveType::TYPE_TINYINT>(
69
2
                field.template get<TYPE_TINYINT>());
70
7
    case PrimitiveType::TYPE_SMALLINT:
71
7
        return visitor.template apply<PrimitiveType::TYPE_SMALLINT>(
72
7
                field.template get<TYPE_SMALLINT>());
73
570
    case PrimitiveType::TYPE_INT:
74
570
        return visitor.template apply<PrimitiveType::TYPE_INT>(field.template get<TYPE_INT>());
75
4.94M
    case PrimitiveType::TYPE_BIGINT:
76
4.94M
        return visitor.template apply<PrimitiveType::TYPE_BIGINT>(
77
4.94M
                field.template get<TYPE_BIGINT>());
78
0
    case PrimitiveType::TYPE_UINT32:
79
0
        return visitor.template apply<PrimitiveType::TYPE_UINT32>(
80
0
                field.template get<TYPE_UINT32>());
81
0
    case PrimitiveType::TYPE_UINT64:
82
0
        return visitor.template apply<PrimitiveType::TYPE_UINT64>(
83
0
                field.template get<TYPE_UINT64>());
84
1
    case PrimitiveType::TYPE_FLOAT:
85
1
        return visitor.template apply<PrimitiveType::TYPE_FLOAT>(field.template get<TYPE_FLOAT>());
86
0
    case PrimitiveType::TYPE_TIMEV2:
87
0
        return visitor.template apply<PrimitiveType::TYPE_TIMEV2>(
88
0
                field.template get<TYPE_TIMEV2>());
89
2.77M
    case PrimitiveType::TYPE_DOUBLE:
90
2.77M
        return visitor.template apply<PrimitiveType::TYPE_DOUBLE>(
91
2.77M
                field.template get<TYPE_DOUBLE>());
92
0
    case PrimitiveType::TYPE_IPV4:
93
0
        return visitor.template apply<PrimitiveType::TYPE_IPV4>(field.template get<TYPE_IPV4>());
94
0
    case PrimitiveType::TYPE_IPV6:
95
0
        return visitor.template apply<PrimitiveType::TYPE_IPV6>(field.template get<TYPE_IPV6>());
96
10.5M
    case PrimitiveType::TYPE_STRING:
97
10.5M
        return visitor.template apply<PrimitiveType::TYPE_STRING>(
98
10.5M
                field.template get<TYPE_STRING>());
99
0
    case PrimitiveType::TYPE_CHAR:
100
0
        return visitor.template apply<PrimitiveType::TYPE_CHAR>(field.template get<TYPE_CHAR>());
101
0
    case PrimitiveType::TYPE_VARCHAR:
102
0
        return visitor.template apply<PrimitiveType::TYPE_VARCHAR>(
103
0
                field.template get<TYPE_VARCHAR>());
104
0
    case PrimitiveType::TYPE_VARBINARY:
105
0
        return visitor.template apply<PrimitiveType::TYPE_VARBINARY>(
106
0
                field.template get<TYPE_VARBINARY>());
107
1.83M
    case PrimitiveType::TYPE_ARRAY:
108
1.83M
        return visitor.template apply<PrimitiveType::TYPE_ARRAY>(field.template get<TYPE_ARRAY>());
109
1
    case PrimitiveType::TYPE_STRUCT:
110
1
        return visitor.template apply<PrimitiveType::TYPE_STRUCT>(
111
1
                field.template get<TYPE_STRUCT>());
112
0
    case PrimitiveType::TYPE_MAP:
113
0
        return visitor.template apply<PrimitiveType::TYPE_MAP>(field.template get<TYPE_MAP>());
114
1
    case PrimitiveType::TYPE_VARIANT:
115
1
        return visitor.template apply<PrimitiveType::TYPE_VARIANT>(
116
1
                field.template get<TYPE_VARIANT>());
117
0
    case PrimitiveType::TYPE_DECIMAL32:
118
0
        return visitor.template apply<PrimitiveType::TYPE_DECIMAL32>(
119
0
                field.template get<TYPE_DECIMAL32>());
120
0
    case PrimitiveType::TYPE_DECIMAL64:
121
0
        return visitor.template apply<PrimitiveType::TYPE_DECIMAL64>(
122
0
                field.template get<TYPE_DECIMAL64>());
123
0
    case PrimitiveType::TYPE_DECIMALV2:
124
0
        return visitor.template apply<PrimitiveType::TYPE_DECIMALV2>(
125
0
                field.template get<TYPE_DECIMALV2>());
126
0
    case PrimitiveType::TYPE_DECIMAL128I:
127
0
        return visitor.template apply<PrimitiveType::TYPE_DECIMAL128I>(
128
0
                field.template get<TYPE_DECIMAL128I>());
129
0
    case PrimitiveType::TYPE_DECIMAL256:
130
0
        return visitor.template apply<PrimitiveType::TYPE_DECIMAL256>(
131
0
                field.template get<TYPE_DECIMAL256>());
132
0
    case PrimitiveType::TYPE_BITMAP:
133
0
        return visitor.template apply<PrimitiveType::TYPE_BITMAP>(
134
0
                field.template get<TYPE_BITMAP>());
135
0
    case PrimitiveType::TYPE_HLL:
136
0
        return visitor.template apply<PrimitiveType::TYPE_HLL>(field.template get<TYPE_HLL>());
137
0
    case PrimitiveType::TYPE_QUANTILE_STATE:
138
0
        return visitor.template apply<PrimitiveType::TYPE_QUANTILE_STATE>(
139
0
                field.template get<TYPE_QUANTILE_STATE>());
140
46.8k
    case PrimitiveType::TYPE_JSONB:
141
46.8k
        return visitor.template apply<PrimitiveType::TYPE_JSONB>(field.template get<TYPE_JSONB>());
142
0
    default:
143
0
        throw doris::Exception(ErrorCode::INTERNAL_ERROR, "Bad type of Field {}",
144
0
                               static_cast<int>(field.get_type()));
145
0
        return {};
146
20.3M
    }
147
20.3M
}
_ZN5doris13apply_visitorIRNS_12variant_util32FieldVisitorToNumberOfDimensionsERKNS_5FieldEEENSt5decayIT_E4type10ResultTypeEOS8_OT0_
Line
Count
Source
43
3.48M
typename std::decay_t<Visitor>::ResultType apply_visitor(Visitor&& visitor, F&& field) {
44
3.48M
    switch (field.get_type()) {
45
13.4k
    case PrimitiveType::TYPE_NULL:
46
13.4k
        return visitor.template apply<PrimitiveType::TYPE_NULL>(field.template get<TYPE_NULL>());
47
480
    case PrimitiveType::TYPE_DATETIMEV2:
48
480
        return visitor.template apply<PrimitiveType::TYPE_DATETIMEV2>(
49
480
                field.template get<TYPE_DATETIMEV2>());
50
0
    case PrimitiveType::TYPE_TIMESTAMPTZ:
51
0
        return visitor.template apply<PrimitiveType::TYPE_TIMESTAMPTZ>(
52
0
                field.template get<TYPE_TIMESTAMPTZ>());
53
29.6k
    case PrimitiveType::TYPE_LARGEINT:
54
29.6k
        return visitor.template apply<PrimitiveType::TYPE_LARGEINT>(
55
29.6k
                field.template get<TYPE_LARGEINT>());
56
0
    case PrimitiveType::TYPE_DATETIME:
57
0
        return visitor.template apply<PrimitiveType::TYPE_DATETIME>(
58
0
                field.template get<TYPE_DATETIME>());
59
0
    case PrimitiveType::TYPE_DATE:
60
0
        return visitor.template apply<PrimitiveType::TYPE_DATE>(field.template get<TYPE_DATE>());
61
396
    case PrimitiveType::TYPE_DATEV2:
62
396
        return visitor.template apply<PrimitiveType::TYPE_DATEV2>(
63
396
                field.template get<TYPE_DATEV2>());
64
58.3k
    case PrimitiveType::TYPE_BOOLEAN:
65
58.3k
        return visitor.template apply<PrimitiveType::TYPE_BOOLEAN>(
66
58.3k
                field.template get<TYPE_BOOLEAN>());
67
1.03k
    case PrimitiveType::TYPE_TINYINT:
68
1.03k
        return visitor.template apply<PrimitiveType::TYPE_TINYINT>(
69
1.03k
                field.template get<TYPE_TINYINT>());
70
1.02k
    case PrimitiveType::TYPE_SMALLINT:
71
1.02k
        return visitor.template apply<PrimitiveType::TYPE_SMALLINT>(
72
1.02k
                field.template get<TYPE_SMALLINT>());
73
1.38k
    case PrimitiveType::TYPE_INT:
74
1.38k
        return visitor.template apply<PrimitiveType::TYPE_INT>(field.template get<TYPE_INT>());
75
1.65M
    case PrimitiveType::TYPE_BIGINT:
76
1.65M
        return visitor.template apply<PrimitiveType::TYPE_BIGINT>(
77
1.65M
                field.template get<TYPE_BIGINT>());
78
0
    case PrimitiveType::TYPE_UINT32:
79
0
        return visitor.template apply<PrimitiveType::TYPE_UINT32>(
80
0
                field.template get<TYPE_UINT32>());
81
0
    case PrimitiveType::TYPE_UINT64:
82
0
        return visitor.template apply<PrimitiveType::TYPE_UINT64>(
83
0
                field.template get<TYPE_UINT64>());
84
858
    case PrimitiveType::TYPE_FLOAT:
85
858
        return visitor.template apply<PrimitiveType::TYPE_FLOAT>(field.template get<TYPE_FLOAT>());
86
0
    case PrimitiveType::TYPE_TIMEV2:
87
0
        return visitor.template apply<PrimitiveType::TYPE_TIMEV2>(
88
0
                field.template get<TYPE_TIMEV2>());
89
190k
    case PrimitiveType::TYPE_DOUBLE:
90
190k
        return visitor.template apply<PrimitiveType::TYPE_DOUBLE>(
91
190k
                field.template get<TYPE_DOUBLE>());
92
306
    case PrimitiveType::TYPE_IPV4:
93
306
        return visitor.template apply<PrimitiveType::TYPE_IPV4>(field.template get<TYPE_IPV4>());
94
312
    case PrimitiveType::TYPE_IPV6:
95
312
        return visitor.template apply<PrimitiveType::TYPE_IPV6>(field.template get<TYPE_IPV6>());
96
770k
    case PrimitiveType::TYPE_STRING:
97
770k
        return visitor.template apply<PrimitiveType::TYPE_STRING>(
98
770k
                field.template get<TYPE_STRING>());
99
0
    case PrimitiveType::TYPE_CHAR:
100
0
        return visitor.template apply<PrimitiveType::TYPE_CHAR>(field.template get<TYPE_CHAR>());
101
0
    case PrimitiveType::TYPE_VARCHAR:
102
0
        return visitor.template apply<PrimitiveType::TYPE_VARCHAR>(
103
0
                field.template get<TYPE_VARCHAR>());
104
0
    case PrimitiveType::TYPE_VARBINARY:
105
0
        return visitor.template apply<PrimitiveType::TYPE_VARBINARY>(
106
0
                field.template get<TYPE_VARBINARY>());
107
766k
    case PrimitiveType::TYPE_ARRAY:
108
766k
        return visitor.template apply<PrimitiveType::TYPE_ARRAY>(field.template get<TYPE_ARRAY>());
109
0
    case PrimitiveType::TYPE_STRUCT:
110
0
        return visitor.template apply<PrimitiveType::TYPE_STRUCT>(
111
0
                field.template get<TYPE_STRUCT>());
112
0
    case PrimitiveType::TYPE_MAP:
113
0
        return visitor.template apply<PrimitiveType::TYPE_MAP>(field.template get<TYPE_MAP>());
114
0
    case PrimitiveType::TYPE_VARIANT:
115
0
        return visitor.template apply<PrimitiveType::TYPE_VARIANT>(
116
0
                field.template get<TYPE_VARIANT>());
117
756
    case PrimitiveType::TYPE_DECIMAL32:
118
756
        return visitor.template apply<PrimitiveType::TYPE_DECIMAL32>(
119
756
                field.template get<TYPE_DECIMAL32>());
120
696
    case PrimitiveType::TYPE_DECIMAL64:
121
696
        return visitor.template apply<PrimitiveType::TYPE_DECIMAL64>(
122
696
                field.template get<TYPE_DECIMAL64>());
123
0
    case PrimitiveType::TYPE_DECIMALV2:
124
0
        return visitor.template apply<PrimitiveType::TYPE_DECIMALV2>(
125
0
                field.template get<TYPE_DECIMALV2>());
126
734
    case PrimitiveType::TYPE_DECIMAL128I:
127
734
        return visitor.template apply<PrimitiveType::TYPE_DECIMAL128I>(
128
734
                field.template get<TYPE_DECIMAL128I>());
129
558
    case PrimitiveType::TYPE_DECIMAL256:
130
558
        return visitor.template apply<PrimitiveType::TYPE_DECIMAL256>(
131
558
                field.template get<TYPE_DECIMAL256>());
132
0
    case PrimitiveType::TYPE_BITMAP:
133
0
        return visitor.template apply<PrimitiveType::TYPE_BITMAP>(
134
0
                field.template get<TYPE_BITMAP>());
135
0
    case PrimitiveType::TYPE_HLL:
136
0
        return visitor.template apply<PrimitiveType::TYPE_HLL>(field.template get<TYPE_HLL>());
137
0
    case PrimitiveType::TYPE_QUANTILE_STATE:
138
0
        return visitor.template apply<PrimitiveType::TYPE_QUANTILE_STATE>(
139
0
                field.template get<TYPE_QUANTILE_STATE>());
140
26
    case PrimitiveType::TYPE_JSONB:
141
26
        return visitor.template apply<PrimitiveType::TYPE_JSONB>(field.template get<TYPE_JSONB>());
142
0
    default:
143
0
        throw doris::Exception(ErrorCode::INTERNAL_ERROR, "Bad type of Field {}",
144
0
                               static_cast<int>(field.get_type()));
145
0
        return {};
146
3.48M
    }
147
3.48M
}
_ZN5doris13apply_visitorIRNS_12variant_util30SimpleFieldVisitorToScalarTypeERKNS_5FieldEEENSt5decayIT_E4type10ResultTypeEOS8_OT0_
Line
Count
Source
43
18.5M
typename std::decay_t<Visitor>::ResultType apply_visitor(Visitor&& visitor, F&& field) {
44
18.5M
    switch (field.get_type()) {
45
109k
    case PrimitiveType::TYPE_NULL:
46
109k
        return visitor.template apply<PrimitiveType::TYPE_NULL>(field.template get<TYPE_NULL>());
47
0
    case PrimitiveType::TYPE_DATETIMEV2:
48
0
        return visitor.template apply<PrimitiveType::TYPE_DATETIMEV2>(
49
0
                field.template get<TYPE_DATETIMEV2>());
50
0
    case PrimitiveType::TYPE_TIMESTAMPTZ:
51
0
        return visitor.template apply<PrimitiveType::TYPE_TIMESTAMPTZ>(
52
0
                field.template get<TYPE_TIMESTAMPTZ>());
53
12.3k
    case PrimitiveType::TYPE_LARGEINT:
54
12.3k
        return visitor.template apply<PrimitiveType::TYPE_LARGEINT>(
55
12.3k
                field.template get<TYPE_LARGEINT>());
56
0
    case PrimitiveType::TYPE_DATETIME:
57
0
        return visitor.template apply<PrimitiveType::TYPE_DATETIME>(
58
0
                field.template get<TYPE_DATETIME>());
59
0
    case PrimitiveType::TYPE_DATE:
60
0
        return visitor.template apply<PrimitiveType::TYPE_DATE>(field.template get<TYPE_DATE>());
61
0
    case PrimitiveType::TYPE_DATEV2:
62
0
        return visitor.template apply<PrimitiveType::TYPE_DATEV2>(
63
0
                field.template get<TYPE_DATEV2>());
64
273k
    case PrimitiveType::TYPE_BOOLEAN:
65
273k
        return visitor.template apply<PrimitiveType::TYPE_BOOLEAN>(
66
273k
                field.template get<TYPE_BOOLEAN>());
67
2
    case PrimitiveType::TYPE_TINYINT:
68
2
        return visitor.template apply<PrimitiveType::TYPE_TINYINT>(
69
2
                field.template get<TYPE_TINYINT>());
70
7
    case PrimitiveType::TYPE_SMALLINT:
71
7
        return visitor.template apply<PrimitiveType::TYPE_SMALLINT>(
72
7
                field.template get<TYPE_SMALLINT>());
73
570
    case PrimitiveType::TYPE_INT:
74
570
        return visitor.template apply<PrimitiveType::TYPE_INT>(field.template get<TYPE_INT>());
75
4.94M
    case PrimitiveType::TYPE_BIGINT:
76
4.94M
        return visitor.template apply<PrimitiveType::TYPE_BIGINT>(
77
4.94M
                field.template get<TYPE_BIGINT>());
78
0
    case PrimitiveType::TYPE_UINT32:
79
0
        return visitor.template apply<PrimitiveType::TYPE_UINT32>(
80
0
                field.template get<TYPE_UINT32>());
81
0
    case PrimitiveType::TYPE_UINT64:
82
0
        return visitor.template apply<PrimitiveType::TYPE_UINT64>(
83
0
                field.template get<TYPE_UINT64>());
84
1
    case PrimitiveType::TYPE_FLOAT:
85
1
        return visitor.template apply<PrimitiveType::TYPE_FLOAT>(field.template get<TYPE_FLOAT>());
86
0
    case PrimitiveType::TYPE_TIMEV2:
87
0
        return visitor.template apply<PrimitiveType::TYPE_TIMEV2>(
88
0
                field.template get<TYPE_TIMEV2>());
89
2.78M
    case PrimitiveType::TYPE_DOUBLE:
90
2.78M
        return visitor.template apply<PrimitiveType::TYPE_DOUBLE>(
91
2.78M
                field.template get<TYPE_DOUBLE>());
92
0
    case PrimitiveType::TYPE_IPV4:
93
0
        return visitor.template apply<PrimitiveType::TYPE_IPV4>(field.template get<TYPE_IPV4>());
94
0
    case PrimitiveType::TYPE_IPV6:
95
0
        return visitor.template apply<PrimitiveType::TYPE_IPV6>(field.template get<TYPE_IPV6>());
96
10.6M
    case PrimitiveType::TYPE_STRING:
97
10.6M
        return visitor.template apply<PrimitiveType::TYPE_STRING>(
98
10.6M
                field.template get<TYPE_STRING>());
99
0
    case PrimitiveType::TYPE_CHAR:
100
0
        return visitor.template apply<PrimitiveType::TYPE_CHAR>(field.template get<TYPE_CHAR>());
101
0
    case PrimitiveType::TYPE_VARCHAR:
102
0
        return visitor.template apply<PrimitiveType::TYPE_VARCHAR>(
103
0
                field.template get<TYPE_VARCHAR>());
104
0
    case PrimitiveType::TYPE_VARBINARY:
105
0
        return visitor.template apply<PrimitiveType::TYPE_VARBINARY>(
106
0
                field.template get<TYPE_VARBINARY>());
107
0
    case PrimitiveType::TYPE_ARRAY:
108
0
        return visitor.template apply<PrimitiveType::TYPE_ARRAY>(field.template get<TYPE_ARRAY>());
109
0
    case PrimitiveType::TYPE_STRUCT:
110
0
        return visitor.template apply<PrimitiveType::TYPE_STRUCT>(
111
0
                field.template get<TYPE_STRUCT>());
112
0
    case PrimitiveType::TYPE_MAP:
113
0
        return visitor.template apply<PrimitiveType::TYPE_MAP>(field.template get<TYPE_MAP>());
114
0
    case PrimitiveType::TYPE_VARIANT:
115
0
        return visitor.template apply<PrimitiveType::TYPE_VARIANT>(
116
0
                field.template get<TYPE_VARIANT>());
117
0
    case PrimitiveType::TYPE_DECIMAL32:
118
0
        return visitor.template apply<PrimitiveType::TYPE_DECIMAL32>(
119
0
                field.template get<TYPE_DECIMAL32>());
120
0
    case PrimitiveType::TYPE_DECIMAL64:
121
0
        return visitor.template apply<PrimitiveType::TYPE_DECIMAL64>(
122
0
                field.template get<TYPE_DECIMAL64>());
123
0
    case PrimitiveType::TYPE_DECIMALV2:
124
0
        return visitor.template apply<PrimitiveType::TYPE_DECIMALV2>(
125
0
                field.template get<TYPE_DECIMALV2>());
126
0
    case PrimitiveType::TYPE_DECIMAL128I:
127
0
        return visitor.template apply<PrimitiveType::TYPE_DECIMAL128I>(
128
0
                field.template get<TYPE_DECIMAL128I>());
129
0
    case PrimitiveType::TYPE_DECIMAL256:
130
0
        return visitor.template apply<PrimitiveType::TYPE_DECIMAL256>(
131
0
                field.template get<TYPE_DECIMAL256>());
132
0
    case PrimitiveType::TYPE_BITMAP:
133
0
        return visitor.template apply<PrimitiveType::TYPE_BITMAP>(
134
0
                field.template get<TYPE_BITMAP>());
135
0
    case PrimitiveType::TYPE_HLL:
136
0
        return visitor.template apply<PrimitiveType::TYPE_HLL>(field.template get<TYPE_HLL>());
137
0
    case PrimitiveType::TYPE_QUANTILE_STATE:
138
0
        return visitor.template apply<PrimitiveType::TYPE_QUANTILE_STATE>(
139
0
                field.template get<TYPE_QUANTILE_STATE>());
140
46.8k
    case PrimitiveType::TYPE_JSONB:
141
46.8k
        return visitor.template apply<PrimitiveType::TYPE_JSONB>(field.template get<TYPE_JSONB>());
142
0
    default:
143
0
        throw doris::Exception(ErrorCode::INTERNAL_ERROR, "Bad type of Field {}",
144
0
                               static_cast<int>(field.get_type()));
145
0
        return {};
146
18.5M
    }
147
18.5M
}
148
149
} // namespace doris