Coverage Report

Created: 2026-09-17 09:47

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
be/src/exec/operator/operator.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
18
#include "exec/operator/operator.h"
19
20
#include <algorithm>
21
22
#include "common/status.h"
23
#include "exec/common/util.hpp"
24
#include "exec/exchange/local_exchange_sink_operator.h"
25
#include "exec/exchange/local_exchange_source_operator.h"
26
#include "exec/operator/aggregation_sink_operator.h"
27
#include "exec/operator/aggregation_source_operator.h"
28
#include "exec/operator/analytic_sink_operator.h"
29
#include "exec/operator/analytic_source_operator.h"
30
#include "exec/operator/assert_num_rows_operator.h"
31
#include "exec/operator/blackhole_sink_operator.h"
32
#include "exec/operator/bucketed_aggregation_sink_operator.h"
33
#include "exec/operator/bucketed_aggregation_source_operator.h"
34
#include "exec/operator/cache_sink_operator.h"
35
#include "exec/operator/cache_source_operator.h"
36
#include "exec/operator/datagen_operator.h"
37
#include "exec/operator/dict_sink_operator.h"
38
#include "exec/operator/distinct_streaming_aggregation_operator.h"
39
#include "exec/operator/empty_set_operator.h"
40
#include "exec/operator/exchange_sink_operator.h"
41
#include "exec/operator/exchange_source_operator.h"
42
#include "exec/operator/file_scan_operator.h"
43
#include "exec/operator/group_commit_block_sink_operator.h"
44
#include "exec/operator/group_commit_scan_operator.h"
45
#include "exec/operator/hashjoin_build_sink.h"
46
#include "exec/operator/hashjoin_probe_operator.h"
47
#include "exec/operator/hive_table_sink_operator.h"
48
#include "exec/operator/iceberg_delete_sink_operator.h"
49
#include "exec/operator/iceberg_merge_sink_operator.h"
50
#include "exec/operator/iceberg_table_sink_operator.h"
51
#include "exec/operator/jdbc_scan_operator.h"
52
#include "exec/operator/jdbc_table_sink_operator.h"
53
#include "exec/operator/local_merge_sort_source_operator.h"
54
#include "exec/operator/materialization_opertor.h"
55
#include "exec/operator/maxcompute_table_sink_operator.h"
56
#include "exec/operator/memory_scratch_sink_operator.h"
57
#include "exec/operator/meta_scan_operator.h"
58
#include "exec/operator/mock_operator.h"
59
#include "exec/operator/mock_scan_operator.h"
60
#include "exec/operator/multi_cast_data_stream_sink.h"
61
#include "exec/operator/multi_cast_data_stream_source.h"
62
#include "exec/operator/nested_loop_join_build_operator.h"
63
#include "exec/operator/nested_loop_join_probe_operator.h"
64
#include "exec/operator/olap_scan_operator.h"
65
#include "exec/operator/olap_table_sink_operator.h"
66
#include "exec/operator/olap_table_sink_v2_operator.h"
67
#include "exec/operator/partition_sort_sink_operator.h"
68
#include "exec/operator/partition_sort_source_operator.h"
69
#include "exec/operator/partitioned_aggregation_sink_operator.h"
70
#include "exec/operator/partitioned_aggregation_source_operator.h"
71
#include "exec/operator/partitioned_hash_join_probe_operator.h"
72
#include "exec/operator/partitioned_hash_join_sink_operator.h"
73
#include "exec/operator/rec_cte_anchor_sink_operator.h"
74
#include "exec/operator/rec_cte_scan_operator.h"
75
#include "exec/operator/rec_cte_sink_operator.h"
76
#include "exec/operator/rec_cte_source_operator.h"
77
#include "exec/operator/repeat_operator.h"
78
#include "exec/operator/result_file_sink_operator.h"
79
#include "exec/operator/result_sink_operator.h"
80
#include "exec/operator/schema_scan_operator.h"
81
#include "exec/operator/select_operator.h"
82
#include "exec/operator/set_probe_sink_operator.h"
83
#include "exec/operator/set_sink_operator.h"
84
#include "exec/operator/set_source_operator.h"
85
#include "exec/operator/sort_sink_operator.h"
86
#include "exec/operator/sort_source_operator.h"
87
#include "exec/operator/spill_iceberg_table_sink_operator.h"
88
#include "exec/operator/spill_sort_sink_operator.h"
89
#include "exec/operator/spill_sort_source_operator.h"
90
#include "exec/operator/streaming_aggregation_operator.h"
91
#include "exec/operator/table_function_operator.h"
92
#include "exec/operator/tvf_table_sink_operator.h"
93
#include "exec/operator/union_sink_operator.h"
94
#include "exec/operator/union_source_operator.h"
95
#include "exec/pipeline/dependency.h"
96
#include "exec/pipeline/pipeline.h"
97
#include "exprs/vexpr.h"
98
#include "exprs/vexpr_context.h"
99
#include "runtime/runtime_profile.h"
100
#include "runtime/runtime_profile_counter_names.h"
101
#include "util/debug_util.h"
102
#include "util/string_util.h"
103
104
namespace doris {
105
class RowDescriptor;
106
class RuntimeState;
107
} // namespace doris
108
109
namespace doris {
110
111
0
Status OperatorBase::close(RuntimeState* state) {
112
0
    if (_is_closed) {
113
0
        return Status::OK();
114
0
    }
115
0
    _is_closed = true;
116
0
    return Status::OK();
117
0
}
118
119
template <typename SharedStateArg>
120
2.01M
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
2.01M
    if (_parent->nereids_id() == -1) {
122
1.07M
        return fmt::format("(id={})", _parent->node_id());
123
1.07M
    } else {
124
944k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
944k
    }
126
2.01M
}
_ZNK5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
68.6k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
68.6k
    if (_parent->nereids_id() == -1) {
122
0
        return fmt::format("(id={})", _parent->node_id());
123
68.6k
    } else {
124
68.6k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
68.6k
    }
126
68.6k
}
_ZNK5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
1
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
1
    if (_parent->nereids_id() == -1) {
122
1
        return fmt::format("(id={})", _parent->node_id());
123
1
    } else {
124
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
0
    }
126
1
}
_ZNK5doris19PipelineXLocalStateINS_15SortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
184k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
184k
    if (_parent->nereids_id() == -1) {
122
12
        return fmt::format("(id={})", _parent->node_id());
123
184k
    } else {
124
184k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
184k
    }
126
184k
}
_ZNK5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
20
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
20
    if (_parent->nereids_id() == -1) {
122
0
        return fmt::format("(id={})", _parent->node_id());
123
20
    } else {
124
20
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
20
    }
126
20
}
_ZNK5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
6.13k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
6.13k
    if (_parent->nereids_id() == -1) {
122
0
        return fmt::format("(id={})", _parent->node_id());
123
6.13k
    } else {
124
6.13k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
6.13k
    }
126
6.13k
}
_ZNK5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
7.59k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
7.59k
    if (_parent->nereids_id() == -1) {
122
12
        return fmt::format("(id={})", _parent->node_id());
123
7.58k
    } else {
124
7.58k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
7.58k
    }
126
7.59k
}
_ZNK5doris19PipelineXLocalStateINS_14AggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
90.3k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
90.3k
    if (_parent->nereids_id() == -1) {
122
29
        return fmt::format("(id={})", _parent->node_id());
123
90.3k
    } else {
124
90.3k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
90.3k
    }
126
90.3k
}
_ZNK5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
68.6k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
68.6k
    if (_parent->nereids_id() == -1) {
122
0
        return fmt::format("(id={})", _parent->node_id());
123
68.6k
    } else {
124
68.6k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
68.6k
    }
126
68.6k
}
_ZNK5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
48
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
48
    if (_parent->nereids_id() == -1) {
122
0
        return fmt::format("(id={})", _parent->node_id());
123
48
    } else {
124
48
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
48
    }
126
48
}
_ZNK5doris19PipelineXLocalStateINS_15FakeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
802k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
802k
    if (_parent->nereids_id() == -1) {
122
342k
        return fmt::format("(id={})", _parent->node_id());
123
460k
    } else {
124
460k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
460k
    }
126
802k
}
_ZNK5doris19PipelineXLocalStateINS_16UnionSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
53.3k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
53.3k
    if (_parent->nereids_id() == -1) {
122
2
        return fmt::format("(id={})", _parent->node_id());
123
53.3k
    } else {
124
53.3k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
53.3k
    }
126
53.3k
}
_ZNK5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
26
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
26
    if (_parent->nereids_id() == -1) {
122
26
        return fmt::format("(id={})", _parent->node_id());
123
26
    } else {
124
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
0
    }
126
26
}
_ZNK5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
4.44k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
4.44k
    if (_parent->nereids_id() == -1) {
122
4.43k
        return fmt::format("(id={})", _parent->node_id());
123
4.43k
    } else {
124
5
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
5
    }
126
4.44k
}
_ZNK5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
501
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
501
    if (_parent->nereids_id() == -1) {
122
102
        return fmt::format("(id={})", _parent->node_id());
123
399
    } else {
124
399
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
399
    }
126
501
}
_ZNK5doris19PipelineXLocalStateINS_14SetSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
5.09k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
5.09k
    if (_parent->nereids_id() == -1) {
122
13
        return fmt::format("(id={})", _parent->node_id());
123
5.08k
    } else {
124
5.08k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
5.08k
    }
126
5.09k
}
_ZNK5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
722k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
723k
    if (_parent->nereids_id() == -1) {
122
723k
        return fmt::format("(id={})", _parent->node_id());
123
18.4E
    } else {
124
18.4E
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
18.4E
    }
126
722k
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_16BasicSharedStateEE11name_suffixB5cxx11Ev
_ZNK5doris19PipelineXLocalStateINS_17RecCTESharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
169
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
169
    if (_parent->nereids_id() == -1) {
122
0
        return fmt::format("(id={})", _parent->node_id());
123
169
    } else {
124
169
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
169
    }
126
169
}
127
128
template <typename SharedStateArg>
129
1.27M
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
1.27M
    if (_parent->nereids_id() == -1) {
131
793k
        return fmt::format("(id={})", _parent->node_id());
132
793k
    } else {
133
483k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
483k
    }
135
1.27M
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
116k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
116k
    if (_parent->nereids_id() == -1) {
131
0
        return fmt::format("(id={})", _parent->node_id());
132
116k
    } else {
133
116k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
116k
    }
135
116k
}
_ZN5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
2
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
2
    if (_parent->nereids_id() == -1) {
131
1
        return fmt::format("(id={})", _parent->node_id());
132
1
    } else {
133
1
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
1
    }
135
2
}
_ZN5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
185k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
185k
    if (_parent->nereids_id() == -1) {
131
9
        return fmt::format("(id={})", _parent->node_id());
132
185k
    } else {
133
185k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
185k
    }
135
185k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
27
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
27
    if (_parent->nereids_id() == -1) {
131
0
        return fmt::format("(id={})", _parent->node_id());
132
27
    } else {
133
27
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
27
    }
135
27
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
6.14k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
6.14k
    if (_parent->nereids_id() == -1) {
131
0
        return fmt::format("(id={})", _parent->node_id());
132
6.14k
    } else {
133
6.14k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
6.14k
    }
135
6.14k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
7.66k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
7.66k
    if (_parent->nereids_id() == -1) {
131
12
        return fmt::format("(id={})", _parent->node_id());
132
7.65k
    } else {
133
7.65k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
7.65k
    }
135
7.66k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
90.9k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
90.9k
    if (_parent->nereids_id() == -1) {
131
29
        return fmt::format("(id={})", _parent->node_id());
132
90.9k
    } else {
133
90.9k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
90.9k
    }
135
90.9k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
68.4k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
68.4k
    if (_parent->nereids_id() == -1) {
131
0
        return fmt::format("(id={})", _parent->node_id());
132
68.4k
    } else {
133
68.4k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
68.4k
    }
135
68.4k
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
58
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
58
    if (_parent->nereids_id() == -1) {
131
0
        return fmt::format("(id={})", _parent->node_id());
132
58
    } else {
133
58
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
58
    }
135
58
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
6
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
6
    if (_parent->nereids_id() == -1) {
131
6
        return fmt::format("(id={})", _parent->node_id());
132
6
    } else {
133
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
0
    }
135
6
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
7.78k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
7.78k
    if (_parent->nereids_id() == -1) {
131
3
        return fmt::format("(id={})", _parent->node_id());
132
7.77k
    } else {
133
7.77k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
7.77k
    }
135
7.78k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
502
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
502
    if (_parent->nereids_id() == -1) {
131
102
        return fmt::format("(id={})", _parent->node_id());
132
400
    } else {
133
400
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
400
    }
135
502
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE11name_suffixB5cxx11Ev
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
12.4k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
12.4k
    if (_parent->nereids_id() == -1) {
131
12.4k
        return fmt::format("(id={})", _parent->node_id());
132
18.4E
    } else {
133
18.4E
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
18.4E
    }
135
12.4k
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
300k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
301k
    if (_parent->nereids_id() == -1) {
131
301k
        return fmt::format("(id={})", _parent->node_id());
132
18.4E
    } else {
133
18.4E
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
18.4E
    }
135
300k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
478k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
479k
    if (_parent->nereids_id() == -1) {
131
479k
        return fmt::format("(id={})", _parent->node_id());
132
18.4E
    } else {
133
18.4E
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
18.4E
    }
135
478k
}
_ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
25
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
25
    if (_parent->nereids_id() == -1) {
131
25
        return fmt::format("(id={})", _parent->node_id());
132
25
    } else {
133
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
0
    }
135
25
}
_ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
338
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
338
    if (_parent->nereids_id() == -1) {
131
0
        return fmt::format("(id={})", _parent->node_id());
132
338
    } else {
133
338
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
338
    }
135
338
}
136
137
template <typename SharedStateArg>
138
31.0k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
31.0k
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
31.0k
    _terminated = true;
143
31.0k
    return Status::OK();
144
31.0k
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
24.0k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
24.0k
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
24.0k
    _terminated = true;
143
24.0k
    return Status::OK();
144
24.0k
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
3.32k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
3.32k
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
3.32k
    _terminated = true;
143
3.32k
    return Status::OK();
144
3.32k
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
2
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
2
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
2
    _terminated = true;
143
2
    return Status::OK();
144
2
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
5
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
5
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
5
    _terminated = true;
143
5
    return Status::OK();
144
5
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
1.96k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
1.96k
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
1.96k
    _terminated = true;
143
1.96k
    return Status::OK();
144
1.96k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
454
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
454
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
454
    _terminated = true;
143
454
    return Status::OK();
144
454
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
333
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
333
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
333
    _terminated = true;
143
333
    return Status::OK();
144
333
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
259
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
259
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
259
    _terminated = true;
143
259
    return Status::OK();
144
259
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
6
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
6
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
6
    _terminated = true;
143
6
    return Status::OK();
144
6
}
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
207
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
207
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
207
    _terminated = true;
143
207
    return Status::OK();
144
207
}
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
12
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
12
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
12
    _terminated = true;
143
12
    return Status::OK();
144
12
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
303
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
303
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
303
    _terminated = true;
143
303
    return Status::OK();
144
303
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE9terminateEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
135
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
135
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
135
    _terminated = true;
143
135
    return Status::OK();
144
135
}
145
146
311k
DataDistribution OperatorBase::required_data_distribution(RuntimeState* /*state*/) const {
147
311k
    return _child && _child->is_serial_operator() && !is_source()
148
311k
                   ? DataDistribution(TLocalPartitionType::PASSTHROUGH)
149
311k
                   : DataDistribution(TLocalPartitionType::NOOP);
150
311k
}
151
152
25.1k
bool OperatorBase::child_breaks_local_key_distribution(RuntimeState* state) const {
153
25.1k
    if (!_child) {
154
24.0k
        return false;
155
24.0k
    }
156
1.08k
    if (_child->is_serial_operator()) {
157
129
        return true;
158
129
    }
159
956
    const auto child_distribution = _child->required_data_distribution(state);
160
956
    return child_distribution.need_local_exchange() &&
161
956
           !is_shuffled_exchange(child_distribution.distribution_type);
162
1.08k
}
163
164
template <typename SharedStateArg>
165
13.8k
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
166
13.8k
    fmt::memory_buffer debug_string_buffer;
167
13.8k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
168
13.8k
    return fmt::to_string(debug_string_buffer);
169
13.8k
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
165
3
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
166
3
    fmt::memory_buffer debug_string_buffer;
167
3
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
168
3
    return fmt::to_string(debug_string_buffer);
169
3
}
_ZNK5doris19PipelineXLocalStateINS_15SortSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
165
80
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
166
80
    fmt::memory_buffer debug_string_buffer;
167
80
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
168
80
    return fmt::to_string(debug_string_buffer);
169
80
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris19PipelineXLocalStateINS_14AggSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
165
80
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
166
80
    fmt::memory_buffer debug_string_buffer;
167
80
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
168
80
    return fmt::to_string(debug_string_buffer);
169
80
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris19PipelineXLocalStateINS_15FakeSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
165
13.4k
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
166
13.4k
    fmt::memory_buffer debug_string_buffer;
167
13.4k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
168
13.4k
    return fmt::to_string(debug_string_buffer);
169
13.4k
}
_ZNK5doris19PipelineXLocalStateINS_16UnionSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
165
1
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
166
1
    fmt::memory_buffer debug_string_buffer;
167
1
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
168
1
    return fmt::to_string(debug_string_buffer);
169
1
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_14SetSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
165
240
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
166
240
    fmt::memory_buffer debug_string_buffer;
167
240
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
168
240
    return fmt::to_string(debug_string_buffer);
169
240
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_16BasicSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_17RecCTESharedStateEE12debug_stringB5cxx11Ei
170
171
template <typename SharedStateArg>
172
13.8k
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
173
13.8k
    fmt::memory_buffer debug_string_buffer;
174
13.8k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
175
13.8k
    return fmt::to_string(debug_string_buffer);
176
13.8k
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
172
80
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
173
80
    fmt::memory_buffer debug_string_buffer;
174
80
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
175
80
    return fmt::to_string(debug_string_buffer);
176
80
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
172
80
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
173
80
    fmt::memory_buffer debug_string_buffer;
174
80
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
175
80
    return fmt::to_string(debug_string_buffer);
176
80
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
172
162
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
173
162
    fmt::memory_buffer debug_string_buffer;
174
162
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
175
162
    return fmt::to_string(debug_string_buffer);
176
162
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
172
165
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
173
165
    fmt::memory_buffer debug_string_buffer;
174
165
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
175
165
    return fmt::to_string(debug_string_buffer);
176
165
}
_ZNK5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
172
13.3k
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
173
13.3k
    fmt::memory_buffer debug_string_buffer;
174
13.3k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
175
13.3k
    return fmt::to_string(debug_string_buffer);
176
13.3k
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE12debug_stringB5cxx11Ei
177
178
13.9k
std::string OperatorXBase::debug_string(int indentation_level) const {
179
13.9k
    fmt::memory_buffer debug_string_buffer;
180
13.9k
    fmt::format_to(debug_string_buffer, "{}{}: id={}, parallel_tasks={}, _is_serial_operator={}",
181
13.9k
                   std::string(indentation_level * 2, ' '), _op_name, node_id(), _parallel_tasks,
182
13.9k
                   _is_serial_operator);
183
13.9k
    return fmt::to_string(debug_string_buffer);
184
13.9k
}
185
186
13.8k
std::string OperatorXBase::debug_string(RuntimeState* state, int indentation_level) const {
187
13.8k
    return state->get_local_state(operator_id())->debug_string(indentation_level);
188
13.8k
}
189
190
668k
Status OperatorXBase::init(const TPlanNode& tnode, RuntimeState* state) {
191
668k
    std::string node_name = print_plan_node_type(tnode.node_type);
192
668k
    _nereids_id = tnode.nereids_id;
193
668k
    if (!tnode.intermediate_output_tuple_id_list.empty()) {
194
3.86k
        if (!has_projection()) {
195
0
            return Status::InternalError("no final output tuple id");
196
0
        }
197
3.86k
        if (tnode.intermediate_output_tuple_id_list.size() !=
198
3.86k
            tnode.intermediate_projections_list.size()) {
199
0
            return Status::InternalError(
200
0
                    "intermediate_output_tuple_id_list size:{} not match "
201
0
                    "intermediate_projections_list size:{}",
202
0
                    tnode.intermediate_output_tuple_id_list.size(),
203
0
                    tnode.intermediate_projections_list.size());
204
0
        }
205
3.86k
    }
206
668k
    auto substr = node_name.substr(0, node_name.find("_NODE"));
207
668k
    _op_name = substr + "_OPERATOR";
208
209
668k
    if (tnode.__isset.vconjunct) {
210
0
        return Status::InternalError("vconjunct is not supported yet");
211
668k
    } else if (tnode.__isset.conjuncts) {
212
272k
        for (const auto& conjunct : tnode.conjuncts) {
213
272k
            VExprContextSPtr context;
214
272k
            RETURN_IF_ERROR(VExpr::create_expr_tree(conjunct, context));
215
272k
            _conjuncts.emplace_back(context);
216
272k
        }
217
98.9k
    }
218
219
    // create the projections expr
220
668k
    if (tnode.__isset.projections) {
221
259k
        RETURN_IF_ERROR(VExpr::create_expr_trees(tnode.projections, _projection->projections));
222
259k
    }
223
668k
    if (!tnode.intermediate_projections_list.empty()) {
224
3.86k
        DCHECK(has_projection()) << "no final projections";
225
3.86k
        _projection->intermediate_projections.reserve(tnode.intermediate_projections_list.size());
226
6.50k
        for (const auto& tnode_projections : tnode.intermediate_projections_list) {
227
6.50k
            VExprContextSPtrs projections;
228
6.50k
            RETURN_IF_ERROR(VExpr::create_expr_trees(tnode_projections, projections));
229
6.50k
            _projection->intermediate_projections.push_back(projections);
230
6.50k
        }
231
3.86k
    }
232
668k
    return Status::OK();
233
668k
}
234
235
695k
Status OperatorXBase::prepare(RuntimeState* state) {
236
695k
    for (auto& conjunct : _conjuncts) {
237
272k
        RETURN_IF_ERROR(conjunct->prepare(state, operator_row_desc_before_projection()));
238
272k
    }
239
695k
    if (state->enable_adjust_conjunct_order_by_cost()) {
240
645k
        std::ranges::stable_sort(_conjuncts, [](const auto& a, const auto& b) {
241
338k
            return a->execute_cost() < b->execute_cost();
242
338k
        });
243
645k
    };
244
245
695k
    if (has_projection()) {
246
259k
        auto& projection = *_projection;
247
265k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
248
6.50k
            const auto& input_row_desc =
249
6.50k
                    i == 0 ? operator_row_desc_before_projection()
250
6.50k
                           : projection.intermediate_output_row_descriptors[i - 1];
251
6.50k
            RETURN_IF_ERROR(
252
6.50k
                    VExpr::prepare(projection.intermediate_projections[i], state, input_row_desc));
253
6.50k
        }
254
259k
        const auto& final_projection_input_row_desc =
255
259k
                projection.intermediate_output_row_descriptors.empty()
256
259k
                        ? operator_row_desc_before_projection()
257
259k
                        : projection.intermediate_output_row_descriptors.back();
258
259k
        RETURN_IF_ERROR(
259
259k
                VExpr::prepare(projection.projections, state, final_projection_input_row_desc));
260
259k
        RETURN_IF_ERROR(VExpr::check_expr_output_type(projection.projections,
261
259k
                                                      projection.output_row_descriptor));
262
259k
    }
263
264
695k
    for (auto& conjunct : _conjuncts) {
265
272k
        RETURN_IF_ERROR(conjunct->open(state));
266
272k
    }
267
695k
    if (has_projection()) {
268
259k
        RETURN_IF_ERROR(VExpr::open(_projection->projections, state));
269
259k
        for (auto& projections : _projection->intermediate_projections) {
270
6.50k
            RETURN_IF_ERROR(VExpr::open(projections, state));
271
6.50k
        }
272
259k
    }
273
695k
    if (_child && !is_source()) {
274
104k
        RETURN_IF_ERROR(_child->prepare(state));
275
104k
    }
276
277
695k
    if (VExpr::contains_blockable_function(_conjuncts) ||
278
695k
        (has_projection() && VExpr::contains_blockable_function(_projection->projections))) {
279
0
        _blockable = true;
280
0
    }
281
282
695k
    return Status::OK();
283
695k
}
284
285
7.85k
Status OperatorXBase::terminate(RuntimeState* state) {
286
7.85k
    if (_child && !is_source()) {
287
782
        RETURN_IF_ERROR(_child->terminate(state));
288
782
    }
289
7.85k
    auto result = state->get_local_state_result(operator_id());
290
7.85k
    if (!result) {
291
0
        return result.error();
292
0
    }
293
7.85k
    return result.value()->terminate(state);
294
7.85k
}
295
296
5.58M
Status OperatorXBase::close(RuntimeState* state) {
297
5.58M
    if (_child && !is_source()) {
298
1.06M
        RETURN_IF_ERROR(_child->close(state));
299
1.06M
    }
300
5.58M
    auto result = state->get_local_state_result(operator_id());
301
5.58M
    if (!result) {
302
0
        return result.error();
303
0
    }
304
5.58M
    return result.value()->close(state);
305
5.58M
}
306
307
276k
void PipelineXLocalStateBase::clear_origin_block() {
308
276k
    _origin_block.clear_column_data(
309
276k
            _parent->operator_row_desc_before_projection().num_materialized_slots());
310
276k
}
311
312
849k
Status PipelineXLocalStateBase::filter_block(const VExprContextSPtrs& expr_contexts, Block* block) {
313
849k
    RETURN_IF_ERROR(VExprContext::filter_block(expr_contexts, block, block->columns()));
314
315
849k
    _estimate_memory_usage += VExprContext::get_memory_usage(expr_contexts);
316
849k
    return Status::OK();
317
849k
}
318
319
0
bool PipelineXLocalStateBase::is_blockable() const {
320
0
    return std::any_of(_projections.begin(), _projections.end(),
321
0
                       [&](VExprContextSPtr expr) -> bool { return expr->is_blockable(); });
322
0
}
323
324
Status OperatorXBase::do_projections(RuntimeState* state, Block* origin_block,
325
276k
                                     Block* output_block) const {
326
276k
    auto* local_state = state->get_local_state(operator_id());
327
276k
    SCOPED_TIMER(local_state->exec_time_counter());
328
276k
    SCOPED_TIMER(local_state->_projection_timer);
329
276k
    const size_t rows = origin_block->rows();
330
276k
    if (rows == 0) {
331
147k
        return Status::OK();
332
147k
    }
333
129k
    SCOPED_PEAK_MEM(&local_state->_estimate_memory_usage);
334
335
129k
    {
336
129k
        Block input_block = *origin_block;
337
338
129k
        ColumnsWithTypeAndName new_columns;
339
129k
        for (const auto& projections : local_state->_intermediate_projections) {
340
3.75k
            if (projections.empty()) {
341
0
                return Status::InternalError("meet empty intermediate projection, node id: {}",
342
0
                                             node_id());
343
0
            }
344
3.75k
            new_columns.resize(projections.size());
345
69.0k
            for (int i = 0; i < projections.size(); i++) {
346
65.3k
                RETURN_IF_ERROR(projections[i]->execute(&input_block, new_columns[i]));
347
65.3k
                if (new_columns[i].column->size() != rows) {
348
0
                    return Status::InternalError(
349
0
                            "intermediate projection result column size {} not equal input rows "
350
0
                            "{}, expr: {}",
351
0
                            new_columns[i].column->size(), rows,
352
0
                            projections[i]->root()->debug_string());
353
0
                }
354
65.3k
            }
355
3.74k
            Block tmp_block {new_columns};
356
3.74k
            input_block.swap(tmp_block);
357
3.74k
        }
358
359
129k
        if (input_block.rows() != rows) {
360
0
            return Status::InternalError(
361
0
                    "after intermediate projections input block rows {} not equal origin rows {}, "
362
0
                    "input_block: {}",
363
0
                    input_block.rows(), rows, input_block.dump_structure());
364
0
        }
365
366
129k
        auto scoped_mutable_block = VectorizedUtils::build_scoped_mutable_mem_reuse_block(
367
129k
                output_block, _projection->output_row_descriptor);
368
129k
        auto& mutable_columns = scoped_mutable_block.mutable_columns();
369
129k
        DCHECK_EQ(mutable_columns.size(), local_state->_projections.size()) << debug_string();
370
129k
        Columns shared_columns(mutable_columns.size());
371
372
746k
        for (int i = 0; i < mutable_columns.size(); ++i) {
373
617k
            ColumnPtr column_ptr;
374
617k
            RETURN_IF_ERROR(local_state->_projections[i]->execute(&input_block, column_ptr));
375
617k
            if (column_ptr->size() != rows) {
376
0
                return Status::InternalError(
377
0
                        "projection result column size {} not equal input rows {}, expr: {}",
378
0
                        column_ptr->size(), rows,
379
0
                        local_state->_projections[i]->root()->debug_string());
380
0
            }
381
617k
            column_ptr = column_ptr->convert_to_full_column_if_const();
382
617k
            if (is_column_nullable(*mutable_columns[i]) && !is_column_nullable(*column_ptr)) {
383
0
                column_ptr = make_nullable(column_ptr, false);
384
0
            }
385
617k
            if (column_ptr->is_exclusive()) {
386
225k
                mutable_columns[i] = IColumn::mutate(std::move(column_ptr));
387
392k
            } else {
388
392k
                shared_columns[i] = std::move(column_ptr);
389
392k
            }
390
617k
        }
391
392
129k
        scoped_mutable_block.restore();
393
746k
        for (int i = 0; i < shared_columns.size(); ++i) {
394
617k
            if (shared_columns[i]) {
395
392k
                output_block->replace_by_position(i, std::move(shared_columns[i]));
396
392k
            }
397
617k
        }
398
129k
    }
399
400
0
    origin_block->clear_column_data(
401
129k
            local_state->_parent->operator_row_desc_before_projection().num_materialized_slots());
402
129k
    DCHECK_EQ(output_block->rows(), rows);
403
404
129k
    return Status::OK();
405
129k
}
406
407
4.09M
Status OperatorXBase::get_block_after_projects(RuntimeState* state, Block* block, bool* eos) {
408
4.09M
    DBUG_EXECUTE_IF("Pipeline::return_empty_block", {
409
4.09M
        if (this->_op_name == "AGGREGATION_OPERATOR" || this->_op_name == "HASH_JOIN_OPERATOR" ||
410
4.09M
            this->_op_name == "PARTITIONED_AGGREGATION_OPERATOR" ||
411
4.09M
            this->_op_name == "PARTITIONED_HASH_JOIN_OPERATOR" ||
412
4.09M
            this->_op_name == "CROSS_JOIN_OPERATOR" || this->_op_name == "SORT_OPERATOR") {
413
4.09M
            if (_debug_point_count++ % 2 == 0) {
414
4.09M
                return Status::OK();
415
4.09M
            }
416
4.09M
        }
417
4.09M
    });
418
419
4.09M
    Status status;
420
4.09M
    auto* local_state = state->get_local_state(operator_id());
421
4.09M
    Defer defer([&]() {
422
4.08M
        if (status.ok()) {
423
4.08M
            local_state->update_output_block_counters(*block);
424
4.08M
        }
425
4.08M
    });
426
4.09M
    if (has_projection()) {
427
276k
        local_state->clear_origin_block();
428
276k
        status = get_block(state, &local_state->_origin_block, eos);
429
276k
        if (UNLIKELY(!status.ok())) {
430
24
            return status;
431
24
        }
432
276k
        status = do_projections(state, &local_state->_origin_block, block);
433
276k
        return status;
434
276k
    }
435
3.81M
    status = get_block(state, block, eos);
436
3.81M
    RETURN_IF_ERROR(block->check_type_and_column());
437
3.81M
    return status;
438
3.81M
}
439
440
2.69M
void PipelineXLocalStateBase::reached_limit(Block* block, bool* eos) {
441
2.69M
    if (_parent->_limit != -1 and _num_rows_returned + block->rows() >= _parent->_limit) {
442
9.68k
        block->set_num_rows(_parent->_limit - _num_rows_returned);
443
9.68k
        *eos = true;
444
9.68k
    }
445
446
2.69M
    DBUG_EXECUTE_IF("Pipeline::reached_limit_early", {
447
2.69M
        auto op_name = to_lower(_parent->_op_name);
448
2.69M
        auto arg_op_name = dp->param<std::string>("op_name");
449
2.69M
        arg_op_name = to_lower(arg_op_name);
450
451
2.69M
        if (op_name == arg_op_name) {
452
2.69M
            *eos = true;
453
2.69M
        }
454
2.69M
    });
455
456
2.69M
    if (auto rows = block->rows()) {
457
706k
        _num_rows_returned += rows;
458
706k
        _state->get_query_ctx()->resource_ctx()->io_context()->update_process_rows(rows);
459
706k
    }
460
2.69M
}
461
462
31.0k
Status DataSinkOperatorXBase::terminate(RuntimeState* state) {
463
31.0k
    auto result = state->get_sink_local_state_result();
464
31.0k
    if (!result) {
465
0
        return result.error();
466
0
    }
467
31.0k
    return result.value()->terminate(state);
468
31.0k
}
469
470
13.8k
std::string DataSinkOperatorXBase::debug_string(int indentation_level) const {
471
13.8k
    fmt::memory_buffer debug_string_buffer;
472
473
13.8k
    fmt::format_to(debug_string_buffer, "{}{}: id={}, _is_serial_operator={}",
474
13.8k
                   std::string(indentation_level * 2, ' '), _name, node_id(), _is_serial_operator);
475
13.8k
    return fmt::to_string(debug_string_buffer);
476
13.8k
}
477
478
13.8k
std::string DataSinkOperatorXBase::debug_string(RuntimeState* state, int indentation_level) const {
479
13.8k
    return state->get_sink_local_state()->debug_string(indentation_level);
480
13.8k
}
481
482
342k
Status DataSinkOperatorXBase::init(const TDataSink& tsink) {
483
342k
    std::string op_name = "UNKNOWN_SINK";
484
342k
    auto it = _TDataSinkType_VALUES_TO_NAMES.find(tsink.type);
485
486
343k
    if (it != _TDataSinkType_VALUES_TO_NAMES.end()) {
487
343k
        op_name = it->second;
488
343k
    }
489
342k
    _name = op_name + "_OPERATOR";
490
342k
    return Status::OK();
491
342k
}
492
493
294k
Status DataSinkOperatorXBase::init(const TPlanNode& tnode, RuntimeState* state) {
494
294k
    std::string op_name = print_plan_node_type(tnode.node_type);
495
294k
    _nereids_id = tnode.nereids_id;
496
294k
    auto substr = op_name.substr(0, op_name.find("_NODE"));
497
294k
    _name = substr + "_SINK_OPERATOR";
498
294k
    return Status::OK();
499
294k
}
500
501
template <typename LocalStateType>
502
Status DataSinkOperatorX<LocalStateType>::setup_local_state(RuntimeState* state,
503
1.82M
                                                            LocalSinkStateInfo& info) {
504
1.82M
    auto local_state = LocalStateType::create_unique(this, state);
505
1.82M
    RETURN_IF_ERROR(local_state->init(state, info));
506
1.82M
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
1.82M
    return Status::OK();
508
1.82M
}
_ZN5doris17DataSinkOperatorXINS_27HashJoinBuildSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
117k
                                                            LocalSinkStateInfo& info) {
504
117k
    auto local_state = LocalStateType::create_unique(this, state);
505
117k
    RETURN_IF_ERROR(local_state->init(state, info));
506
117k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
117k
    return Status::OK();
508
117k
}
_ZN5doris17DataSinkOperatorXINS_20ResultSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
436k
                                                            LocalSinkStateInfo& info) {
504
436k
    auto local_state = LocalStateType::create_unique(this, state);
505
436k
    RETURN_IF_ERROR(local_state->init(state, info));
506
436k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
436k
    return Status::OK();
508
436k
}
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_23JdbcTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
_ZN5doris17DataSinkOperatorXINS_27MemoryScratchSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
3
                                                            LocalSinkStateInfo& info) {
504
3
    auto local_state = LocalStateType::create_unique(this, state);
505
3
    RETURN_IF_ERROR(local_state->init(state, info));
506
3
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
3
    return Status::OK();
508
3
}
_ZN5doris17DataSinkOperatorXINS_24ResultFileSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
362
                                                            LocalSinkStateInfo& info) {
504
362
    auto local_state = LocalStateType::create_unique(this, state);
505
362
    RETURN_IF_ERROR(local_state->init(state, info));
506
362
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
362
    return Status::OK();
508
362
}
_ZN5doris17DataSinkOperatorXINS_23OlapTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
45.8k
                                                            LocalSinkStateInfo& info) {
504
45.8k
    auto local_state = LocalStateType::create_unique(this, state);
505
45.8k
    RETURN_IF_ERROR(local_state->init(state, info));
506
45.8k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
45.8k
    return Status::OK();
508
45.8k
}
_ZN5doris17DataSinkOperatorXINS_25OlapTableSinkV2LocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
14
                                                            LocalSinkStateInfo& info) {
504
14
    auto local_state = LocalStateType::create_unique(this, state);
505
14
    RETURN_IF_ERROR(local_state->init(state, info));
506
14
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
14
    return Status::OK();
508
14
}
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_23HiveTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_22TVFTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_26IcebergTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_31SpillIcebergTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_27IcebergDeleteSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_26IcebergMergeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_21MCTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
_ZN5doris17DataSinkOperatorXINS_22AnalyticSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
7.68k
                                                            LocalSinkStateInfo& info) {
504
7.68k
    auto local_state = LocalStateType::create_unique(this, state);
505
7.68k
    RETURN_IF_ERROR(local_state->init(state, info));
506
7.68k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
7.68k
    return Status::OK();
508
7.68k
}
_ZN5doris17DataSinkOperatorXINS_23BlackholeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
3
                                                            LocalSinkStateInfo& info) {
504
3
    auto local_state = LocalStateType::create_unique(this, state);
505
3
    RETURN_IF_ERROR(local_state->init(state, info));
506
3
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
3
    return Status::OK();
508
3
}
_ZN5doris17DataSinkOperatorXINS_18SortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
186k
                                                            LocalSinkStateInfo& info) {
504
186k
    auto local_state = LocalStateType::create_unique(this, state);
505
186k
    RETURN_IF_ERROR(local_state->init(state, info));
506
186k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
186k
    return Status::OK();
508
186k
}
_ZN5doris17DataSinkOperatorXINS_23SpillSortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
27
                                                            LocalSinkStateInfo& info) {
504
27
    auto local_state = LocalStateType::create_unique(this, state);
505
27
    RETURN_IF_ERROR(local_state->init(state, info));
506
27
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
27
    return Status::OK();
508
27
}
_ZN5doris17DataSinkOperatorXINS_27LocalExchangeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
300k
                                                            LocalSinkStateInfo& info) {
504
300k
    auto local_state = LocalStateType::create_unique(this, state);
505
300k
    RETURN_IF_ERROR(local_state->init(state, info));
506
300k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
300k
    return Status::OK();
508
300k
}
_ZN5doris17DataSinkOperatorXINS_17AggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
91.0k
                                                            LocalSinkStateInfo& info) {
504
91.0k
    auto local_state = LocalStateType::create_unique(this, state);
505
91.0k
    RETURN_IF_ERROR(local_state->init(state, info));
506
91.0k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
91.0k
    return Status::OK();
508
91.0k
}
_ZN5doris17DataSinkOperatorXINS_25BucketedAggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
68.4k
                                                            LocalSinkStateInfo& info) {
504
68.4k
    auto local_state = LocalStateType::create_unique(this, state);
505
68.4k
    RETURN_IF_ERROR(local_state->init(state, info));
506
68.4k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
68.4k
    return Status::OK();
508
68.4k
}
_ZN5doris17DataSinkOperatorXINS_28PartitionedAggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
58
                                                            LocalSinkStateInfo& info) {
504
58
    auto local_state = LocalStateType::create_unique(this, state);
505
58
    RETURN_IF_ERROR(local_state->init(state, info));
506
58
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
58
    return Status::OK();
508
58
}
_ZN5doris17DataSinkOperatorXINS_22ExchangeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
541k
                                                            LocalSinkStateInfo& info) {
504
541k
    auto local_state = LocalStateType::create_unique(this, state);
505
541k
    RETURN_IF_ERROR(local_state->init(state, info));
506
541k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
541k
    return Status::OK();
508
541k
}
_ZN5doris17DataSinkOperatorXINS_33NestedLoopJoinBuildSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
6.14k
                                                            LocalSinkStateInfo& info) {
504
6.14k
    auto local_state = LocalStateType::create_unique(this, state);
505
6.14k
    RETURN_IF_ERROR(local_state->init(state, info));
506
6.14k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
6.14k
    return Status::OK();
508
6.14k
}
_ZN5doris17DataSinkOperatorXINS_19UnionSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
7.78k
                                                            LocalSinkStateInfo& info) {
504
7.78k
    auto local_state = LocalStateType::create_unique(this, state);
505
7.78k
    RETURN_IF_ERROR(local_state->init(state, info));
506
7.78k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
7.78k
    return Status::OK();
508
7.78k
}
_ZN5doris17DataSinkOperatorXINS_33MultiCastDataStreamSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
1.70k
                                                            LocalSinkStateInfo& info) {
504
1.70k
    auto local_state = LocalStateType::create_unique(this, state);
505
1.70k
    RETURN_IF_ERROR(local_state->init(state, info));
506
1.70k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
1.70k
    return Status::OK();
508
1.70k
}
_ZN5doris17DataSinkOperatorXINS_27PartitionSortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
399
                                                            LocalSinkStateInfo& info) {
504
399
    auto local_state = LocalStateType::create_unique(this, state);
505
399
    RETURN_IF_ERROR(local_state->init(state, info));
506
399
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
399
    return Status::OK();
508
399
}
_ZN5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
4.77k
                                                            LocalSinkStateInfo& info) {
504
4.77k
    auto local_state = LocalStateType::create_unique(this, state);
505
4.77k
    RETURN_IF_ERROR(local_state->init(state, info));
506
4.77k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
4.77k
    return Status::OK();
508
4.77k
}
_ZN5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
2.54k
                                                            LocalSinkStateInfo& info) {
504
2.54k
    auto local_state = LocalStateType::create_unique(this, state);
505
2.54k
    RETURN_IF_ERROR(local_state->init(state, info));
506
2.54k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
2.54k
    return Status::OK();
508
2.54k
}
_ZN5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
2.59k
                                                            LocalSinkStateInfo& info) {
504
2.59k
    auto local_state = LocalStateType::create_unique(this, state);
505
2.59k
    RETURN_IF_ERROR(local_state->init(state, info));
506
2.59k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
2.59k
    return Status::OK();
508
2.59k
}
_ZN5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
2.47k
                                                            LocalSinkStateInfo& info) {
504
2.47k
    auto local_state = LocalStateType::create_unique(this, state);
505
2.47k
    RETURN_IF_ERROR(local_state->init(state, info));
506
2.47k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
2.47k
    return Status::OK();
508
2.47k
}
_ZN5doris17DataSinkOperatorXINS_33PartitionedHashJoinSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
1
                                                            LocalSinkStateInfo& info) {
504
1
    auto local_state = LocalStateType::create_unique(this, state);
505
1
    RETURN_IF_ERROR(local_state->init(state, info));
506
1
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
1
    return Status::OK();
508
1
}
_ZN5doris17DataSinkOperatorXINS_30GroupCommitBlockSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
565
                                                            LocalSinkStateInfo& info) {
504
565
    auto local_state = LocalStateType::create_unique(this, state);
505
565
    RETURN_IF_ERROR(local_state->init(state, info));
506
565
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
565
    return Status::OK();
508
565
}
_ZN5doris17DataSinkOperatorXINS_19CacheSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
14
                                                            LocalSinkStateInfo& info) {
504
14
    auto local_state = LocalStateType::create_unique(this, state);
505
14
    RETURN_IF_ERROR(local_state->init(state, info));
506
14
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
14
    return Status::OK();
508
14
}
_ZN5doris17DataSinkOperatorXINS_18DictSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
106
                                                            LocalSinkStateInfo& info) {
504
106
    auto local_state = LocalStateType::create_unique(this, state);
505
106
    RETURN_IF_ERROR(local_state->init(state, info));
506
106
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
106
    return Status::OK();
508
106
}
_ZN5doris17DataSinkOperatorXINS_20RecCTESinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
169
                                                            LocalSinkStateInfo& info) {
504
169
    auto local_state = LocalStateType::create_unique(this, state);
505
169
    RETURN_IF_ERROR(local_state->init(state, info));
506
169
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
169
    return Status::OK();
508
169
}
_ZN5doris17DataSinkOperatorXINS_26RecCTEAnchorSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
169
                                                            LocalSinkStateInfo& info) {
504
169
    auto local_state = LocalStateType::create_unique(this, state);
505
169
    RETURN_IF_ERROR(local_state->init(state, info));
506
169
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
169
    return Status::OK();
508
169
}
509
510
template <typename LocalStateType>
511
1.42M
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
0
                                 LocalExchangeSharedState>) {
514
0
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
0
                                        MultiCastSharedState>) {
517
0
        throw Exception(Status::FatalError("should not reach here!"));
518
1.42M
    } else {
519
1.42M
        auto ss = LocalStateType::SharedStateType::create_shared();
520
1.42M
        ss->id = operator_id();
521
1.42M
        for (auto& dest : dests_id()) {
522
1.41M
            ss->related_op_ids.insert(dest);
523
1.41M
        }
524
1.42M
        return ss;
525
1.42M
    }
526
1.42M
}
_ZNK5doris17DataSinkOperatorXINS_27HashJoinBuildSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
100k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
100k
    } else {
519
100k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
100k
        ss->id = operator_id();
521
100k
        for (auto& dest : dests_id()) {
522
99.9k
            ss->related_op_ids.insert(dest);
523
99.9k
        }
524
100k
        return ss;
525
100k
    }
526
100k
}
_ZNK5doris17DataSinkOperatorXINS_20ResultSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
436k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
436k
    } else {
519
436k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
436k
        ss->id = operator_id();
521
436k
        for (auto& dest : dests_id()) {
522
434k
            ss->related_op_ids.insert(dest);
523
434k
        }
524
436k
        return ss;
525
436k
    }
526
436k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_23JdbcTableSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_27MemoryScratchSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
3
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
3
    } else {
519
3
        auto ss = LocalStateType::SharedStateType::create_shared();
520
3
        ss->id = operator_id();
521
3
        for (auto& dest : dests_id()) {
522
3
            ss->related_op_ids.insert(dest);
523
3
        }
524
3
        return ss;
525
3
    }
526
3
}
_ZNK5doris17DataSinkOperatorXINS_24ResultFileSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
362
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
362
    } else {
519
362
        auto ss = LocalStateType::SharedStateType::create_shared();
520
362
        ss->id = operator_id();
521
362
        for (auto& dest : dests_id()) {
522
361
            ss->related_op_ids.insert(dest);
523
361
        }
524
362
        return ss;
525
362
    }
526
362
}
_ZNK5doris17DataSinkOperatorXINS_23OlapTableSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
45.7k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
45.7k
    } else {
519
45.7k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
45.7k
        ss->id = operator_id();
521
45.7k
        for (auto& dest : dests_id()) {
522
45.3k
            ss->related_op_ids.insert(dest);
523
45.3k
        }
524
45.7k
        return ss;
525
45.7k
    }
526
45.7k
}
_ZNK5doris17DataSinkOperatorXINS_25OlapTableSinkV2LocalStateEE19create_shared_stateEv
Line
Count
Source
511
14
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
14
    } else {
519
14
        auto ss = LocalStateType::SharedStateType::create_shared();
520
14
        ss->id = operator_id();
521
14
        for (auto& dest : dests_id()) {
522
14
            ss->related_op_ids.insert(dest);
523
14
        }
524
14
        return ss;
525
14
    }
526
14
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_23HiveTableSinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_22TVFTableSinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_26IcebergTableSinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_31SpillIcebergTableSinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_27IcebergDeleteSinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_26IcebergMergeSinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_21MCTableSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_22AnalyticSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
7.71k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
7.71k
    } else {
519
7.71k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
7.71k
        ss->id = operator_id();
521
7.71k
        for (auto& dest : dests_id()) {
522
7.71k
            ss->related_op_ids.insert(dest);
523
7.71k
        }
524
7.71k
        return ss;
525
7.71k
    }
526
7.71k
}
_ZNK5doris17DataSinkOperatorXINS_23BlackholeSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
3
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
3
    } else {
519
3
        auto ss = LocalStateType::SharedStateType::create_shared();
520
3
        ss->id = operator_id();
521
3
        for (auto& dest : dests_id()) {
522
3
            ss->related_op_ids.insert(dest);
523
3
        }
524
3
        return ss;
525
3
    }
526
3
}
_ZNK5doris17DataSinkOperatorXINS_18SortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
186k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
186k
    } else {
519
186k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
186k
        ss->id = operator_id();
521
186k
        for (auto& dest : dests_id()) {
522
186k
            ss->related_op_ids.insert(dest);
523
186k
        }
524
186k
        return ss;
525
186k
    }
526
186k
}
_ZNK5doris17DataSinkOperatorXINS_23SpillSortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
29
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
29
    } else {
519
29
        auto ss = LocalStateType::SharedStateType::create_shared();
520
29
        ss->id = operator_id();
521
29
        for (auto& dest : dests_id()) {
522
29
            ss->related_op_ids.insert(dest);
523
29
        }
524
29
        return ss;
525
29
    }
526
29
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_27LocalExchangeSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_17AggSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
91.1k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
91.1k
    } else {
519
91.1k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
91.1k
        ss->id = operator_id();
521
91.2k
        for (auto& dest : dests_id()) {
522
91.2k
            ss->related_op_ids.insert(dest);
523
91.2k
        }
524
91.1k
        return ss;
525
91.1k
    }
526
91.1k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_25BucketedAggSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_28PartitionedAggSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
57
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
57
    } else {
519
57
        auto ss = LocalStateType::SharedStateType::create_shared();
520
57
        ss->id = operator_id();
521
57
        for (auto& dest : dests_id()) {
522
57
            ss->related_op_ids.insert(dest);
523
57
        }
524
57
        return ss;
525
57
    }
526
57
}
_ZNK5doris17DataSinkOperatorXINS_22ExchangeSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
541k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
541k
    } else {
519
541k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
541k
        ss->id = operator_id();
521
541k
        for (auto& dest : dests_id()) {
522
537k
            ss->related_op_ids.insert(dest);
523
537k
        }
524
541k
        return ss;
525
541k
    }
526
541k
}
_ZNK5doris17DataSinkOperatorXINS_33NestedLoopJoinBuildSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
6.14k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
6.14k
    } else {
519
6.14k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
6.14k
        ss->id = operator_id();
521
6.14k
        for (auto& dest : dests_id()) {
522
6.13k
            ss->related_op_ids.insert(dest);
523
6.13k
        }
524
6.14k
        return ss;
525
6.14k
    }
526
6.14k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_19UnionSinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_33MultiCastDataStreamSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_27PartitionSortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
502
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
502
    } else {
519
502
        auto ss = LocalStateType::SharedStateType::create_shared();
520
502
        ss->id = operator_id();
521
502
        for (auto& dest : dests_id()) {
522
502
            ss->related_op_ids.insert(dest);
523
502
        }
524
502
        return ss;
525
502
    }
526
502
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb1EEEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb0EEEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb1EEEE19create_shared_stateEv
Line
Count
Source
511
2.58k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
2.58k
    } else {
519
2.58k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
2.58k
        ss->id = operator_id();
521
2.58k
        for (auto& dest : dests_id()) {
522
2.58k
            ss->related_op_ids.insert(dest);
523
2.58k
        }
524
2.58k
        return ss;
525
2.58k
    }
526
2.58k
}
_ZNK5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb0EEEE19create_shared_stateEv
Line
Count
Source
511
2.46k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
2.46k
    } else {
519
2.46k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
2.46k
        ss->id = operator_id();
521
2.47k
        for (auto& dest : dests_id()) {
522
2.47k
            ss->related_op_ids.insert(dest);
523
2.47k
        }
524
2.46k
        return ss;
525
2.46k
    }
526
2.46k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_33PartitionedHashJoinSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_30GroupCommitBlockSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
567
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
567
    } else {
519
567
        auto ss = LocalStateType::SharedStateType::create_shared();
520
567
        ss->id = operator_id();
521
567
        for (auto& dest : dests_id()) {
522
562
            ss->related_op_ids.insert(dest);
523
562
        }
524
567
        return ss;
525
567
    }
526
567
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_19CacheSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_18DictSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
106
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
106
    } else {
519
106
        auto ss = LocalStateType::SharedStateType::create_shared();
520
106
        ss->id = operator_id();
521
106
        for (auto& dest : dests_id()) {
522
103
            ss->related_op_ids.insert(dest);
523
103
        }
524
106
        return ss;
525
106
    }
526
106
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_20RecCTESinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_26RecCTEAnchorSinkLocalStateEE19create_shared_stateEv
527
528
template <typename LocalStateType>
529
2.28M
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
2.28M
    auto local_state = LocalStateType::create_unique(state, this);
531
2.28M
    RETURN_IF_ERROR(local_state->init(state, info));
532
2.28M
    state->emplace_local_state(operator_id(), std::move(local_state));
533
2.28M
    return Status::OK();
534
2.28M
}
_ZN5doris9OperatorXINS_23HashJoinProbeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
68.9k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
68.9k
    auto local_state = LocalStateType::create_unique(state, this);
531
68.9k
    RETURN_IF_ERROR(local_state->init(state, info));
532
68.9k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
68.9k
    return Status::OK();
534
68.9k
}
_ZN5doris9OperatorXINS_18OlapScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
241k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
241k
    auto local_state = LocalStateType::create_unique(state, this);
531
241k
    RETURN_IF_ERROR(local_state->init(state, info));
532
241k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
241k
    return Status::OK();
534
241k
}
_ZN5doris9OperatorXINS_21GroupCommitLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
139
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
139
    auto local_state = LocalStateType::create_unique(state, this);
531
139
    RETURN_IF_ERROR(local_state->init(state, info));
532
139
    state->emplace_local_state(operator_id(), std::move(local_state));
533
139
    return Status::OK();
534
139
}
Unexecuted instantiation: _ZN5doris9OperatorXINS_18JDBCScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
_ZN5doris9OperatorXINS_18FileScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
3.08k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
3.08k
    auto local_state = LocalStateType::create_unique(state, this);
531
3.08k
    RETURN_IF_ERROR(local_state->init(state, info));
532
3.08k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
3.08k
    return Status::OK();
534
3.08k
}
_ZN5doris9OperatorXINS_18AnalyticLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
7.63k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
7.63k
    auto local_state = LocalStateType::create_unique(state, this);
531
7.63k
    RETURN_IF_ERROR(local_state->init(state, info));
532
7.63k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
7.63k
    return Status::OK();
534
7.63k
}
_ZN5doris9OperatorXINS_14SortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
7.51k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
7.51k
    auto local_state = LocalStateType::create_unique(state, this);
531
7.51k
    RETURN_IF_ERROR(local_state->init(state, info));
532
7.51k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
7.51k
    return Status::OK();
534
7.51k
}
_ZN5doris9OperatorXINS_19SpillSortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
20
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
20
    auto local_state = LocalStateType::create_unique(state, this);
531
20
    RETURN_IF_ERROR(local_state->init(state, info));
532
20
    state->emplace_local_state(operator_id(), std::move(local_state));
533
20
    return Status::OK();
534
20
}
_ZN5doris9OperatorXINS_24LocalMergeSortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
178k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
178k
    auto local_state = LocalStateType::create_unique(state, this);
531
178k
    RETURN_IF_ERROR(local_state->init(state, info));
532
178k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
178k
    return Status::OK();
534
178k
}
_ZN5doris9OperatorXINS_13AggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
90.8k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
90.8k
    auto local_state = LocalStateType::create_unique(state, this);
531
90.8k
    RETURN_IF_ERROR(local_state->init(state, info));
532
90.8k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
90.8k
    return Status::OK();
534
90.8k
}
_ZN5doris9OperatorXINS_21BucketedAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
68.7k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
68.7k
    auto local_state = LocalStateType::create_unique(state, this);
531
68.7k
    RETURN_IF_ERROR(local_state->init(state, info));
532
68.7k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
68.7k
    return Status::OK();
534
68.7k
}
_ZN5doris9OperatorXINS_24PartitionedAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
48
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
48
    auto local_state = LocalStateType::create_unique(state, this);
531
48
    RETURN_IF_ERROR(local_state->init(state, info));
532
48
    state->emplace_local_state(operator_id(), std::move(local_state));
533
48
    return Status::OK();
534
48
}
_ZN5doris9OperatorXINS_23TableFunctionLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
3.60k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
3.60k
    auto local_state = LocalStateType::create_unique(state, this);
531
3.60k
    RETURN_IF_ERROR(local_state->init(state, info));
532
3.60k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
3.60k
    return Status::OK();
534
3.60k
}
_ZN5doris9OperatorXINS_18ExchangeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
347k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
347k
    auto local_state = LocalStateType::create_unique(state, this);
531
347k
    RETURN_IF_ERROR(local_state->init(state, info));
532
347k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
347k
    return Status::OK();
534
347k
}
_ZN5doris9OperatorXINS_16RepeatLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
1.44k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
1.44k
    auto local_state = LocalStateType::create_unique(state, this);
531
1.44k
    RETURN_IF_ERROR(local_state->init(state, info));
532
1.44k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
1.44k
    return Status::OK();
534
1.44k
}
_ZN5doris9OperatorXINS_29NestedLoopJoinProbeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
6.14k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
6.14k
    auto local_state = LocalStateType::create_unique(state, this);
531
6.14k
    RETURN_IF_ERROR(local_state->init(state, info));
532
6.14k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
6.14k
    return Status::OK();
534
6.14k
}
_ZN5doris9OperatorXINS_23AssertNumRowsLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
27
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
27
    auto local_state = LocalStateType::create_unique(state, this);
531
27
    RETURN_IF_ERROR(local_state->init(state, info));
532
27
    state->emplace_local_state(operator_id(), std::move(local_state));
533
27
    return Status::OK();
534
27
}
_ZN5doris9OperatorXINS_18EmptySetLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
1.60k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
1.60k
    auto local_state = LocalStateType::create_unique(state, this);
531
1.60k
    RETURN_IF_ERROR(local_state->init(state, info));
532
1.60k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
1.60k
    return Status::OK();
534
1.60k
}
_ZN5doris9OperatorXINS_21UnionSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
53.4k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
53.4k
    auto local_state = LocalStateType::create_unique(state, this);
531
53.4k
    RETURN_IF_ERROR(local_state->init(state, info));
532
53.4k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
53.4k
    return Status::OK();
534
53.4k
}
_ZN5doris9OperatorXINS_35MultiCastDataStreamSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
4.43k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
4.43k
    auto local_state = LocalStateType::create_unique(state, this);
531
4.43k
    RETURN_IF_ERROR(local_state->init(state, info));
532
4.43k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
4.43k
    return Status::OK();
534
4.43k
}
_ZN5doris9OperatorXINS_29PartitionSortSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
398
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
398
    auto local_state = LocalStateType::create_unique(state, this);
531
398
    RETURN_IF_ERROR(local_state->init(state, info));
532
398
    state->emplace_local_state(operator_id(), std::move(local_state));
533
398
    return Status::OK();
534
398
}
_ZN5doris9OperatorXINS_19SetSourceLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
2.60k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
2.60k
    auto local_state = LocalStateType::create_unique(state, this);
531
2.60k
    RETURN_IF_ERROR(local_state->init(state, info));
532
2.60k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
2.60k
    return Status::OK();
534
2.60k
}
_ZN5doris9OperatorXINS_19SetSourceLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
2.48k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
2.48k
    auto local_state = LocalStateType::create_unique(state, this);
531
2.48k
    RETURN_IF_ERROR(local_state->init(state, info));
532
2.48k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
2.48k
    return Status::OK();
534
2.48k
}
_ZN5doris9OperatorXINS_17DataGenLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
318
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
318
    auto local_state = LocalStateType::create_unique(state, this);
531
318
    RETURN_IF_ERROR(local_state->init(state, info));
532
318
    state->emplace_local_state(operator_id(), std::move(local_state));
533
318
    return Status::OK();
534
318
}
_ZN5doris9OperatorXINS_20SchemaScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
1.60k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
1.60k
    auto local_state = LocalStateType::create_unique(state, this);
531
1.60k
    RETURN_IF_ERROR(local_state->init(state, info));
532
1.60k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
1.60k
    return Status::OK();
534
1.60k
}
_ZN5doris9OperatorXINS_18MetaScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
10.5k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
10.5k
    auto local_state = LocalStateType::create_unique(state, this);
531
10.5k
    RETURN_IF_ERROR(local_state->init(state, info));
532
10.5k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
10.5k
    return Status::OK();
534
10.5k
}
_ZN5doris9OperatorXINS_29LocalExchangeSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
728k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
728k
    auto local_state = LocalStateType::create_unique(state, this);
531
728k
    RETURN_IF_ERROR(local_state->init(state, info));
532
728k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
728k
    return Status::OK();
534
728k
}
Unexecuted instantiation: _ZN5doris9OperatorXINS_34PartitionedHashJoinProbeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
_ZN5doris9OperatorXINS_21CacheSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
14
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
14
    auto local_state = LocalStateType::create_unique(state, this);
531
14
    RETURN_IF_ERROR(local_state->init(state, info));
532
14
    state->emplace_local_state(operator_id(), std::move(local_state));
533
14
    return Status::OK();
534
14
}
_ZN5doris9OperatorXINS_22RecCTESourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
169
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
169
    auto local_state = LocalStateType::create_unique(state, this);
531
169
    RETURN_IF_ERROR(local_state->init(state, info));
532
169
    state->emplace_local_state(operator_id(), std::move(local_state));
533
169
    return Status::OK();
534
169
}
_ZN5doris9OperatorXINS_20RecCTEScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
2.22k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
2.22k
    auto local_state = LocalStateType::create_unique(state, this);
531
2.22k
    RETURN_IF_ERROR(local_state->init(state, info));
532
2.22k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
2.22k
    return Status::OK();
534
2.22k
}
_ZN5doris9OperatorXINS_25MaterializationLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
785
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
785
    auto local_state = LocalStateType::create_unique(state, this);
531
785
    RETURN_IF_ERROR(local_state->init(state, info));
532
785
    state->emplace_local_state(operator_id(), std::move(local_state));
533
785
    return Status::OK();
534
785
}
_ZN5doris9OperatorXINS_16SelectLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
947
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
947
    auto local_state = LocalStateType::create_unique(state, this);
531
947
    RETURN_IF_ERROR(local_state->init(state, info));
532
947
    state->emplace_local_state(operator_id(), std::move(local_state));
533
947
    return Status::OK();
534
947
}
_ZN5doris9OperatorXINS_22StreamingAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
7.12k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
7.12k
    auto local_state = LocalStateType::create_unique(state, this);
531
7.12k
    RETURN_IF_ERROR(local_state->init(state, info));
532
7.12k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
7.12k
    return Status::OK();
534
7.12k
}
_ZN5doris9OperatorXINS_30DistinctStreamingAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
436k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
436k
    auto local_state = LocalStateType::create_unique(state, this);
531
436k
    RETURN_IF_ERROR(local_state->init(state, info));
532
436k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
436k
    return Status::OK();
534
436k
}
535
536
PipelineXSinkLocalStateBase::PipelineXSinkLocalStateBase(DataSinkOperatorXBase* parent,
537
                                                         RuntimeState* state)
538
1.81M
        : _parent(parent), _state(state) {}
539
540
PipelineXLocalStateBase::PipelineXLocalStateBase(RuntimeState* state, OperatorXBase* parent)
541
2.26M
        : _num_rows_returned(0),
542
2.26M
          _rows_returned_counter(nullptr),
543
2.26M
          _parent(parent),
544
2.26M
          _state(state),
545
2.26M
          _budget(state->batch_size(), state->preferred_block_size_bytes()) {}
546
547
template <typename SharedStateArg>
548
2.28M
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
2.28M
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
2.28M
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
2.28M
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
2.28M
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
2.28M
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
2.28M
    _operator_profile->add_child(_common_profile.get(), true);
557
2.28M
    _operator_profile->add_child(_custom_profile.get(), true);
558
2.28M
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
2.28M
    if constexpr (!is_fake_shared) {
560
1.22M
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
810k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
810k
                                    .first.get()
563
810k
                                    ->template cast<SharedStateArg>();
564
565
810k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
810k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
810k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
810k
        } else if (info.shared_state) {
569
349k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
0
                DCHECK(false);
571
0
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
349k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
349k
            _dependency = _shared_state->create_source_dependency(
576
349k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
349k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
349k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
349k
        } else {
580
64.6k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
7.71k
                DCHECK(false);
582
7.71k
            }
583
64.6k
        }
584
1.22M
    }
585
586
2.28M
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
2.28M
    _rows_returned_counter =
591
2.28M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
2.28M
    _blocks_returned_counter =
593
2.28M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
2.28M
    _output_block_bytes_counter =
595
2.28M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
2.28M
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
2.28M
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
2.28M
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
2.28M
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
2.28M
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
2.28M
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
2.28M
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
2.28M
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
2.28M
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
2.28M
    _memory_used_counter =
606
2.28M
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
2.28M
    _common_profile->add_info_string("IsColocate",
608
2.28M
                                     std::to_string(_parent->is_colocated_operator()));
609
2.28M
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
2.28M
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
2.28M
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
2.28M
    return Status::OK();
613
2.28M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
68.9k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
68.9k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
68.9k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
68.9k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
68.9k
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
68.9k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
68.9k
    _operator_profile->add_child(_common_profile.get(), true);
557
68.9k
    _operator_profile->add_child(_custom_profile.get(), true);
558
68.9k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
68.9k
    if constexpr (!is_fake_shared) {
560
68.9k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
16.9k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
16.9k
                                    .first.get()
563
16.9k
                                    ->template cast<SharedStateArg>();
564
565
16.9k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
16.9k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
16.9k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
52.0k
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
51.5k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
51.5k
            _dependency = _shared_state->create_source_dependency(
576
51.5k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
51.5k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
51.5k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
51.5k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
465
        }
584
68.9k
    }
585
586
68.9k
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
68.9k
    _rows_returned_counter =
591
68.9k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
68.9k
    _blocks_returned_counter =
593
68.9k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
68.9k
    _output_block_bytes_counter =
595
68.9k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
68.9k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
68.9k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
68.9k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
68.9k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
68.9k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
68.9k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
68.9k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
68.9k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
68.9k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
68.9k
    _memory_used_counter =
606
68.9k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
68.9k
    _common_profile->add_info_string("IsColocate",
608
68.9k
                                     std::to_string(_parent->is_colocated_operator()));
609
68.9k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
68.9k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
68.9k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
68.9k
    return Status::OK();
613
68.9k
}
_ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
1
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
1
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
1
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
1
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
1
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
1
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
1
    _operator_profile->add_child(_common_profile.get(), true);
557
1
    _operator_profile->add_child(_custom_profile.get(), true);
558
1
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
1
    if constexpr (!is_fake_shared) {
560
1
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
0
                                    .first.get()
563
0
                                    ->template cast<SharedStateArg>();
564
565
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
1
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
1
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
1
            _dependency = _shared_state->create_source_dependency(
576
1
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
1
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
1
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
1
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
0
        }
584
1
    }
585
586
1
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
1
    _rows_returned_counter =
591
1
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
1
    _blocks_returned_counter =
593
1
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
1
    _output_block_bytes_counter =
595
1
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
1
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
1
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
1
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
1
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
1
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
1
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
1
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
1
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
1
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
1
    _memory_used_counter =
606
1
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
1
    _common_profile->add_info_string("IsColocate",
608
1
                                     std::to_string(_parent->is_colocated_operator()));
609
1
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
1
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
1
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
1
    return Status::OK();
613
1
}
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
186k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
186k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
186k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
186k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
186k
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
186k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
186k
    _operator_profile->add_child(_common_profile.get(), true);
557
186k
    _operator_profile->add_child(_custom_profile.get(), true);
558
186k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
186k
    if constexpr (!is_fake_shared) {
560
186k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
0
                                    .first.get()
563
0
                                    ->template cast<SharedStateArg>();
564
565
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
186k
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
181k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
181k
            _dependency = _shared_state->create_source_dependency(
576
181k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
181k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
181k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
181k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
5.17k
        }
584
186k
    }
585
586
186k
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
186k
    _rows_returned_counter =
591
186k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
186k
    _blocks_returned_counter =
593
186k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
186k
    _output_block_bytes_counter =
595
186k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
186k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
186k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
186k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
186k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
186k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
186k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
186k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
186k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
186k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
186k
    _memory_used_counter =
606
186k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
186k
    _common_profile->add_info_string("IsColocate",
608
186k
                                     std::to_string(_parent->is_colocated_operator()));
609
186k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
186k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
186k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
186k
    return Status::OK();
613
186k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
20
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
20
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
20
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
20
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
20
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
20
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
20
    _operator_profile->add_child(_common_profile.get(), true);
557
20
    _operator_profile->add_child(_custom_profile.get(), true);
558
20
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
20
    if constexpr (!is_fake_shared) {
560
20
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
0
                                    .first.get()
563
0
                                    ->template cast<SharedStateArg>();
564
565
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
20
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
20
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
20
            _dependency = _shared_state->create_source_dependency(
576
20
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
20
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
20
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
20
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
0
        }
584
20
    }
585
586
20
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
20
    _rows_returned_counter =
591
20
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
20
    _blocks_returned_counter =
593
20
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
20
    _output_block_bytes_counter =
595
20
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
20
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
20
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
20
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
20
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
20
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
20
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
20
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
20
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
20
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
20
    _memory_used_counter =
606
20
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
20
    _common_profile->add_info_string("IsColocate",
608
20
                                     std::to_string(_parent->is_colocated_operator()));
609
20
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
20
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
20
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
20
    return Status::OK();
613
20
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
6.15k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
6.15k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
6.15k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
6.15k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
6.15k
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
6.15k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
6.15k
    _operator_profile->add_child(_common_profile.get(), true);
557
6.15k
    _operator_profile->add_child(_custom_profile.get(), true);
558
6.15k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
6.15k
    if constexpr (!is_fake_shared) {
560
6.15k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
0
                                    .first.get()
563
0
                                    ->template cast<SharedStateArg>();
564
565
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
6.15k
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
6.12k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
6.12k
            _dependency = _shared_state->create_source_dependency(
576
6.12k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
6.12k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
6.12k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
6.12k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
30
        }
584
6.15k
    }
585
586
6.15k
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
6.15k
    _rows_returned_counter =
591
6.15k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
6.15k
    _blocks_returned_counter =
593
6.15k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
6.15k
    _output_block_bytes_counter =
595
6.15k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
6.15k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
6.15k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
6.15k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
6.15k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
6.15k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
6.15k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
6.15k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
6.15k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
6.15k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
6.15k
    _memory_used_counter =
606
6.15k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
6.15k
    _common_profile->add_info_string("IsColocate",
608
6.15k
                                     std::to_string(_parent->is_colocated_operator()));
609
6.15k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
6.15k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
6.15k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
6.15k
    return Status::OK();
613
6.15k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
7.66k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
7.66k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
7.66k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
7.66k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
7.66k
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
7.66k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
7.66k
    _operator_profile->add_child(_common_profile.get(), true);
557
7.66k
    _operator_profile->add_child(_custom_profile.get(), true);
558
7.66k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
7.66k
    if constexpr (!is_fake_shared) {
560
7.66k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
0
                                    .first.get()
563
0
                                    ->template cast<SharedStateArg>();
564
565
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
7.66k
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
7.61k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
7.61k
            _dependency = _shared_state->create_source_dependency(
576
7.61k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
7.61k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
7.61k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
7.61k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
42
        }
584
7.66k
    }
585
586
7.66k
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
7.66k
    _rows_returned_counter =
591
7.66k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
7.66k
    _blocks_returned_counter =
593
7.66k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
7.66k
    _output_block_bytes_counter =
595
7.66k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
7.66k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
7.66k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
7.66k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
7.66k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
7.66k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
7.66k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
7.66k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
7.66k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
7.66k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
7.66k
    _memory_used_counter =
606
7.66k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
7.66k
    _common_profile->add_info_string("IsColocate",
608
7.66k
                                     std::to_string(_parent->is_colocated_operator()));
609
7.66k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
7.66k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
7.66k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
7.66k
    return Status::OK();
613
7.66k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
91.0k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
91.0k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
91.0k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
91.0k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
91.0k
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
91.0k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
91.0k
    _operator_profile->add_child(_common_profile.get(), true);
557
91.0k
    _operator_profile->add_child(_custom_profile.get(), true);
558
91.0k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
91.0k
    if constexpr (!is_fake_shared) {
560
91.0k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
0
                                    .first.get()
563
0
                                    ->template cast<SharedStateArg>();
564
565
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
91.0k
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
89.8k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
89.8k
            _dependency = _shared_state->create_source_dependency(
576
89.8k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
89.8k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
89.8k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
89.8k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
1.17k
        }
584
91.0k
    }
585
586
91.0k
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
91.0k
    _rows_returned_counter =
591
91.0k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
91.0k
    _blocks_returned_counter =
593
91.0k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
91.0k
    _output_block_bytes_counter =
595
91.0k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
91.0k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
91.0k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
91.0k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
91.0k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
91.0k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
91.0k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
91.0k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
91.0k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
91.0k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
91.0k
    _memory_used_counter =
606
91.0k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
91.0k
    _common_profile->add_info_string("IsColocate",
608
91.0k
                                     std::to_string(_parent->is_colocated_operator()));
609
91.0k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
91.0k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
91.0k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
91.0k
    return Status::OK();
613
91.0k
}
_ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
68.7k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
68.7k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
68.7k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
68.7k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
68.7k
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
68.7k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
68.7k
    _operator_profile->add_child(_common_profile.get(), true);
557
68.7k
    _operator_profile->add_child(_custom_profile.get(), true);
558
68.7k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
68.7k
    if constexpr (!is_fake_shared) {
560
68.7k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
68.7k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
68.7k
                                    .first.get()
563
68.7k
                                    ->template cast<SharedStateArg>();
564
565
68.7k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
68.7k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
68.7k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
68.7k
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
0
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
0
            _dependency = _shared_state->create_source_dependency(
576
0
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
15
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
15
        }
584
68.7k
    }
585
586
68.7k
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
68.7k
    _rows_returned_counter =
591
68.7k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
68.7k
    _blocks_returned_counter =
593
68.7k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
68.7k
    _output_block_bytes_counter =
595
68.7k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
68.7k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
68.7k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
68.7k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
68.7k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
68.7k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
68.7k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
68.7k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
68.7k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
68.7k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
68.7k
    _memory_used_counter =
606
68.7k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
68.7k
    _common_profile->add_info_string("IsColocate",
608
68.7k
                                     std::to_string(_parent->is_colocated_operator()));
609
68.7k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
68.7k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
68.7k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
68.7k
    return Status::OK();
613
68.7k
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
48
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
48
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
48
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
48
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
48
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
48
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
48
    _operator_profile->add_child(_common_profile.get(), true);
557
48
    _operator_profile->add_child(_custom_profile.get(), true);
558
48
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
48
    if constexpr (!is_fake_shared) {
560
48
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
0
                                    .first.get()
563
0
                                    ->template cast<SharedStateArg>();
564
565
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
48
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
48
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
48
            _dependency = _shared_state->create_source_dependency(
576
48
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
48
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
48
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
48
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
0
        }
584
48
    }
585
586
48
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
48
    _rows_returned_counter =
591
48
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
48
    _blocks_returned_counter =
593
48
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
48
    _output_block_bytes_counter =
595
48
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
48
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
48
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
48
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
48
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
48
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
48
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
48
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
48
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
48
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
48
    _memory_used_counter =
606
48
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
48
    _common_profile->add_info_string("IsColocate",
608
48
                                     std::to_string(_parent->is_colocated_operator()));
609
48
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
48
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
48
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
48
    return Status::OK();
613
48
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
1.05M
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
1.05M
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
1.05M
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
1.05M
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
1.05M
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
1.05M
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
1.05M
    _operator_profile->add_child(_common_profile.get(), true);
557
1.05M
    _operator_profile->add_child(_custom_profile.get(), true);
558
1.05M
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
    if constexpr (!is_fake_shared) {
560
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
                                    .first.get()
563
                                    ->template cast<SharedStateArg>();
564
565
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
            _dependency = _shared_state->create_source_dependency(
576
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
        }
584
    }
585
586
1.05M
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
1.05M
    _rows_returned_counter =
591
1.05M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
1.05M
    _blocks_returned_counter =
593
1.05M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
1.05M
    _output_block_bytes_counter =
595
1.05M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
1.05M
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
1.05M
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
1.05M
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
1.05M
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
1.05M
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
1.05M
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
1.05M
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
1.05M
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
1.05M
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
1.05M
    _memory_used_counter =
606
1.05M
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
1.05M
    _common_profile->add_info_string("IsColocate",
608
1.05M
                                     std::to_string(_parent->is_colocated_operator()));
609
1.05M
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
1.05M
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
1.05M
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
1.05M
    return Status::OK();
613
1.05M
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
53.2k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
53.2k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
53.2k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
53.2k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
53.2k
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
53.2k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
53.2k
    _operator_profile->add_child(_common_profile.get(), true);
557
53.2k
    _operator_profile->add_child(_custom_profile.get(), true);
558
53.2k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
53.2k
    if constexpr (!is_fake_shared) {
560
53.2k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
0
                                    .first.get()
563
0
                                    ->template cast<SharedStateArg>();
564
565
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
53.2k
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
3.34k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
3.34k
            _dependency = _shared_state->create_source_dependency(
576
3.34k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
3.34k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
3.34k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
49.9k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
49.9k
        }
584
53.2k
    }
585
586
53.2k
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
53.2k
    _rows_returned_counter =
591
53.2k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
53.2k
    _blocks_returned_counter =
593
53.2k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
53.2k
    _output_block_bytes_counter =
595
53.2k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
53.2k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
53.2k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
53.2k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
53.2k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
53.2k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
53.2k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
53.2k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
53.2k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
53.2k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
53.2k
    _memory_used_counter =
606
53.2k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
53.2k
    _common_profile->add_info_string("IsColocate",
608
53.2k
                                     std::to_string(_parent->is_colocated_operator()));
609
53.2k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
53.2k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
53.2k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
53.2k
    return Status::OK();
613
53.2k
}
_ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
26
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
26
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
26
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
26
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
26
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
26
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
26
    _operator_profile->add_child(_common_profile.get(), true);
557
26
    _operator_profile->add_child(_custom_profile.get(), true);
558
26
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
26
    if constexpr (!is_fake_shared) {
560
26
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
0
                                    .first.get()
563
0
                                    ->template cast<SharedStateArg>();
564
565
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
26
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
26
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
26
            _dependency = _shared_state->create_source_dependency(
576
26
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
26
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
26
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
26
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
0
        }
584
26
    }
585
586
26
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
26
    _rows_returned_counter =
591
26
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
26
    _blocks_returned_counter =
593
26
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
26
    _output_block_bytes_counter =
595
26
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
26
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
26
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
26
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
26
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
26
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
26
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
26
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
26
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
26
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
26
    _memory_used_counter =
606
26
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
26
    _common_profile->add_info_string("IsColocate",
608
26
                                     std::to_string(_parent->is_colocated_operator()));
609
26
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
26
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
26
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
26
    return Status::OK();
613
26
}
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
4.44k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
4.44k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
4.44k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
4.44k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
4.44k
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
4.44k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
4.44k
    _operator_profile->add_child(_common_profile.get(), true);
557
4.44k
    _operator_profile->add_child(_custom_profile.get(), true);
558
4.44k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
4.44k
    if constexpr (!is_fake_shared) {
560
4.44k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
0
                                    .first.get()
563
0
                                    ->template cast<SharedStateArg>();
564
565
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
4.44k
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
4.43k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
4.43k
            _dependency = _shared_state->create_source_dependency(
576
4.43k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
4.43k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
4.43k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
4.43k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
11
        }
584
4.44k
    }
585
586
4.44k
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
4.44k
    _rows_returned_counter =
591
4.44k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
4.44k
    _blocks_returned_counter =
593
4.44k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
4.44k
    _output_block_bytes_counter =
595
4.44k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
4.44k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
4.44k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
4.44k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
4.44k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
4.44k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
4.44k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
4.44k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
4.44k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
4.44k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
4.44k
    _memory_used_counter =
606
4.44k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
4.44k
    _common_profile->add_info_string("IsColocate",
608
4.44k
                                     std::to_string(_parent->is_colocated_operator()));
609
4.44k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
4.44k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
4.44k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
4.44k
    return Status::OK();
613
4.44k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
502
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
502
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
502
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
502
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
502
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
502
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
502
    _operator_profile->add_child(_common_profile.get(), true);
557
502
    _operator_profile->add_child(_custom_profile.get(), true);
558
502
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
502
    if constexpr (!is_fake_shared) {
560
502
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
0
                                    .first.get()
563
0
                                    ->template cast<SharedStateArg>();
564
565
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
502
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
502
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
502
            _dependency = _shared_state->create_source_dependency(
576
502
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
502
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
502
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
502
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
0
        }
584
502
    }
585
586
502
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
502
    _rows_returned_counter =
591
502
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
502
    _blocks_returned_counter =
593
502
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
502
    _output_block_bytes_counter =
595
502
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
502
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
502
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
502
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
502
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
502
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
502
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
502
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
502
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
502
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
502
    _memory_used_counter =
606
502
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
502
    _common_profile->add_info_string("IsColocate",
608
502
                                     std::to_string(_parent->is_colocated_operator()));
609
502
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
502
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
502
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
502
    return Status::OK();
613
502
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
5.11k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
5.11k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
5.11k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
5.11k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
5.11k
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
5.11k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
5.11k
    _operator_profile->add_child(_common_profile.get(), true);
557
5.11k
    _operator_profile->add_child(_custom_profile.get(), true);
558
5.11k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
5.11k
    if constexpr (!is_fake_shared) {
560
5.11k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
0
                                    .first.get()
563
0
                                    ->template cast<SharedStateArg>();
564
565
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
5.11k
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
5.07k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
5.07k
            _dependency = _shared_state->create_source_dependency(
576
5.07k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
5.07k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
5.07k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
5.07k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
41
        }
584
5.11k
    }
585
586
5.11k
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
5.11k
    _rows_returned_counter =
591
5.11k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
5.11k
    _blocks_returned_counter =
593
5.11k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
5.11k
    _output_block_bytes_counter =
595
5.11k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
5.11k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
5.11k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
5.11k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
5.11k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
5.11k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
5.11k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
5.11k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
5.11k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
5.11k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
5.11k
    _memory_used_counter =
606
5.11k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
5.11k
    _common_profile->add_info_string("IsColocate",
608
5.11k
                                     std::to_string(_parent->is_colocated_operator()));
609
5.11k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
5.11k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
5.11k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
5.11k
    return Status::OK();
613
5.11k
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
732k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
732k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
732k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
732k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
732k
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
732k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
732k
    _operator_profile->add_child(_common_profile.get(), true);
557
732k
    _operator_profile->add_child(_custom_profile.get(), true);
558
732k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
732k
    if constexpr (!is_fake_shared) {
560
732k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
724k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
724k
                                    .first.get()
563
724k
                                    ->template cast<SharedStateArg>();
564
565
724k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
724k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
724k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
724k
        } else if (info.shared_state) {
569
0
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
0
                DCHECK(false);
571
0
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
0
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
0
            _dependency = _shared_state->create_source_dependency(
576
0
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
7.71k
        } else {
580
7.71k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
7.71k
                DCHECK(false);
582
7.71k
            }
583
7.71k
        }
584
732k
    }
585
586
732k
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
732k
    _rows_returned_counter =
591
732k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
732k
    _blocks_returned_counter =
593
732k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
732k
    _output_block_bytes_counter =
595
732k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
732k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
732k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
732k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
732k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
732k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
732k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
732k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
732k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
732k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
732k
    _memory_used_counter =
606
732k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
732k
    _common_profile->add_info_string("IsColocate",
608
732k
                                     std::to_string(_parent->is_colocated_operator()));
609
732k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
732k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
732k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
732k
    return Status::OK();
613
732k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
169
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
169
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
169
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
169
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
169
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
169
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
169
    _operator_profile->add_child(_common_profile.get(), true);
557
169
    _operator_profile->add_child(_custom_profile.get(), true);
558
169
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
169
    if constexpr (!is_fake_shared) {
560
169
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
0
                                    .first.get()
563
0
                                    ->template cast<SharedStateArg>();
564
565
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
169
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
169
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
169
            _dependency = _shared_state->create_source_dependency(
576
169
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
169
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
169
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
169
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
0
        }
584
169
    }
585
586
169
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
169
    _rows_returned_counter =
591
169
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
169
    _blocks_returned_counter =
593
169
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
169
    _output_block_bytes_counter =
595
169
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
169
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
169
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
169
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
169
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
169
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
169
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
169
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
169
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
169
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
169
    _memory_used_counter =
606
169
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
169
    _common_profile->add_info_string("IsColocate",
608
169
                                     std::to_string(_parent->is_colocated_operator()));
609
169
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
169
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
169
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
169
    return Status::OK();
613
169
}
614
615
template <typename SharedStateArg>
616
2.29M
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
2.29M
    _conjuncts.resize(_parent->_conjuncts.size());
618
2.59M
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
301k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
301k
    }
621
2.29M
    if (_parent->has_projection()) {
622
377k
        const auto& projection = *_parent->_projection;
623
377k
        _projections.resize(projection.projections.size());
624
2.34M
        for (size_t i = 0; i < _projections.size(); i++) {
625
1.96M
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
1.96M
        }
627
377k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
394k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
16.8k
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
219k
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
202k
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
202k
                        state, _intermediate_projections[i][j]));
633
202k
            }
634
16.8k
        }
635
377k
    }
636
2.29M
    return Status::OK();
637
2.29M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
69.1k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
69.1k
    _conjuncts.resize(_parent->_conjuncts.size());
618
70.6k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
1.46k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
1.46k
    }
621
69.1k
    if (_parent->has_projection()) {
622
69.1k
        const auto& projection = *_parent->_projection;
623
69.1k
        _projections.resize(projection.projections.size());
624
367k
        for (size_t i = 0; i < _projections.size(); i++) {
625
298k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
298k
        }
627
69.1k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
76.1k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
6.97k
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
157k
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
150k
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
150k
                        state, _intermediate_projections[i][j]));
633
150k
            }
634
6.97k
        }
635
69.1k
    }
636
69.1k
    return Status::OK();
637
69.1k
}
_ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
3
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
3
    _conjuncts.resize(_parent->_conjuncts.size());
618
3
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
3
    if (_parent->has_projection()) {
622
0
        const auto& projection = *_parent->_projection;
623
0
        _projections.resize(projection.projections.size());
624
0
        for (size_t i = 0; i < _projections.size(); i++) {
625
0
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
0
        }
627
0
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
0
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
0
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
0
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
0
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
0
                        state, _intermediate_projections[i][j]));
633
0
            }
634
0
        }
635
0
    }
636
3
    return Status::OK();
637
3
}
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
187k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
187k
    _conjuncts.resize(_parent->_conjuncts.size());
618
187k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
187k
    if (_parent->has_projection()) {
622
80
        const auto& projection = *_parent->_projection;
623
80
        _projections.resize(projection.projections.size());
624
405
        for (size_t i = 0; i < _projections.size(); i++) {
625
325
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
325
        }
627
80
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
80
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
0
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
0
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
0
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
0
                        state, _intermediate_projections[i][j]));
633
0
            }
634
0
        }
635
80
    }
636
187k
    return Status::OK();
637
187k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
20
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
20
    _conjuncts.resize(_parent->_conjuncts.size());
618
20
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
20
    if (_parent->has_projection()) {
622
0
        const auto& projection = *_parent->_projection;
623
0
        _projections.resize(projection.projections.size());
624
0
        for (size_t i = 0; i < _projections.size(); i++) {
625
0
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
0
        }
627
0
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
0
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
0
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
0
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
0
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
0
                        state, _intermediate_projections[i][j]));
633
0
            }
634
0
        }
635
0
    }
636
20
    return Status::OK();
637
20
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
6.16k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
6.16k
    _conjuncts.resize(_parent->_conjuncts.size());
618
6.26k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
107
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
107
    }
621
6.16k
    if (_parent->has_projection()) {
622
6.16k
        const auto& projection = *_parent->_projection;
623
6.16k
        _projections.resize(projection.projections.size());
624
26.6k
        for (size_t i = 0; i < _projections.size(); i++) {
625
20.5k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
20.5k
        }
627
6.16k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
6.20k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
33
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
208
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
175
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
175
                        state, _intermediate_projections[i][j]));
633
175
            }
634
33
        }
635
6.16k
    }
636
6.16k
    return Status::OK();
637
6.16k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
7.73k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
7.73k
    _conjuncts.resize(_parent->_conjuncts.size());
618
8.47k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
738
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
738
    }
621
7.73k
    if (_parent->has_projection()) {
622
4.53k
        const auto& projection = *_parent->_projection;
623
4.53k
        _projections.resize(projection.projections.size());
624
17.6k
        for (size_t i = 0; i < _projections.size(); i++) {
625
13.1k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
13.1k
        }
627
4.53k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
4.62k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
92
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
695
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
603
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
603
                        state, _intermediate_projections[i][j]));
633
603
            }
634
92
        }
635
4.53k
    }
636
7.73k
    return Status::OK();
637
7.73k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
91.3k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
91.3k
    _conjuncts.resize(_parent->_conjuncts.size());
618
92.8k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
1.48k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
1.48k
    }
621
91.3k
    if (_parent->has_projection()) {
622
30.2k
        const auto& projection = *_parent->_projection;
623
30.2k
        _projections.resize(projection.projections.size());
624
273k
        for (size_t i = 0; i < _projections.size(); i++) {
625
243k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
243k
        }
627
30.2k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
30.4k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
171
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
1.09k
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
921
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
921
                        state, _intermediate_projections[i][j]));
633
921
            }
634
171
        }
635
30.2k
    }
636
91.3k
    return Status::OK();
637
91.3k
}
_ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
68.7k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
68.7k
    _conjuncts.resize(_parent->_conjuncts.size());
618
68.7k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
10
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
10
    }
621
68.7k
    if (_parent->has_projection()) {
622
118
        const auto& projection = *_parent->_projection;
623
118
        _projections.resize(projection.projections.size());
624
390
        for (size_t i = 0; i < _projections.size(); i++) {
625
272
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
272
        }
627
118
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
119
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
1
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
3
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
2
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
2
                        state, _intermediate_projections[i][j]));
633
2
            }
634
1
        }
635
118
    }
636
68.7k
    return Status::OK();
637
68.7k
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
52
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
52
    _conjuncts.resize(_parent->_conjuncts.size());
618
52
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
52
    if (_parent->has_projection()) {
622
38
        const auto& projection = *_parent->_projection;
623
38
        _projections.resize(projection.projections.size());
624
114
        for (size_t i = 0; i < _projections.size(); i++) {
625
76
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
76
        }
627
38
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
38
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
0
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
0
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
0
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
0
                        state, _intermediate_projections[i][j]));
633
0
            }
634
0
        }
635
38
    }
636
52
    return Status::OK();
637
52
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
1.06M
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
1.06M
    _conjuncts.resize(_parent->_conjuncts.size());
618
1.36M
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
297k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
297k
    }
621
1.06M
    if (_parent->has_projection()) {
622
255k
        const auto& projection = *_parent->_projection;
623
255k
        _projections.resize(projection.projections.size());
624
1.54M
        for (size_t i = 0; i < _projections.size(); i++) {
625
1.29M
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
1.29M
        }
627
255k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
265k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
9.40k
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
57.1k
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
47.7k
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
47.7k
                        state, _intermediate_projections[i][j]));
633
47.7k
            }
634
9.40k
        }
635
255k
    }
636
1.06M
    return Status::OK();
637
1.06M
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
53.5k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
53.5k
    _conjuncts.resize(_parent->_conjuncts.size());
618
53.5k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
53.5k
    if (_parent->has_projection()) {
622
11.2k
        const auto& projection = *_parent->_projection;
623
11.2k
        _projections.resize(projection.projections.size());
624
109k
        for (size_t i = 0; i < _projections.size(); i++) {
625
98.3k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
98.3k
        }
627
11.2k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
11.3k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
120
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
2.01k
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
1.89k
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
1.89k
                        state, _intermediate_projections[i][j]));
633
1.89k
            }
634
120
        }
635
11.2k
    }
636
53.5k
    return Status::OK();
637
53.5k
}
_ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
25
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
25
    _conjuncts.resize(_parent->_conjuncts.size());
618
25
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
25
    if (_parent->has_projection()) {
622
0
        const auto& projection = *_parent->_projection;
623
0
        _projections.resize(projection.projections.size());
624
0
        for (size_t i = 0; i < _projections.size(); i++) {
625
0
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
0
        }
627
0
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
0
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
0
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
0
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
0
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
0
                        state, _intermediate_projections[i][j]));
633
0
            }
634
0
        }
635
0
    }
636
25
    return Status::OK();
637
25
}
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
4.42k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
4.42k
    _conjuncts.resize(_parent->_conjuncts.size());
618
4.86k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
440
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
440
    }
621
4.42k
    if (_parent->has_projection()) {
622
0
        const auto& projection = *_parent->_projection;
623
0
        _projections.resize(projection.projections.size());
624
0
        for (size_t i = 0; i < _projections.size(); i++) {
625
0
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
0
        }
627
0
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
0
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
0
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
0
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
0
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
0
                        state, _intermediate_projections[i][j]));
633
0
            }
634
0
        }
635
0
    }
636
4.42k
    return Status::OK();
637
4.42k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
502
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
502
    _conjuncts.resize(_parent->_conjuncts.size());
618
502
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
502
    if (_parent->has_projection()) {
622
0
        const auto& projection = *_parent->_projection;
623
0
        _projections.resize(projection.projections.size());
624
0
        for (size_t i = 0; i < _projections.size(); i++) {
625
0
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
0
        }
627
0
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
0
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
0
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
0
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
0
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
0
                        state, _intermediate_projections[i][j]));
633
0
            }
634
0
        }
635
0
    }
636
502
    return Status::OK();
637
502
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
5.12k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
5.12k
    _conjuncts.resize(_parent->_conjuncts.size());
618
5.12k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
5.12k
    if (_parent->has_projection()) {
622
60
        const auto& projection = *_parent->_projection;
623
60
        _projections.resize(projection.projections.size());
624
228
        for (size_t i = 0; i < _projections.size(); i++) {
625
168
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
168
        }
627
60
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
60
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
0
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
0
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
0
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
0
                        state, _intermediate_projections[i][j]));
633
0
            }
634
0
        }
635
60
    }
636
5.12k
    return Status::OK();
637
5.12k
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
736k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
736k
    _conjuncts.resize(_parent->_conjuncts.size());
618
736k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
736k
    if (_parent->has_projection()) {
622
0
        const auto& projection = *_parent->_projection;
623
0
        _projections.resize(projection.projections.size());
624
0
        for (size_t i = 0; i < _projections.size(); i++) {
625
0
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
0
        }
627
0
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
0
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
0
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
0
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
0
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
0
                        state, _intermediate_projections[i][j]));
633
0
            }
634
0
        }
635
0
    }
636
736k
    return Status::OK();
637
736k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE4openEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
169
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
169
    _conjuncts.resize(_parent->_conjuncts.size());
618
176
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
7
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
7
    }
621
169
    if (_parent->has_projection()) {
622
166
        const auto& projection = *_parent->_projection;
623
166
        _projections.resize(projection.projections.size());
624
491
        for (size_t i = 0; i < _projections.size(); i++) {
625
325
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
325
        }
627
166
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
169
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
3
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
11
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
8
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
8
                        state, _intermediate_projections[i][j]));
633
8
            }
634
3
        }
635
166
    }
636
169
    return Status::OK();
637
169
}
638
639
template <typename SharedStateArg>
640
7.85k
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
7.85k
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
7.85k
    _terminated = true;
645
7.85k
    return Status::OK();
646
7.85k
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
470
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
470
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
470
    _terminated = true;
645
470
    return Status::OK();
646
470
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
19
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
19
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
19
    _terminated = true;
645
19
    return Status::OK();
646
19
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
44
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
44
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
44
    _terminated = true;
645
44
    return Status::OK();
646
44
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
2
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
2
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
2
    _terminated = true;
645
2
    return Status::OK();
646
2
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
24
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
24
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
24
    _terminated = true;
645
24
    return Status::OK();
646
24
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE9terminateEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
6.18k
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
6.18k
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
6.18k
    _terminated = true;
645
6.18k
    return Status::OK();
646
6.18k
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
51
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
51
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
51
    _terminated = true;
645
51
    return Status::OK();
646
51
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
3
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
3
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
3
    _terminated = true;
645
3
    return Status::OK();
646
3
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
1
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
1
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
1
    _terminated = true;
645
1
    return Status::OK();
646
1
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
1.03k
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
1.03k
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
1.03k
    _terminated = true;
645
1.03k
    return Status::OK();
646
1.03k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
35
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
35
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
35
    _terminated = true;
645
35
    return Status::OK();
646
35
}
647
648
template <typename SharedStateArg>
649
2.51M
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
2.51M
    if (_closed) {
651
215k
        return Status::OK();
652
215k
    }
653
2.29M
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
1.22M
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
1.22M
    }
656
2.29M
    _closed = true;
657
2.29M
    return Status::OK();
658
2.51M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
69.1k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
69.1k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
69.1k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
69.1k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
69.1k
    }
656
69.1k
    _closed = true;
657
69.1k
    return Status::OK();
658
69.1k
}
_ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
4
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
4
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
4
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
4
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
4
    }
656
4
    _closed = true;
657
4
    return Status::OK();
658
4
}
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
370k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
370k
    if (_closed) {
651
186k
        return Status::OK();
652
186k
    }
653
184k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
184k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
184k
    }
656
184k
    _closed = true;
657
184k
    return Status::OK();
658
370k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
20
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
20
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
20
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
20
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
20
    }
656
20
    _closed = true;
657
20
    return Status::OK();
658
20
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
6.15k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
6.15k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
6.15k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
6.15k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
6.15k
    }
656
6.15k
    _closed = true;
657
6.15k
    return Status::OK();
658
6.15k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
15.7k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
15.7k
    if (_closed) {
651
7.99k
        return Status::OK();
652
7.99k
    }
653
7.70k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
7.70k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
7.70k
    }
656
7.70k
    _closed = true;
657
7.70k
    return Status::OK();
658
15.7k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
91.1k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
91.1k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
91.1k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
91.1k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
91.1k
    }
656
91.1k
    _closed = true;
657
91.1k
    return Status::OK();
658
91.1k
}
_ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
68.3k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
68.3k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
68.3k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
68.3k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
68.3k
    }
656
68.3k
    _closed = true;
657
68.3k
    return Status::OK();
658
68.3k
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
47
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
47
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
47
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
47
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
47
    }
656
47
    _closed = true;
657
47
    return Status::OK();
658
47
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
1.08M
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
1.08M
    if (_closed) {
651
15.6k
        return Status::OK();
652
15.6k
    }
653
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
    }
656
1.06M
    _closed = true;
657
1.06M
    return Status::OK();
658
1.08M
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
53.5k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
53.5k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
53.5k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
53.5k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
53.5k
    }
656
53.5k
    _closed = true;
657
53.5k
    return Status::OK();
658
53.5k
}
_ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
28
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
28
    if (_closed) {
651
14
        return Status::OK();
652
14
    }
653
14
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
14
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
14
    }
656
14
    _closed = true;
657
14
    return Status::OK();
658
28
}
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
4.41k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
4.41k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
4.41k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
4.41k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
4.41k
    }
656
4.41k
    _closed = true;
657
4.41k
    return Status::OK();
658
4.41k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
797
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
797
    if (_closed) {
651
400
        return Status::OK();
652
400
    }
653
397
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
397
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
397
    }
656
397
    _closed = true;
657
397
    return Status::OK();
658
797
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
10.2k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
10.2k
    if (_closed) {
651
5.19k
        return Status::OK();
652
5.19k
    }
653
5.09k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
5.09k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
5.09k
    }
656
5.09k
    _closed = true;
657
5.09k
    return Status::OK();
658
10.2k
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
738k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
738k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
738k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
738k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
738k
    }
656
738k
    _closed = true;
657
738k
    return Status::OK();
658
738k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE5closeEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
336
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
336
    if (_closed) {
651
176
        return Status::OK();
652
176
    }
653
160
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
160
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
160
    }
656
160
    _closed = true;
657
160
    return Status::OK();
658
336
}
659
660
template <typename SharedState>
661
1.82M
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
1.82M
    _operator_profile =
664
1.82M
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
1.82M
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
1.82M
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
1.82M
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
1.82M
    _operator_profile->add_child(_common_profile, true);
673
1.82M
    _operator_profile->add_child(_custom_profile, true);
674
675
1.82M
    _operator_profile->set_metadata(_parent->node_id());
676
1.82M
    _wait_for_finish_dependency_timer =
677
1.82M
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
1.82M
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
1.82M
    if constexpr (!is_fake_shared) {
680
1.28M
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
1.28M
            info.shared_state_map.end()) {
682
387k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
301k
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
301k
            }
685
387k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
387k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
387k
                                                  ? 0
688
387k
                                                  : info.task_idx]
689
387k
                                  .get();
690
387k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
898k
        } else {
692
18.4E
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
18.4E
                DCHECK(false);
694
18.4E
            }
695
898k
            _shared_state = info.shared_state->template cast<SharedState>();
696
898k
            _dependency = _shared_state->create_sink_dependency(
697
898k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
898k
        }
699
1.28M
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
1.28M
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
1.28M
    }
702
703
1.82M
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
1.82M
    _rows_input_counter =
708
1.82M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
1.82M
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
1.82M
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
1.82M
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
1.82M
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
1.82M
    _memory_used_counter =
714
1.82M
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
1.82M
    _common_profile->add_info_string("IsColocate",
716
1.82M
                                     std::to_string(_parent->is_colocated_operator()));
717
1.82M
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
1.82M
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
1.82M
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
1.82M
    return Status::OK();
721
1.82M
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
117k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
117k
    _operator_profile =
664
117k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
117k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
117k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
117k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
117k
    _operator_profile->add_child(_common_profile, true);
673
117k
    _operator_profile->add_child(_custom_profile, true);
674
675
117k
    _operator_profile->set_metadata(_parent->node_id());
676
117k
    _wait_for_finish_dependency_timer =
677
117k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
117k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
117k
    if constexpr (!is_fake_shared) {
680
117k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
117k
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
17.0k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
17.0k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
17.0k
                                                  ? 0
688
17.0k
                                                  : info.task_idx]
689
17.0k
                                  .get();
690
17.0k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
99.9k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
99.9k
            _shared_state = info.shared_state->template cast<SharedState>();
696
99.9k
            _dependency = _shared_state->create_sink_dependency(
697
99.9k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
99.9k
        }
699
117k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
117k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
117k
    }
702
703
117k
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
117k
    _rows_input_counter =
708
117k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
117k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
117k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
117k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
117k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
117k
    _memory_used_counter =
714
117k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
117k
    _common_profile->add_info_string("IsColocate",
716
117k
                                     std::to_string(_parent->is_colocated_operator()));
717
117k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
117k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
117k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
117k
    return Status::OK();
721
117k
}
_ZN5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
2
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
2
    _operator_profile =
664
2
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
2
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
2
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
2
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
2
    _operator_profile->add_child(_common_profile, true);
673
2
    _operator_profile->add_child(_custom_profile, true);
674
675
2
    _operator_profile->set_metadata(_parent->node_id());
676
2
    _wait_for_finish_dependency_timer =
677
2
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
2
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
2
    if constexpr (!is_fake_shared) {
680
2
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
2
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
0
                                                  ? 0
688
0
                                                  : info.task_idx]
689
0
                                  .get();
690
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
2
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
2
            _shared_state = info.shared_state->template cast<SharedState>();
696
2
            _dependency = _shared_state->create_sink_dependency(
697
2
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
2
        }
699
2
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
2
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
2
    }
702
703
2
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
2
    _rows_input_counter =
708
2
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
2
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
2
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
2
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
2
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
2
    _memory_used_counter =
714
2
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
2
    _common_profile->add_info_string("IsColocate",
716
2
                                     std::to_string(_parent->is_colocated_operator()));
717
2
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
2
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
2
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
2
    return Status::OK();
721
2
}
_ZN5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
186k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
186k
    _operator_profile =
664
186k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
186k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
186k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
186k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
186k
    _operator_profile->add_child(_common_profile, true);
673
186k
    _operator_profile->add_child(_custom_profile, true);
674
675
186k
    _operator_profile->set_metadata(_parent->node_id());
676
186k
    _wait_for_finish_dependency_timer =
677
186k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
186k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
186k
    if constexpr (!is_fake_shared) {
680
186k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
186k
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
0
                                                  ? 0
688
0
                                                  : info.task_idx]
689
0
                                  .get();
690
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
186k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
186k
            _shared_state = info.shared_state->template cast<SharedState>();
696
186k
            _dependency = _shared_state->create_sink_dependency(
697
186k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
186k
        }
699
186k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
186k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
186k
    }
702
703
186k
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
186k
    _rows_input_counter =
708
186k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
186k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
186k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
186k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
186k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
186k
    _memory_used_counter =
714
186k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
186k
    _common_profile->add_info_string("IsColocate",
716
186k
                                     std::to_string(_parent->is_colocated_operator()));
717
186k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
186k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
186k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
186k
    return Status::OK();
721
186k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
27
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
27
    _operator_profile =
664
27
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
27
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
27
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
27
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
27
    _operator_profile->add_child(_common_profile, true);
673
27
    _operator_profile->add_child(_custom_profile, true);
674
675
27
    _operator_profile->set_metadata(_parent->node_id());
676
27
    _wait_for_finish_dependency_timer =
677
27
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
27
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
27
    if constexpr (!is_fake_shared) {
680
27
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
27
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
0
                                                  ? 0
688
0
                                                  : info.task_idx]
689
0
                                  .get();
690
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
27
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
27
            _shared_state = info.shared_state->template cast<SharedState>();
696
27
            _dependency = _shared_state->create_sink_dependency(
697
27
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
27
        }
699
27
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
27
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
27
    }
702
703
27
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
27
    _rows_input_counter =
708
27
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
27
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
27
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
27
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
27
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
27
    _memory_used_counter =
714
27
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
27
    _common_profile->add_info_string("IsColocate",
716
27
                                     std::to_string(_parent->is_colocated_operator()));
717
27
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
27
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
27
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
27
    return Status::OK();
721
27
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
6.15k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
6.15k
    _operator_profile =
664
6.15k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
6.15k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
6.15k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
6.15k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
6.15k
    _operator_profile->add_child(_common_profile, true);
673
6.15k
    _operator_profile->add_child(_custom_profile, true);
674
675
6.15k
    _operator_profile->set_metadata(_parent->node_id());
676
6.15k
    _wait_for_finish_dependency_timer =
677
6.15k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
6.15k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
6.15k
    if constexpr (!is_fake_shared) {
680
6.15k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
6.15k
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
0
                                                  ? 0
688
0
                                                  : info.task_idx]
689
0
                                  .get();
690
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
6.15k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
6.15k
            _shared_state = info.shared_state->template cast<SharedState>();
696
6.15k
            _dependency = _shared_state->create_sink_dependency(
697
6.15k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
6.15k
        }
699
6.15k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
6.15k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
6.15k
    }
702
703
6.15k
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
6.15k
    _rows_input_counter =
708
6.15k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
6.15k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
6.15k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
6.15k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
6.15k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
6.15k
    _memory_used_counter =
714
6.15k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
6.15k
    _common_profile->add_info_string("IsColocate",
716
6.15k
                                     std::to_string(_parent->is_colocated_operator()));
717
6.15k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
6.15k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
6.15k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
6.15k
    return Status::OK();
721
6.15k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
7.69k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
7.69k
    _operator_profile =
664
7.69k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
7.69k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
7.69k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
7.69k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
7.69k
    _operator_profile->add_child(_common_profile, true);
673
7.69k
    _operator_profile->add_child(_custom_profile, true);
674
675
7.69k
    _operator_profile->set_metadata(_parent->node_id());
676
7.69k
    _wait_for_finish_dependency_timer =
677
7.69k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
7.69k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
7.69k
    if constexpr (!is_fake_shared) {
680
7.69k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
7.69k
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
0
                                                  ? 0
688
0
                                                  : info.task_idx]
689
0
                                  .get();
690
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
7.69k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
7.69k
            _shared_state = info.shared_state->template cast<SharedState>();
696
7.69k
            _dependency = _shared_state->create_sink_dependency(
697
7.69k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
7.69k
        }
699
7.69k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
7.69k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
7.69k
    }
702
703
7.69k
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
7.69k
    _rows_input_counter =
708
7.69k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
7.69k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
7.69k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
7.69k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
7.69k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
7.69k
    _memory_used_counter =
714
7.69k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
7.69k
    _common_profile->add_info_string("IsColocate",
716
7.69k
                                     std::to_string(_parent->is_colocated_operator()));
717
7.69k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
7.69k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
7.69k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
7.69k
    return Status::OK();
721
7.69k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
91.1k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
91.1k
    _operator_profile =
664
91.1k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
91.1k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
91.1k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
91.1k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
91.1k
    _operator_profile->add_child(_common_profile, true);
673
91.1k
    _operator_profile->add_child(_custom_profile, true);
674
675
91.1k
    _operator_profile->set_metadata(_parent->node_id());
676
91.1k
    _wait_for_finish_dependency_timer =
677
91.1k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
91.1k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
91.1k
    if constexpr (!is_fake_shared) {
680
91.1k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
91.1k
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
0
                                                  ? 0
688
0
                                                  : info.task_idx]
689
0
                                  .get();
690
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
91.1k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
91.1k
            _shared_state = info.shared_state->template cast<SharedState>();
696
91.1k
            _dependency = _shared_state->create_sink_dependency(
697
91.1k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
91.1k
        }
699
91.1k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
91.1k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
91.1k
    }
702
703
91.1k
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
91.1k
    _rows_input_counter =
708
91.1k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
91.1k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
91.1k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
91.1k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
91.1k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
91.1k
    _memory_used_counter =
714
91.1k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
91.1k
    _common_profile->add_info_string("IsColocate",
716
91.1k
                                     std::to_string(_parent->is_colocated_operator()));
717
91.1k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
91.1k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
91.1k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
91.1k
    return Status::OK();
721
91.1k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
68.6k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
68.6k
    _operator_profile =
664
68.6k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
68.6k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
68.6k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
68.6k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
68.6k
    _operator_profile->add_child(_common_profile, true);
673
68.6k
    _operator_profile->add_child(_custom_profile, true);
674
675
68.6k
    _operator_profile->set_metadata(_parent->node_id());
676
68.6k
    _wait_for_finish_dependency_timer =
677
68.6k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
68.6k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
68.6k
    if constexpr (!is_fake_shared) {
680
68.6k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
68.7k
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
68.7k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
68.7k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
68.7k
                                                  ? 0
688
68.7k
                                                  : info.task_idx]
689
68.7k
                                  .get();
690
68.7k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
18.4E
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
18.4E
            _shared_state = info.shared_state->template cast<SharedState>();
696
18.4E
            _dependency = _shared_state->create_sink_dependency(
697
18.4E
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
18.4E
        }
699
68.6k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
68.6k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
68.6k
    }
702
703
68.6k
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
68.6k
    _rows_input_counter =
708
68.6k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
68.6k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
68.6k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
68.6k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
68.6k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
68.6k
    _memory_used_counter =
714
68.6k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
68.6k
    _common_profile->add_info_string("IsColocate",
716
68.6k
                                     std::to_string(_parent->is_colocated_operator()));
717
68.6k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
68.6k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
68.6k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
68.6k
    return Status::OK();
721
68.6k
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
58
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
58
    _operator_profile =
664
58
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
58
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
58
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
58
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
58
    _operator_profile->add_child(_common_profile, true);
673
58
    _operator_profile->add_child(_custom_profile, true);
674
675
58
    _operator_profile->set_metadata(_parent->node_id());
676
58
    _wait_for_finish_dependency_timer =
677
58
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
58
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
58
    if constexpr (!is_fake_shared) {
680
58
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
58
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
0
                                                  ? 0
688
0
                                                  : info.task_idx]
689
0
                                  .get();
690
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
58
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
58
            _shared_state = info.shared_state->template cast<SharedState>();
696
58
            _dependency = _shared_state->create_sink_dependency(
697
58
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
58
        }
699
58
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
58
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
58
    }
702
703
58
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
58
    _rows_input_counter =
708
58
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
58
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
58
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
58
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
58
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
58
    _memory_used_counter =
714
58
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
58
    _common_profile->add_info_string("IsColocate",
716
58
                                     std::to_string(_parent->is_colocated_operator()));
717
58
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
58
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
58
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
58
    return Status::OK();
721
58
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
543k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
543k
    _operator_profile =
664
543k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
543k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
543k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
543k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
543k
    _operator_profile->add_child(_common_profile, true);
673
543k
    _operator_profile->add_child(_custom_profile, true);
674
675
543k
    _operator_profile->set_metadata(_parent->node_id());
676
543k
    _wait_for_finish_dependency_timer =
677
543k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
543k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
    if constexpr (!is_fake_shared) {
680
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
                                                  ? 0
688
                                                  : info.task_idx]
689
                                  .get();
690
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
            _shared_state = info.shared_state->template cast<SharedState>();
696
            _dependency = _shared_state->create_sink_dependency(
697
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
        }
699
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
    }
702
703
543k
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
543k
    _rows_input_counter =
708
543k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
543k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
543k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
543k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
543k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
543k
    _memory_used_counter =
714
543k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
543k
    _common_profile->add_info_string("IsColocate",
716
543k
                                     std::to_string(_parent->is_colocated_operator()));
717
543k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
543k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
543k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
543k
    return Status::OK();
721
543k
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
7.79k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
7.79k
    _operator_profile =
664
7.79k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
7.79k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
7.79k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
7.79k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
7.79k
    _operator_profile->add_child(_common_profile, true);
673
7.79k
    _operator_profile->add_child(_custom_profile, true);
674
675
7.79k
    _operator_profile->set_metadata(_parent->node_id());
676
7.79k
    _wait_for_finish_dependency_timer =
677
7.79k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
7.79k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
7.79k
    if constexpr (!is_fake_shared) {
680
7.79k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
7.79k
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
0
                                                  ? 0
688
0
                                                  : info.task_idx]
689
0
                                  .get();
690
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
7.79k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
7.79k
            _shared_state = info.shared_state->template cast<SharedState>();
696
7.79k
            _dependency = _shared_state->create_sink_dependency(
697
7.79k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
7.79k
        }
699
7.79k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
7.79k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
7.79k
    }
702
703
7.79k
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
7.79k
    _rows_input_counter =
708
7.79k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
7.79k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
7.79k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
7.79k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
7.79k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
7.79k
    _memory_used_counter =
714
7.79k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
7.79k
    _common_profile->add_info_string("IsColocate",
716
7.79k
                                     std::to_string(_parent->is_colocated_operator()));
717
7.79k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
7.79k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
7.79k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
7.79k
    return Status::OK();
721
7.79k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
502
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
502
    _operator_profile =
664
502
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
502
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
502
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
502
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
502
    _operator_profile->add_child(_common_profile, true);
673
502
    _operator_profile->add_child(_custom_profile, true);
674
675
502
    _operator_profile->set_metadata(_parent->node_id());
676
502
    _wait_for_finish_dependency_timer =
677
502
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
502
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
502
    if constexpr (!is_fake_shared) {
680
502
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
502
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
0
                                                  ? 0
688
0
                                                  : info.task_idx]
689
0
                                  .get();
690
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
502
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
502
            _shared_state = info.shared_state->template cast<SharedState>();
696
502
            _dependency = _shared_state->create_sink_dependency(
697
502
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
502
        }
699
502
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
502
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
502
    }
702
703
502
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
502
    _rows_input_counter =
708
502
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
502
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
502
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
502
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
502
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
502
    _memory_used_counter =
714
502
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
502
    _common_profile->add_info_string("IsColocate",
716
502
                                     std::to_string(_parent->is_colocated_operator()));
717
502
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
502
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
502
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
502
    return Status::OK();
721
502
}
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
1.70k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
1.70k
    _operator_profile =
664
1.70k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
1.70k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
1.70k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
1.70k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
1.70k
    _operator_profile->add_child(_common_profile, true);
673
1.70k
    _operator_profile->add_child(_custom_profile, true);
674
675
1.70k
    _operator_profile->set_metadata(_parent->node_id());
676
1.70k
    _wait_for_finish_dependency_timer =
677
1.70k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
1.70k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
1.70k
    if constexpr (!is_fake_shared) {
680
1.70k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
1.70k
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
0
                                                  ? 0
688
0
                                                  : info.task_idx]
689
0
                                  .get();
690
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
1.70k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
1.70k
            _shared_state = info.shared_state->template cast<SharedState>();
696
1.70k
            _dependency = _shared_state->create_sink_dependency(
697
1.70k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
1.70k
        }
699
1.70k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
1.70k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
1.70k
    }
702
703
1.70k
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
1.70k
    _rows_input_counter =
708
1.70k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
1.70k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
1.70k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
1.70k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
1.70k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
1.70k
    _memory_used_counter =
714
1.70k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
1.70k
    _common_profile->add_info_string("IsColocate",
716
1.70k
                                     std::to_string(_parent->is_colocated_operator()));
717
1.70k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
1.70k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
1.70k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
1.70k
    return Status::OK();
721
1.70k
}
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
12.4k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
12.4k
    _operator_profile =
664
12.4k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
12.4k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
12.4k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
12.4k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
12.4k
    _operator_profile->add_child(_common_profile, true);
673
12.4k
    _operator_profile->add_child(_custom_profile, true);
674
675
12.4k
    _operator_profile->set_metadata(_parent->node_id());
676
12.4k
    _wait_for_finish_dependency_timer =
677
12.4k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
12.4k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
12.4k
    if constexpr (!is_fake_shared) {
680
12.4k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
12.4k
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
0
                                                  ? 0
688
0
                                                  : info.task_idx]
689
0
                                  .get();
690
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
12.4k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
12.4k
            _shared_state = info.shared_state->template cast<SharedState>();
696
12.4k
            _dependency = _shared_state->create_sink_dependency(
697
12.4k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
12.4k
        }
699
12.4k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
12.4k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
12.4k
    }
702
703
12.4k
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
12.4k
    _rows_input_counter =
708
12.4k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
12.4k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
12.4k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
12.4k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
12.4k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
12.4k
    _memory_used_counter =
714
12.4k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
12.4k
    _common_profile->add_info_string("IsColocate",
716
12.4k
                                     std::to_string(_parent->is_colocated_operator()));
717
12.4k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
12.4k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
12.4k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
12.4k
    return Status::OK();
721
12.4k
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
301k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
301k
    _operator_profile =
664
301k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
301k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
301k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
301k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
301k
    _operator_profile->add_child(_common_profile, true);
673
301k
    _operator_profile->add_child(_custom_profile, true);
674
675
301k
    _operator_profile->set_metadata(_parent->node_id());
676
301k
    _wait_for_finish_dependency_timer =
677
301k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
301k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
301k
    if constexpr (!is_fake_shared) {
680
301k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
301k
            info.shared_state_map.end()) {
682
301k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
301k
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
301k
            }
685
301k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
301k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
301k
                                                  ? 0
688
301k
                                                  : info.task_idx]
689
301k
                                  .get();
690
301k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
18.4E
        } else {
692
18.4E
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
18.4E
                DCHECK(false);
694
18.4E
            }
695
18.4E
            _shared_state = info.shared_state->template cast<SharedState>();
696
18.4E
            _dependency = _shared_state->create_sink_dependency(
697
18.4E
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
18.4E
        }
699
301k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
301k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
301k
    }
702
703
301k
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
301k
    _rows_input_counter =
708
301k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
301k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
301k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
301k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
301k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
301k
    _memory_used_counter =
714
301k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
301k
    _common_profile->add_info_string("IsColocate",
716
301k
                                     std::to_string(_parent->is_colocated_operator()));
717
301k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
301k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
301k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
301k
    return Status::OK();
721
301k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
483k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
483k
    _operator_profile =
664
483k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
483k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
483k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
483k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
483k
    _operator_profile->add_child(_common_profile, true);
673
483k
    _operator_profile->add_child(_custom_profile, true);
674
675
483k
    _operator_profile->set_metadata(_parent->node_id());
676
483k
    _wait_for_finish_dependency_timer =
677
483k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
483k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
483k
    if constexpr (!is_fake_shared) {
680
483k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
483k
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
0
                                                  ? 0
688
0
                                                  : info.task_idx]
689
0
                                  .get();
690
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
483k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
483k
            _shared_state = info.shared_state->template cast<SharedState>();
696
483k
            _dependency = _shared_state->create_sink_dependency(
697
483k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
483k
        }
699
483k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
483k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
483k
    }
702
703
483k
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
483k
    _rows_input_counter =
708
483k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
483k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
483k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
483k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
483k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
483k
    _memory_used_counter =
714
483k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
483k
    _common_profile->add_info_string("IsColocate",
716
483k
                                     std::to_string(_parent->is_colocated_operator()));
717
483k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
483k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
483k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
483k
    return Status::OK();
721
483k
}
_ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
25
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
25
    _operator_profile =
664
25
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
25
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
25
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
25
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
25
    _operator_profile->add_child(_common_profile, true);
673
25
    _operator_profile->add_child(_custom_profile, true);
674
675
25
    _operator_profile->set_metadata(_parent->node_id());
676
25
    _wait_for_finish_dependency_timer =
677
25
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
25
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
25
    if constexpr (!is_fake_shared) {
680
25
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
25
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
0
                                                  ? 0
688
0
                                                  : info.task_idx]
689
0
                                  .get();
690
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
25
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
25
            _shared_state = info.shared_state->template cast<SharedState>();
696
25
            _dependency = _shared_state->create_sink_dependency(
697
25
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
25
        }
699
25
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
25
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
25
    }
702
703
25
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
25
    _rows_input_counter =
708
25
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
25
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
25
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
25
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
25
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
25
    _memory_used_counter =
714
25
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
25
    _common_profile->add_info_string("IsColocate",
716
25
                                     std::to_string(_parent->is_colocated_operator()));
717
25
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
25
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
25
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
25
    return Status::OK();
721
25
}
_ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
338
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
338
    _operator_profile =
664
338
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
338
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
338
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
338
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
338
    _operator_profile->add_child(_common_profile, true);
673
338
    _operator_profile->add_child(_custom_profile, true);
674
675
338
    _operator_profile->set_metadata(_parent->node_id());
676
338
    _wait_for_finish_dependency_timer =
677
338
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
338
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
338
    if constexpr (!is_fake_shared) {
680
338
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
338
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
0
                                                  ? 0
688
0
                                                  : info.task_idx]
689
0
                                  .get();
690
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
338
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
338
            _shared_state = info.shared_state->template cast<SharedState>();
696
338
            _dependency = _shared_state->create_sink_dependency(
697
338
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
338
        }
699
338
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
338
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
338
    }
702
703
338
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
338
    _rows_input_counter =
708
338
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
338
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
338
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
338
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
338
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
338
    _memory_used_counter =
714
338
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
338
    _common_profile->add_info_string("IsColocate",
716
338
                                     std::to_string(_parent->is_colocated_operator()));
717
338
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
338
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
338
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
338
    return Status::OK();
721
338
}
722
723
template <typename SharedState>
724
1.83M
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
1.83M
    if (_closed) {
726
2
        return Status::OK();
727
2
    }
728
1.83M
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
1.29M
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
1.29M
    }
731
1.83M
    _closed = true;
732
1.83M
    return Status::OK();
733
1.83M
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
117k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
117k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
117k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
117k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
117k
    }
731
117k
    _closed = true;
732
117k
    return Status::OK();
733
117k
}
_ZN5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
1
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
1
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
1
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
1
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
1
    }
731
1
    _closed = true;
732
1
    return Status::OK();
733
1
}
_ZN5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
186k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
186k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
186k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
186k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
186k
    }
731
186k
    _closed = true;
732
186k
    return Status::OK();
733
186k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
18
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
18
    if (_closed) {
726
2
        return Status::OK();
727
2
    }
728
16
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
16
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
16
    }
731
16
    _closed = true;
732
16
    return Status::OK();
733
18
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
6.13k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
6.13k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
6.13k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
6.13k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
6.13k
    }
731
6.13k
    _closed = true;
732
6.13k
    return Status::OK();
733
6.13k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
7.69k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
7.69k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
7.69k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
7.69k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
7.69k
    }
731
7.69k
    _closed = true;
732
7.69k
    return Status::OK();
733
7.69k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
91.0k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
91.0k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
91.0k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
91.0k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
91.0k
    }
731
91.0k
    _closed = true;
732
91.0k
    return Status::OK();
733
91.0k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
68.3k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
68.3k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
68.3k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
68.3k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
68.3k
    }
731
68.3k
    _closed = true;
732
68.3k
    return Status::OK();
733
68.3k
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
47
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
47
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
47
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
47
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
47
    }
731
47
    _closed = true;
732
47
    return Status::OK();
733
47
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
546k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
546k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
    }
731
546k
    _closed = true;
732
546k
    return Status::OK();
733
546k
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
7.81k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
7.81k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
7.81k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
7.81k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
7.81k
    }
731
7.81k
    _closed = true;
732
7.81k
    return Status::OK();
733
7.81k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
397
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
397
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
397
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
397
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
397
    }
731
397
    _closed = true;
732
397
    return Status::OK();
733
397
}
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
1.70k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
1.70k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
1.70k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
1.70k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
1.70k
    }
731
1.70k
    _closed = true;
732
1.70k
    return Status::OK();
733
1.70k
}
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
12.5k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
12.5k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
12.5k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
12.5k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
12.5k
    }
731
12.5k
    _closed = true;
732
12.5k
    return Status::OK();
733
12.5k
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
302k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
302k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
302k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
302k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
302k
    }
731
302k
    _closed = true;
732
302k
    return Status::OK();
733
302k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
487k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
487k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
487k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
487k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
487k
    }
731
487k
    _closed = true;
732
487k
    return Status::OK();
733
487k
}
_ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
14
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
14
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
14
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
14
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
14
    }
731
14
    _closed = true;
732
14
    return Status::OK();
733
14
}
_ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
338
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
338
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
338
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
338
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
338
    }
731
338
    _closed = true;
732
338
    return Status::OK();
733
338
}
734
735
template <typename LocalStateType>
736
Status StreamingOperatorX<LocalStateType>::get_block_impl(RuntimeState* state, Block* block,
737
4.43k
                                                          bool* eos) {
738
4.43k
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
739
4.42k
    return pull(state, block, eos);
740
4.43k
}
_ZN5doris18StreamingOperatorXINS_23AssertNumRowsLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
737
38
                                                          bool* eos) {
738
38
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
739
38
    return pull(state, block, eos);
740
38
}
_ZN5doris18StreamingOperatorXINS_16SelectLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
737
4.39k
                                                          bool* eos) {
738
4.39k
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
739
4.38k
    return pull(state, block, eos);
740
4.39k
}
741
742
template <typename LocalStateType>
743
Status StatefulOperatorX<LocalStateType>::get_block_impl(RuntimeState* state, Block* block,
744
669k
                                                         bool* eos) {
745
669k
    auto& local_state = get_local_state(state);
746
669k
    if (need_more_input_data(state)) {
747
640k
        local_state._child_block->clear_column_data(
748
640k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
640k
                        .num_materialized_slots());
750
640k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
640k
                state, local_state._child_block.get(), &local_state._child_eos));
752
640k
        *eos = local_state._child_eos;
753
640k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
62.0k
            return Status::OK();
755
62.0k
        }
756
578k
        {
757
578k
            SCOPED_TIMER(local_state.exec_time_counter());
758
578k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
578k
        }
760
578k
    }
761
762
607k
    if (!need_more_input_data(state)) {
763
579k
        SCOPED_TIMER(local_state.exec_time_counter());
764
579k
        bool new_eos = false;
765
579k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
579k
        if (new_eos) {
767
502k
            *eos = true;
768
502k
        } else if (!need_more_input_data(state)) {
769
23.8k
            *eos = false;
770
23.8k
        }
771
579k
    }
772
607k
    return Status::OK();
773
607k
}
_ZN5doris17StatefulOperatorXINS_23HashJoinProbeLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
135k
                                                         bool* eos) {
745
135k
    auto& local_state = get_local_state(state);
746
135k
    if (need_more_input_data(state)) {
747
119k
        local_state._child_block->clear_column_data(
748
119k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
119k
                        .num_materialized_slots());
750
119k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
119k
                state, local_state._child_block.get(), &local_state._child_eos));
752
119k
        *eos = local_state._child_eos;
753
119k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
35.9k
            return Status::OK();
755
35.9k
        }
756
83.5k
        {
757
83.5k
            SCOPED_TIMER(local_state.exec_time_counter());
758
83.5k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
83.5k
        }
760
83.5k
    }
761
762
99.9k
    if (!need_more_input_data(state)) {
763
99.9k
        SCOPED_TIMER(local_state.exec_time_counter());
764
99.9k
        bool new_eos = false;
765
99.9k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
99.9k
        if (new_eos) {
767
44.7k
            *eos = true;
768
55.2k
        } else if (!need_more_input_data(state)) {
769
9.82k
            *eos = false;
770
9.82k
        }
771
99.9k
    }
772
99.9k
    return Status::OK();
773
99.9k
}
Unexecuted instantiation: _ZN5doris17StatefulOperatorXINS_34PartitionedHashJoinProbeLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
_ZN5doris17StatefulOperatorXINS_16RepeatLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
4.13k
                                                         bool* eos) {
745
4.13k
    auto& local_state = get_local_state(state);
746
4.13k
    if (need_more_input_data(state)) {
747
2.25k
        local_state._child_block->clear_column_data(
748
2.25k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
2.25k
                        .num_materialized_slots());
750
2.25k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
2.25k
                state, local_state._child_block.get(), &local_state._child_eos));
752
2.25k
        *eos = local_state._child_eos;
753
2.25k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
283
            return Status::OK();
755
283
        }
756
1.96k
        {
757
1.96k
            SCOPED_TIMER(local_state.exec_time_counter());
758
1.96k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
1.96k
        }
760
1.96k
    }
761
762
3.88k
    if (!need_more_input_data(state)) {
763
3.88k
        SCOPED_TIMER(local_state.exec_time_counter());
764
3.88k
        bool new_eos = false;
765
3.88k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
3.88k
        if (new_eos) {
767
1.43k
            *eos = true;
768
2.45k
        } else if (!need_more_input_data(state)) {
769
1.89k
            *eos = false;
770
1.89k
        }
771
3.88k
    }
772
3.85k
    return Status::OK();
773
3.85k
}
_ZN5doris17StatefulOperatorXINS_25MaterializationLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
1.82k
                                                         bool* eos) {
745
1.82k
    auto& local_state = get_local_state(state);
746
1.82k
    if (need_more_input_data(state)) {
747
1.82k
        local_state._child_block->clear_column_data(
748
1.82k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
1.82k
                        .num_materialized_slots());
750
1.82k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
1.82k
                state, local_state._child_block.get(), &local_state._child_eos));
752
1.82k
        *eos = local_state._child_eos;
753
1.82k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
761
            return Status::OK();
755
761
        }
756
1.06k
        {
757
1.06k
            SCOPED_TIMER(local_state.exec_time_counter());
758
1.06k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
1.06k
        }
760
1.06k
    }
761
762
1.06k
    if (!need_more_input_data(state)) {
763
1.06k
        SCOPED_TIMER(local_state.exec_time_counter());
764
1.06k
        bool new_eos = false;
765
1.06k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
1.06k
        if (new_eos) {
767
785
            *eos = true;
768
785
        } else if (!need_more_input_data(state)) {
769
0
            *eos = false;
770
0
        }
771
1.06k
    }
772
1.06k
    return Status::OK();
773
1.06k
}
_ZN5doris17StatefulOperatorXINS_22StreamingAggLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
15.4k
                                                         bool* eos) {
745
15.4k
    auto& local_state = get_local_state(state);
746
15.4k
    if (need_more_input_data(state)) {
747
15.4k
        local_state._child_block->clear_column_data(
748
15.4k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
15.4k
                        .num_materialized_slots());
750
15.4k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
15.4k
                state, local_state._child_block.get(), &local_state._child_eos));
752
15.4k
        *eos = local_state._child_eos;
753
15.4k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
2.21k
            return Status::OK();
755
2.21k
        }
756
13.2k
        {
757
13.2k
            SCOPED_TIMER(local_state.exec_time_counter());
758
13.2k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
13.2k
        }
760
13.2k
    }
761
762
13.2k
    if (!need_more_input_data(state)) {
763
7.12k
        SCOPED_TIMER(local_state.exec_time_counter());
764
7.12k
        bool new_eos = false;
765
7.12k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
7.12k
        if (new_eos) {
767
7.06k
            *eos = true;
768
7.06k
        } else if (!need_more_input_data(state)) {
769
0
            *eos = false;
770
0
        }
771
7.12k
    }
772
13.2k
    return Status::OK();
773
13.2k
}
_ZN5doris17StatefulOperatorXINS_30DistinctStreamingAggLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
482k
                                                         bool* eos) {
745
482k
    auto& local_state = get_local_state(state);
746
483k
    if (need_more_input_data(state)) {
747
483k
        local_state._child_block->clear_column_data(
748
483k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
483k
                        .num_materialized_slots());
750
483k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
483k
                state, local_state._child_block.get(), &local_state._child_eos));
752
483k
        *eos = local_state._child_eos;
753
483k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
21.3k
            return Status::OK();
755
21.3k
        }
756
462k
        {
757
462k
            SCOPED_TIMER(local_state.exec_time_counter());
758
462k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
462k
        }
760
462k
    }
761
762
461k
    if (!need_more_input_data(state)) {
763
439k
        SCOPED_TIMER(local_state.exec_time_counter());
764
439k
        bool new_eos = false;
765
439k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
439k
        if (new_eos) {
767
438k
            *eos = true;
768
438k
        } else if (!need_more_input_data(state)) {
769
0
            *eos = false;
770
0
        }
771
439k
    }
772
461k
    return Status::OK();
773
461k
}
_ZN5doris17StatefulOperatorXINS_29NestedLoopJoinProbeLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
22.8k
                                                         bool* eos) {
745
22.8k
    auto& local_state = get_local_state(state);
746
22.8k
    if (need_more_input_data(state)) {
747
11.0k
        local_state._child_block->clear_column_data(
748
11.0k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
11.0k
                        .num_materialized_slots());
750
11.0k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
11.0k
                state, local_state._child_block.get(), &local_state._child_eos));
752
11.0k
        *eos = local_state._child_eos;
753
11.0k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
491
            return Status::OK();
755
491
        }
756
10.6k
        {
757
10.6k
            SCOPED_TIMER(local_state.exec_time_counter());
758
10.6k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
10.6k
        }
760
10.6k
    }
761
762
22.3k
    if (!need_more_input_data(state)) {
763
21.8k
        SCOPED_TIMER(local_state.exec_time_counter());
764
21.8k
        bool new_eos = false;
765
21.8k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
21.8k
        if (new_eos) {
767
6.11k
            *eos = true;
768
15.7k
        } else if (!need_more_input_data(state)) {
769
11.7k
            *eos = false;
770
11.7k
        }
771
21.8k
    }
772
22.3k
    return Status::OK();
773
22.3k
}
_ZN5doris17StatefulOperatorXINS_23TableFunctionLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
6.61k
                                                         bool* eos) {
745
6.61k
    auto& local_state = get_local_state(state);
746
6.61k
    if (need_more_input_data(state)) {
747
6.25k
        local_state._child_block->clear_column_data(
748
6.25k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
6.25k
                        .num_materialized_slots());
750
6.25k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
6.25k
                state, local_state._child_block.get(), &local_state._child_eos));
752
6.25k
        *eos = local_state._child_eos;
753
6.25k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
957
            return Status::OK();
755
957
        }
756
5.29k
        {
757
5.29k
            SCOPED_TIMER(local_state.exec_time_counter());
758
5.29k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
5.29k
        }
760
5.29k
    }
761
762
5.65k
    if (!need_more_input_data(state)) {
763
5.65k
        SCOPED_TIMER(local_state.exec_time_counter());
764
5.65k
        bool new_eos = false;
765
5.65k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
5.65k
        if (new_eos) {
767
3.57k
            *eos = true;
768
3.57k
        } else if (!need_more_input_data(state)) {
769
366
            *eos = false;
770
366
        }
771
5.65k
    }
772
5.65k
    return Status::OK();
773
5.65k
}
774
775
template <typename Writer, typename Parent>
776
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
777
45.6k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
778
45.6k
    RETURN_IF_ERROR(Base::init(state, info));
779
45.6k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
780
45.6k
                                                         "AsyncWriterDependency", true);
781
45.6k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
782
45.6k
                             _finish_dependency));
783
784
45.6k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
785
45.6k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
786
45.6k
    return Status::OK();
787
45.6k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
777
362
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
778
362
    RETURN_IF_ERROR(Base::init(state, info));
779
362
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
780
362
                                                         "AsyncWriterDependency", true);
781
362
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
782
362
                             _finish_dependency));
783
784
362
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
785
362
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
786
362
    return Status::OK();
787
362
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
777
45.2k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
778
45.2k
    RETURN_IF_ERROR(Base::init(state, info));
779
45.2k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
780
45.2k
                                                         "AsyncWriterDependency", true);
781
45.2k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
782
45.2k
                             _finish_dependency));
783
784
45.2k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
785
45.2k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
786
45.2k
    return Status::OK();
787
45.2k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
777
14
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
778
14
    RETURN_IF_ERROR(Base::init(state, info));
779
14
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
780
14
                                                         "AsyncWriterDependency", true);
781
14
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
782
14
                             _finish_dependency));
783
784
14
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
785
14
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
786
14
    return Status::OK();
787
14
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VHiveTableWriterENS_22HiveTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_25IcebergTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_30SpillIcebergTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_18VIcebergDeleteSinkENS_26IcebergDeleteSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_17VIcebergMergeSinkENS_25IcebergMergeSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_14VMCTableWriterENS_20MCTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_15VTVFTableWriterENS_21TVFTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
788
789
template <typename Writer, typename Parent>
790
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
791
46.3k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
792
46.3k
    RETURN_IF_ERROR(Base::open(state));
793
46.3k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
794
353k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
795
307k
        RETURN_IF_ERROR(
796
307k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
797
307k
    }
798
46.3k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
799
46.3k
    return Status::OK();
800
46.3k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
791
361
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
792
361
    RETURN_IF_ERROR(Base::open(state));
793
361
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
794
1.86k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
795
1.50k
        RETURN_IF_ERROR(
796
1.50k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
797
1.50k
    }
798
361
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
799
361
    return Status::OK();
800
361
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4openEPNS_12RuntimeStateE
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
791
45.9k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
792
45.9k
    RETURN_IF_ERROR(Base::open(state));
793
45.9k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
794
351k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
795
305k
        RETURN_IF_ERROR(
796
305k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
797
305k
    }
798
45.9k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
799
45.9k
    return Status::OK();
800
45.9k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
791
14
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
792
14
    RETURN_IF_ERROR(Base::open(state));
793
14
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
794
252
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
795
238
        RETURN_IF_ERROR(
796
238
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
797
238
    }
798
14
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
799
14
    return Status::OK();
800
14
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VHiveTableWriterENS_22HiveTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_25IcebergTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_30SpillIcebergTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_18VIcebergDeleteSinkENS_26IcebergDeleteSinkOperatorXEE4openEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_17VIcebergMergeSinkENS_25IcebergMergeSinkOperatorXEE4openEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_14VMCTableWriterENS_20MCTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_15VTVFTableWriterENS_21TVFTableSinkOperatorXEE4openEPNS_12RuntimeStateE
801
802
template <typename Writer, typename Parent>
803
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
804
61.4k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
805
61.4k
    return _writer->sink(block, eos);
806
61.4k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
804
1.55k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
805
1.55k
    return _writer->sink(block, eos);
806
1.55k
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
804
59.8k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
805
59.8k
    return _writer->sink(block, eos);
806
59.8k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
804
14
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
805
14
    return _writer->sink(block, eos);
806
14
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VHiveTableWriterENS_22HiveTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_25IcebergTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_30SpillIcebergTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_18VIcebergDeleteSinkENS_26IcebergDeleteSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_17VIcebergMergeSinkENS_25IcebergMergeSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_14VMCTableWriterENS_20MCTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_15VTVFTableWriterENS_21TVFTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
807
808
template <typename Writer, typename Parent>
809
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
810
46.4k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
811
46.4k
    if (_closed) {
812
0
        return Status::OK();
813
0
    }
814
46.4k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
815
46.4k
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
816
    // if the init failed, the _writer may be nullptr. so here need check
817
46.4k
    if (_writer) {
818
46.4k
        Status st = _writer->get_writer_status();
819
46.4k
        if (exec_status.ok()) {
820
46.3k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
821
46.3k
                                                       : Status::Cancelled("force close"));
822
46.3k
        } else {
823
122
            _writer->force_close(exec_status);
824
122
        }
825
        // If there is an error in process_block thread, then we should get the writer
826
        // status before call force_close. For example, the thread may failed in commit
827
        // transaction.
828
46.4k
        RETURN_IF_ERROR(st);
829
46.4k
    }
830
46.3k
    return Base::close(state, exec_status);
831
46.4k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
810
348
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
811
348
    if (_closed) {
812
0
        return Status::OK();
813
0
    }
814
348
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
815
348
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
816
    // if the init failed, the _writer may be nullptr. so here need check
817
348
    if (_writer) {
818
348
        Status st = _writer->get_writer_status();
819
348
        if (exec_status.ok()) {
820
348
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
821
348
                                                       : Status::Cancelled("force close"));
822
348
        } else {
823
0
            _writer->force_close(exec_status);
824
0
        }
825
        // If there is an error in process_block thread, then we should get the writer
826
        // status before call force_close. For example, the thread may failed in commit
827
        // transaction.
828
348
        RETURN_IF_ERROR(st);
829
348
    }
830
348
    return Base::close(state, exec_status);
831
348
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
810
46.0k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
811
46.0k
    if (_closed) {
812
0
        return Status::OK();
813
0
    }
814
46.0k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
815
46.0k
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
816
    // if the init failed, the _writer may be nullptr. so here need check
817
46.0k
    if (_writer) {
818
46.0k
        Status st = _writer->get_writer_status();
819
46.0k
        if (exec_status.ok()) {
820
45.9k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
821
45.9k
                                                       : Status::Cancelled("force close"));
822
45.9k
        } else {
823
122
            _writer->force_close(exec_status);
824
122
        }
825
        // If there is an error in process_block thread, then we should get the writer
826
        // status before call force_close. For example, the thread may failed in commit
827
        // transaction.
828
46.0k
        RETURN_IF_ERROR(st);
829
46.0k
    }
830
45.9k
    return Base::close(state, exec_status);
831
46.0k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
810
14
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
811
14
    if (_closed) {
812
0
        return Status::OK();
813
0
    }
814
14
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
815
14
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
816
    // if the init failed, the _writer may be nullptr. so here need check
817
14
    if (_writer) {
818
14
        Status st = _writer->get_writer_status();
819
14
        if (exec_status.ok()) {
820
14
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
821
14
                                                       : Status::Cancelled("force close"));
822
14
        } else {
823
0
            _writer->force_close(exec_status);
824
0
        }
825
        // If there is an error in process_block thread, then we should get the writer
826
        // status before call force_close. For example, the thread may failed in commit
827
        // transaction.
828
14
        RETURN_IF_ERROR(st);
829
14
    }
830
14
    return Base::close(state, exec_status);
831
14
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VHiveTableWriterENS_22HiveTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_25IcebergTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_30SpillIcebergTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_18VIcebergDeleteSinkENS_26IcebergDeleteSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_17VIcebergMergeSinkENS_25IcebergMergeSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_14VMCTableWriterENS_20MCTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_15VTVFTableWriterENS_21TVFTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
832
833
// An instantiation added outside the macros below needs the matching
834
// 'extern template' declaration in the operator's header (enforced by
835
// build-support/check-extern-template-pairing.py). Instantiations expanded
836
// through DECLARE_OPERATOR are invisible to that check -- macro bodies are
837
// skipped -- so their extern pairing has to be kept in sync by hand.
838
#define DECLARE_OPERATOR(LOCAL_STATE) template class DataSinkOperatorX<LOCAL_STATE>;
839
DECLARE_OPERATOR(HashJoinBuildSinkLocalState)
840
DECLARE_OPERATOR(ResultSinkLocalState)
841
DECLARE_OPERATOR(JdbcTableSinkLocalState)
842
DECLARE_OPERATOR(MemoryScratchSinkLocalState)
843
DECLARE_OPERATOR(ResultFileSinkLocalState)
844
DECLARE_OPERATOR(OlapTableSinkLocalState)
845
DECLARE_OPERATOR(OlapTableSinkV2LocalState)
846
DECLARE_OPERATOR(HiveTableSinkLocalState)
847
DECLARE_OPERATOR(TVFTableSinkLocalState)
848
DECLARE_OPERATOR(IcebergTableSinkLocalState)
849
DECLARE_OPERATOR(SpillIcebergTableSinkLocalState)
850
DECLARE_OPERATOR(IcebergDeleteSinkLocalState)
851
DECLARE_OPERATOR(IcebergMergeSinkLocalState)
852
DECLARE_OPERATOR(MCTableSinkLocalState)
853
DECLARE_OPERATOR(AnalyticSinkLocalState)
854
DECLARE_OPERATOR(BlackholeSinkLocalState)
855
DECLARE_OPERATOR(SortSinkLocalState)
856
DECLARE_OPERATOR(SpillSortSinkLocalState)
857
DECLARE_OPERATOR(LocalExchangeSinkLocalState)
858
DECLARE_OPERATOR(AggSinkLocalState)
859
DECLARE_OPERATOR(BucketedAggSinkLocalState)
860
DECLARE_OPERATOR(PartitionedAggSinkLocalState)
861
DECLARE_OPERATOR(ExchangeSinkLocalState)
862
DECLARE_OPERATOR(NestedLoopJoinBuildSinkLocalState)
863
DECLARE_OPERATOR(UnionSinkLocalState)
864
DECLARE_OPERATOR(MultiCastDataStreamSinkLocalState)
865
DECLARE_OPERATOR(PartitionSortSinkLocalState)
866
DECLARE_OPERATOR(SetProbeSinkLocalState<true>)
867
DECLARE_OPERATOR(SetProbeSinkLocalState<false>)
868
DECLARE_OPERATOR(SetSinkLocalState<true>)
869
DECLARE_OPERATOR(SetSinkLocalState<false>)
870
DECLARE_OPERATOR(PartitionedHashJoinSinkLocalState)
871
DECLARE_OPERATOR(GroupCommitBlockSinkLocalState)
872
DECLARE_OPERATOR(CacheSinkLocalState)
873
DECLARE_OPERATOR(DictSinkLocalState)
874
DECLARE_OPERATOR(RecCTESinkLocalState)
875
DECLARE_OPERATOR(RecCTEAnchorSinkLocalState)
876
877
#undef DECLARE_OPERATOR
878
879
#define DECLARE_OPERATOR(LOCAL_STATE) template class OperatorX<LOCAL_STATE>;
880
DECLARE_OPERATOR(HashJoinProbeLocalState)
881
DECLARE_OPERATOR(OlapScanLocalState)
882
DECLARE_OPERATOR(GroupCommitLocalState)
883
DECLARE_OPERATOR(JDBCScanLocalState)
884
DECLARE_OPERATOR(FileScanLocalState)
885
DECLARE_OPERATOR(AnalyticLocalState)
886
DECLARE_OPERATOR(SortLocalState)
887
DECLARE_OPERATOR(SpillSortLocalState)
888
DECLARE_OPERATOR(LocalMergeSortLocalState)
889
DECLARE_OPERATOR(AggLocalState)
890
DECLARE_OPERATOR(BucketedAggLocalState)
891
DECLARE_OPERATOR(PartitionedAggLocalState)
892
DECLARE_OPERATOR(TableFunctionLocalState)
893
DECLARE_OPERATOR(ExchangeLocalState)
894
DECLARE_OPERATOR(RepeatLocalState)
895
DECLARE_OPERATOR(NestedLoopJoinProbeLocalState)
896
DECLARE_OPERATOR(AssertNumRowsLocalState)
897
DECLARE_OPERATOR(EmptySetLocalState)
898
DECLARE_OPERATOR(UnionSourceLocalState)
899
DECLARE_OPERATOR(MultiCastDataStreamSourceLocalState)
900
DECLARE_OPERATOR(PartitionSortSourceLocalState)
901
DECLARE_OPERATOR(SetSourceLocalState<true>)
902
DECLARE_OPERATOR(SetSourceLocalState<false>)
903
DECLARE_OPERATOR(DataGenLocalState)
904
DECLARE_OPERATOR(SchemaScanLocalState)
905
DECLARE_OPERATOR(MetaScanLocalState)
906
DECLARE_OPERATOR(LocalExchangeSourceLocalState)
907
DECLARE_OPERATOR(PartitionedHashJoinProbeLocalState)
908
DECLARE_OPERATOR(CacheSourceLocalState)
909
DECLARE_OPERATOR(RecCTESourceLocalState)
910
DECLARE_OPERATOR(RecCTEScanLocalState)
911
912
#ifdef BE_TEST
913
DECLARE_OPERATOR(MockLocalState)
914
DECLARE_OPERATOR(MockScanLocalState)
915
#endif
916
#undef DECLARE_OPERATOR
917
918
template class StreamingOperatorX<AssertNumRowsLocalState>;
919
template class StreamingOperatorX<SelectLocalState>;
920
921
template class StatefulOperatorX<HashJoinProbeLocalState>;
922
template class StatefulOperatorX<PartitionedHashJoinProbeLocalState>;
923
template class StatefulOperatorX<RepeatLocalState>;
924
template class StatefulOperatorX<MaterializationLocalState>;
925
template class StatefulOperatorX<StreamingAggLocalState>;
926
template class StatefulOperatorX<DistinctStreamingAggLocalState>;
927
template class StatefulOperatorX<NestedLoopJoinProbeLocalState>;
928
template class StatefulOperatorX<TableFunctionLocalState>;
929
930
template class PipelineXSinkLocalState<HashJoinSharedState>;
931
template class PipelineXSinkLocalState<PartitionedHashJoinSharedState>;
932
template class PipelineXSinkLocalState<SortSharedState>;
933
template class PipelineXSinkLocalState<SpillSortSharedState>;
934
template class PipelineXSinkLocalState<NestedLoopJoinSharedState>;
935
template class PipelineXSinkLocalState<AnalyticSharedState>;
936
template class PipelineXSinkLocalState<AggSharedState>;
937
template class PipelineXSinkLocalState<BucketedAggSharedState>;
938
template class PipelineXSinkLocalState<PartitionedAggSharedState>;
939
template class PipelineXSinkLocalState<FakeSharedState>;
940
template class PipelineXSinkLocalState<UnionSharedState>;
941
template class PipelineXSinkLocalState<PartitionSortNodeSharedState>;
942
template class PipelineXSinkLocalState<MultiCastSharedState>;
943
template class PipelineXSinkLocalState<SetSharedState>;
944
template class PipelineXSinkLocalState<LocalExchangeSharedState>;
945
template class PipelineXSinkLocalState<BasicSharedState>;
946
template class PipelineXSinkLocalState<DataQueueSharedState>;
947
template class PipelineXSinkLocalState<RecCTESharedState>;
948
949
template class PipelineXLocalState<HashJoinSharedState>;
950
template class PipelineXLocalState<PartitionedHashJoinSharedState>;
951
template class PipelineXLocalState<SortSharedState>;
952
template class PipelineXLocalState<SpillSortSharedState>;
953
template class PipelineXLocalState<NestedLoopJoinSharedState>;
954
template class PipelineXLocalState<AnalyticSharedState>;
955
template class PipelineXLocalState<AggSharedState>;
956
template class PipelineXLocalState<BucketedAggSharedState>;
957
template class PipelineXLocalState<PartitionedAggSharedState>;
958
template class PipelineXLocalState<FakeSharedState>;
959
template class PipelineXLocalState<UnionSharedState>;
960
template class PipelineXLocalState<DataQueueSharedState>;
961
template class PipelineXLocalState<MultiCastSharedState>;
962
template class PipelineXLocalState<PartitionSortNodeSharedState>;
963
template class PipelineXLocalState<SetSharedState>;
964
template class PipelineXLocalState<LocalExchangeSharedState>;
965
template class PipelineXLocalState<BasicSharedState>;
966
template class PipelineXLocalState<RecCTESharedState>;
967
968
template class AsyncWriterSink<doris::VFileResultWriter, ResultFileSinkOperatorX>;
969
template class AsyncWriterSink<doris::VJdbcTableWriter, JdbcTableSinkOperatorX>;
970
template class AsyncWriterSink<doris::VTabletWriter, OlapTableSinkOperatorX>;
971
template class AsyncWriterSink<doris::VTabletWriterV2, OlapTableSinkV2OperatorX>;
972
template class AsyncWriterSink<doris::VHiveTableWriter, HiveTableSinkOperatorX>;
973
template class AsyncWriterSink<doris::VIcebergTableWriter, IcebergTableSinkOperatorX>;
974
template class AsyncWriterSink<doris::VIcebergTableWriter, SpillIcebergTableSinkOperatorX>;
975
template class AsyncWriterSink<doris::VIcebergDeleteSink, IcebergDeleteSinkOperatorX>;
976
template class AsyncWriterSink<doris::VIcebergMergeSink, IcebergMergeSinkOperatorX>;
977
template class AsyncWriterSink<doris::VMCTableWriter, MCTableSinkOperatorX>;
978
template class AsyncWriterSink<doris::VTVFTableWriter, TVFTableSinkOperatorX>;
979
980
#ifdef BE_TEST
981
template class OperatorX<DummyOperatorLocalState>;
982
template class DataSinkOperatorX<DummySinkLocalState>;
983
#endif
984
985
} // namespace doris