Coverage Report

Created: 2026-09-16 06:22

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
1.61M
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
1.61M
    if (_parent->nereids_id() == -1) {
122
828k
        return fmt::format("(id={})", _parent->node_id());
123
828k
    } else {
124
787k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
787k
    }
126
1.61M
}
_ZNK5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
68.4k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
68.4k
    if (_parent->nereids_id() == -1) {
122
0
        return fmt::format("(id={})", _parent->node_id());
123
68.4k
    } else {
124
68.4k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
68.4k
    }
126
68.4k
}
_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
216k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
216k
    if (_parent->nereids_id() == -1) {
122
12
        return fmt::format("(id={})", _parent->node_id());
123
216k
    } else {
124
216k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
216k
    }
126
216k
}
_ZNK5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
27
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
27
    if (_parent->nereids_id() == -1) {
122
0
        return fmt::format("(id={})", _parent->node_id());
123
27
    } else {
124
27
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
27
    }
126
27
}
_ZNK5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
6.14k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
6.14k
    if (_parent->nereids_id() == -1) {
122
0
        return fmt::format("(id={})", _parent->node_id());
123
6.14k
    } else {
124
6.14k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
6.14k
    }
126
6.14k
}
_ZNK5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
8.06k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
8.06k
    if (_parent->nereids_id() == -1) {
122
12
        return fmt::format("(id={})", _parent->node_id());
123
8.05k
    } else {
124
8.05k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
8.05k
    }
126
8.06k
}
_ZNK5doris19PipelineXLocalStateINS_14AggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
85.6k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
85.6k
    if (_parent->nereids_id() == -1) {
122
29
        return fmt::format("(id={})", _parent->node_id());
123
85.6k
    } else {
124
85.6k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
85.6k
    }
126
85.6k
}
_ZNK5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
57.8k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
57.8k
    if (_parent->nereids_id() == -1) {
122
0
        return fmt::format("(id={})", _parent->node_id());
123
57.8k
    } else {
124
57.8k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
57.8k
    }
126
57.8k
}
_ZNK5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
114
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
114
    if (_parent->nereids_id() == -1) {
122
0
        return fmt::format("(id={})", _parent->node_id());
123
114
    } else {
124
114
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
114
    }
126
114
}
_ZNK5doris19PipelineXLocalStateINS_15FakeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
549k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
549k
    if (_parent->nereids_id() == -1) {
122
263k
        return fmt::format("(id={})", _parent->node_id());
123
285k
    } else {
124
285k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
285k
    }
126
549k
}
_ZNK5doris19PipelineXLocalStateINS_16UnionSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
54.7k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
54.7k
    if (_parent->nereids_id() == -1) {
122
2
        return fmt::format("(id={})", _parent->node_id());
123
54.7k
    } else {
124
54.7k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
54.7k
    }
126
54.7k
}
_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.81k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
4.81k
    if (_parent->nereids_id() == -1) {
122
4.81k
        return fmt::format("(id={})", _parent->node_id());
123
4.81k
    } else {
124
1
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
1
    }
126
4.81k
}
_ZNK5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
803
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
803
    if (_parent->nereids_id() == -1) {
122
102
        return fmt::format("(id={})", _parent->node_id());
123
701
    } else {
124
701
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
701
    }
126
803
}
_ZNK5doris19PipelineXLocalStateINS_14SetSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
4.89k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
4.89k
    if (_parent->nereids_id() == -1) {
122
13
        return fmt::format("(id={})", _parent->node_id());
123
4.87k
    } else {
124
4.87k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
4.87k
    }
126
4.89k
}
_ZNK5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
558k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
559k
    if (_parent->nereids_id() == -1) {
122
559k
        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
558k
}
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.10M
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
1.10M
    if (_parent->nereids_id() == -1) {
131
598k
        return fmt::format("(id={})", _parent->node_id());
132
598k
    } else {
133
504k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
504k
    }
135
1.10M
}
_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
217k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
217k
    if (_parent->nereids_id() == -1) {
131
9
        return fmt::format("(id={})", _parent->node_id());
132
217k
    } else {
133
217k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
217k
    }
135
217k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
34
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
34
    if (_parent->nereids_id() == -1) {
131
0
        return fmt::format("(id={})", _parent->node_id());
132
34
    } else {
133
34
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
34
    }
135
34
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
6.15k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
6.15k
    if (_parent->nereids_id() == -1) {
131
0
        return fmt::format("(id={})", _parent->node_id());
132
6.15k
    } else {
133
6.15k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
6.15k
    }
135
6.15k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
8.06k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
8.06k
    if (_parent->nereids_id() == -1) {
131
12
        return fmt::format("(id={})", _parent->node_id());
132
8.05k
    } else {
133
8.05k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
8.05k
    }
135
8.06k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
86.2k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
86.2k
    if (_parent->nereids_id() == -1) {
131
29
        return fmt::format("(id={})", _parent->node_id());
132
86.2k
    } else {
133
86.2k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
86.2k
    }
135
86.2k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
57.7k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
57.7k
    if (_parent->nereids_id() == -1) {
131
0
        return fmt::format("(id={})", _parent->node_id());
132
57.7k
    } else {
133
57.7k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
57.7k
    }
135
57.7k
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
124
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
124
    if (_parent->nereids_id() == -1) {
131
0
        return fmt::format("(id={})", _parent->node_id());
132
124
    } else {
133
124
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
124
    }
135
124
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
46
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
49
    if (_parent->nereids_id() == -1) {
131
49
        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
46
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
11.3k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
11.3k
    if (_parent->nereids_id() == -1) {
131
3
        return fmt::format("(id={})", _parent->node_id());
132
11.3k
    } else {
133
11.3k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
11.3k
    }
135
11.3k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
812
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
812
    if (_parent->nereids_id() == -1) {
131
102
        return fmt::format("(id={})", _parent->node_id());
132
710
    } else {
133
710
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
710
    }
135
812
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE11name_suffixB5cxx11Ev
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
12.3k
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.3k
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
200k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
201k
    if (_parent->nereids_id() == -1) {
131
201k
        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
200k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
384k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
384k
    if (_parent->nereids_id() == -1) {
131
384k
        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
384k
}
_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
30.9k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
30.9k
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
30.9k
    _terminated = true;
143
30.9k
    return Status::OK();
144
30.9k
}
_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
2.82k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
2.82k
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
2.82k
    _terminated = true;
143
2.82k
    return Status::OK();
144
2.82k
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
1
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
1
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
1
    _terminated = true;
143
1
    return Status::OK();
144
1
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
4
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
4
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
4
    _terminated = true;
143
4
    return Status::OK();
144
4
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
1.41k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
1.41k
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
1.41k
    _terminated = true;
143
1.41k
    return Status::OK();
144
1.41k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
1.17k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
1.17k
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
1.17k
    _terminated = true;
143
1.17k
    return Status::OK();
144
1.17k
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
638
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
638
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
638
    _terminated = true;
143
638
    return Status::OK();
144
638
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
280
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
280
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
280
    _terminated = true;
143
280
    return Status::OK();
144
280
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
3
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
3
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
3
    _terminated = true;
143
3
    return Status::OK();
144
3
}
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
245
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
245
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
245
    _terminated = true;
143
245
    return Status::OK();
144
245
}
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE9terminateEPNS_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_24LocalExchangeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
234
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
234
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
234
    _terminated = true;
143
234
    return Status::OK();
144
234
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE9terminateEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
132
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
132
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
132
    _terminated = true;
143
132
    return Status::OK();
144
132
}
145
146
283k
DataDistribution OperatorBase::required_data_distribution(RuntimeState* /*state*/) const {
147
283k
    return _child && _child->is_serial_operator() && !is_source()
148
283k
                   ? DataDistribution(TLocalPartitionType::PASSTHROUGH)
149
283k
                   : DataDistribution(TLocalPartitionType::NOOP);
150
283k
}
151
152
15.0k
bool OperatorBase::child_breaks_local_key_distribution(RuntimeState* state) const {
153
15.0k
    if (!_child) {
154
13.8k
        return false;
155
13.8k
    }
156
1.26k
    if (_child->is_serial_operator()) {
157
142
        return true;
158
142
    }
159
1.12k
    const auto child_distribution = _child->required_data_distribution(state);
160
1.12k
    return child_distribution.need_local_exchange() &&
161
1.12k
           !is_shuffled_exchange(child_distribution.distribution_type);
162
1.26k
}
163
164
template <typename SharedStateArg>
165
17.6k
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
166
17.6k
    fmt::memory_buffer debug_string_buffer;
167
17.6k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
168
17.6k
    return fmt::to_string(debug_string_buffer);
169
17.6k
}
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
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_15SortSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_14AggSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris19PipelineXLocalStateINS_15FakeSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
165
17.6k
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
166
17.6k
    fmt::memory_buffer debug_string_buffer;
167
17.6k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
168
17.6k
    return fmt::to_string(debug_string_buffer);
169
17.6k
}
_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
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_16BasicSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_17RecCTESharedStateEE12debug_stringB5cxx11Ei
170
171
template <typename SharedStateArg>
172
17.6k
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
173
17.6k
    fmt::memory_buffer debug_string_buffer;
174
17.6k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
175
17.6k
    return fmt::to_string(debug_string_buffer);
176
17.6k
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
172
17.6k
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
173
17.6k
    fmt::memory_buffer debug_string_buffer;
174
17.6k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
175
17.6k
    return fmt::to_string(debug_string_buffer);
176
17.6k
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE12debug_stringB5cxx11Ei
177
178
17.6k
std::string OperatorXBase::debug_string(int indentation_level) const {
179
17.6k
    fmt::memory_buffer debug_string_buffer;
180
17.6k
    fmt::format_to(debug_string_buffer, "{}{}: id={}, parallel_tasks={}, _is_serial_operator={}",
181
17.6k
                   std::string(indentation_level * 2, ' '), _op_name, node_id(), _parallel_tasks,
182
17.6k
                   _is_serial_operator);
183
17.6k
    return fmt::to_string(debug_string_buffer);
184
17.6k
}
185
186
17.6k
std::string OperatorXBase::debug_string(RuntimeState* state, int indentation_level) const {
187
17.6k
    return state->get_local_state(operator_id())->debug_string(indentation_level);
188
17.6k
}
189
190
635k
Status OperatorXBase::init(const TPlanNode& tnode, RuntimeState* state) {
191
635k
    std::string node_name = print_plan_node_type(tnode.node_type);
192
635k
    _nereids_id = tnode.nereids_id;
193
635k
    if (!tnode.intermediate_output_tuple_id_list.empty()) {
194
3.87k
        if (!has_projection()) {
195
0
            return Status::InternalError("no final output tuple id");
196
0
        }
197
3.87k
        if (tnode.intermediate_output_tuple_id_list.size() !=
198
3.87k
            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.87k
    }
206
635k
    auto substr = node_name.substr(0, node_name.find("_NODE"));
207
635k
    _op_name = substr + "_OPERATOR";
208
209
635k
    if (tnode.__isset.vconjunct) {
210
0
        return Status::InternalError("vconjunct is not supported yet");
211
635k
    } 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.8k
    }
218
219
    // create the projections expr
220
635k
    if (tnode.__isset.projections) {
221
260k
        RETURN_IF_ERROR(VExpr::create_expr_trees(tnode.projections, _projection->projections));
222
260k
    }
223
635k
    if (!tnode.intermediate_projections_list.empty()) {
224
3.87k
        DCHECK(has_projection()) << "no final projections";
225
3.87k
        _projection->intermediate_projections.reserve(tnode.intermediate_projections_list.size());
226
6.56k
        for (const auto& tnode_projections : tnode.intermediate_projections_list) {
227
6.56k
            VExprContextSPtrs projections;
228
6.56k
            RETURN_IF_ERROR(VExpr::create_expr_trees(tnode_projections, projections));
229
6.56k
            _projection->intermediate_projections.push_back(projections);
230
6.56k
        }
231
3.87k
    }
232
635k
    return Status::OK();
233
635k
}
234
235
662k
Status OperatorXBase::prepare(RuntimeState* state) {
236
662k
    for (auto& conjunct : _conjuncts) {
237
272k
        RETURN_IF_ERROR(conjunct->prepare(state, operator_row_desc_before_projection()));
238
272k
    }
239
662k
    if (state->enable_adjust_conjunct_order_by_cost()) {
240
611k
        std::ranges::stable_sort(_conjuncts, [](const auto& a, const auto& b) {
241
339k
            return a->execute_cost() < b->execute_cost();
242
339k
        });
243
611k
    };
244
245
662k
    if (has_projection()) {
246
259k
        auto& projection = *_projection;
247
266k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
248
6.56k
            const auto& input_row_desc =
249
6.56k
                    i == 0 ? operator_row_desc_before_projection()
250
6.56k
                           : projection.intermediate_output_row_descriptors[i - 1];
251
6.56k
            RETURN_IF_ERROR(
252
6.56k
                    VExpr::prepare(projection.intermediate_projections[i], state, input_row_desc));
253
6.56k
        }
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
662k
    for (auto& conjunct : _conjuncts) {
265
272k
        RETURN_IF_ERROR(conjunct->open(state));
266
272k
    }
267
662k
    if (has_projection()) {
268
259k
        RETURN_IF_ERROR(VExpr::open(_projection->projections, state));
269
259k
        for (auto& projections : _projection->intermediate_projections) {
270
6.56k
            RETURN_IF_ERROR(VExpr::open(projections, state));
271
6.56k
        }
272
259k
    }
273
662k
    if (_child && !is_source()) {
274
89.3k
        RETURN_IF_ERROR(_child->prepare(state));
275
89.3k
    }
276
277
662k
    if (VExpr::contains_blockable_function(_conjuncts) ||
278
662k
        (has_projection() && VExpr::contains_blockable_function(_projection->projections))) {
279
0
        _blockable = true;
280
0
    }
281
282
662k
    return Status::OK();
283
662k
}
284
285
7.60k
Status OperatorXBase::terminate(RuntimeState* state) {
286
7.60k
    if (_child && !is_source()) {
287
613
        RETURN_IF_ERROR(_child->terminate(state));
288
613
    }
289
7.60k
    auto result = state->get_local_state_result(operator_id());
290
7.60k
    if (!result) {
291
0
        return result.error();
292
0
    }
293
7.60k
    return result.value()->terminate(state);
294
7.60k
}
295
296
4.39M
Status OperatorXBase::close(RuntimeState* state) {
297
4.39M
    if (_child && !is_source()) {
298
706k
        RETURN_IF_ERROR(_child->close(state));
299
706k
    }
300
4.39M
    auto result = state->get_local_state_result(operator_id());
301
4.39M
    if (!result) {
302
0
        return result.error();
303
0
    }
304
4.39M
    return result.value()->close(state);
305
4.39M
}
306
307
288k
void PipelineXLocalStateBase::clear_origin_block() {
308
288k
    _origin_block.clear_column_data(
309
288k
            _parent->operator_row_desc_before_projection().num_materialized_slots());
310
288k
}
311
312
573k
Status PipelineXLocalStateBase::filter_block(const VExprContextSPtrs& expr_contexts, Block* block) {
313
573k
    RETURN_IF_ERROR(VExprContext::filter_block(expr_contexts, block, block->columns()));
314
315
573k
    _estimate_memory_usage += VExprContext::get_memory_usage(expr_contexts);
316
573k
    return Status::OK();
317
573k
}
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
288k
                                     Block* output_block) const {
326
288k
    auto* local_state = state->get_local_state(operator_id());
327
288k
    SCOPED_TIMER(local_state->exec_time_counter());
328
288k
    SCOPED_TIMER(local_state->_projection_timer);
329
288k
    const size_t rows = origin_block->rows();
330
288k
    if (rows == 0) {
331
150k
        return Status::OK();
332
150k
    }
333
138k
    SCOPED_PEAK_MEM(&local_state->_estimate_memory_usage);
334
335
138k
    {
336
138k
        Block input_block = *origin_block;
337
338
138k
        ColumnsWithTypeAndName new_columns;
339
138k
        for (const auto& projections : local_state->_intermediate_projections) {
340
3.58k
            if (projections.empty()) {
341
0
                return Status::InternalError("meet empty intermediate projection, node id: {}",
342
0
                                             node_id());
343
0
            }
344
3.58k
            new_columns.resize(projections.size());
345
66.8k
            for (int i = 0; i < projections.size(); i++) {
346
63.2k
                RETURN_IF_ERROR(projections[i]->execute(&input_block, new_columns[i]));
347
63.2k
                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
63.2k
            }
355
3.57k
            Block tmp_block {new_columns};
356
3.57k
            input_block.swap(tmp_block);
357
3.57k
        }
358
359
138k
        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
138k
        auto scoped_mutable_block = VectorizedUtils::build_scoped_mutable_mem_reuse_block(
367
138k
                output_block, _projection->output_row_descriptor);
368
138k
        auto& mutable_columns = scoped_mutable_block.mutable_columns();
369
138k
        DCHECK_EQ(mutable_columns.size(), local_state->_projections.size()) << debug_string();
370
138k
        Columns shared_columns(mutable_columns.size());
371
372
780k
        for (int i = 0; i < mutable_columns.size(); ++i) {
373
641k
            ColumnPtr column_ptr;
374
641k
            RETURN_IF_ERROR(local_state->_projections[i]->execute(&input_block, column_ptr));
375
641k
            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
641k
            column_ptr = column_ptr->convert_to_full_column_if_const();
382
641k
            if (is_column_nullable(*mutable_columns[i]) && !is_column_nullable(*column_ptr)) {
383
0
                column_ptr = make_nullable(column_ptr, false);
384
0
            }
385
641k
            if (column_ptr->is_exclusive()) {
386
227k
                mutable_columns[i] = IColumn::mutate(std::move(column_ptr));
387
414k
            } else {
388
414k
                shared_columns[i] = std::move(column_ptr);
389
414k
            }
390
641k
        }
391
392
138k
        scoped_mutable_block.restore();
393
780k
        for (int i = 0; i < shared_columns.size(); ++i) {
394
641k
            if (shared_columns[i]) {
395
414k
                output_block->replace_by_position(i, std::move(shared_columns[i]));
396
414k
            }
397
641k
        }
398
138k
    }
399
400
0
    origin_block->clear_column_data(
401
138k
            local_state->_parent->operator_row_desc_before_projection().num_materialized_slots());
402
138k
    DCHECK_EQ(output_block->rows(), rows);
403
404
138k
    return Status::OK();
405
138k
}
406
407
4.00M
Status OperatorXBase::get_block_after_projects(RuntimeState* state, Block* block, bool* eos) {
408
4.00M
    DBUG_EXECUTE_IF("Pipeline::return_empty_block", {
409
4.00M
        if (this->_op_name == "AGGREGATION_OPERATOR" || this->_op_name == "HASH_JOIN_OPERATOR" ||
410
4.00M
            this->_op_name == "PARTITIONED_AGGREGATION_OPERATOR" ||
411
4.00M
            this->_op_name == "PARTITIONED_HASH_JOIN_OPERATOR" ||
412
4.00M
            this->_op_name == "CROSS_JOIN_OPERATOR" || this->_op_name == "SORT_OPERATOR") {
413
4.00M
            if (_debug_point_count++ % 2 == 0) {
414
4.00M
                return Status::OK();
415
4.00M
            }
416
4.00M
        }
417
4.00M
    });
418
419
4.00M
    Status status;
420
4.00M
    auto* local_state = state->get_local_state(operator_id());
421
4.00M
    Defer defer([&]() {
422
4.00M
        if (status.ok()) {
423
4.00M
            local_state->update_output_block_counters(*block);
424
4.00M
        }
425
4.00M
    });
426
4.00M
    if (has_projection()) {
427
288k
        local_state->clear_origin_block();
428
288k
        status = get_block(state, &local_state->_origin_block, eos);
429
288k
        if (UNLIKELY(!status.ok())) {
430
25
            return status;
431
25
        }
432
288k
        status = do_projections(state, &local_state->_origin_block, block);
433
288k
        return status;
434
288k
    }
435
3.71M
    status = get_block(state, block, eos);
436
3.71M
    RETURN_IF_ERROR(block->check_type_and_column());
437
3.71M
    return status;
438
3.71M
}
439
440
2.48M
void PipelineXLocalStateBase::reached_limit(Block* block, bool* eos) {
441
2.48M
    if (_parent->_limit != -1 and _num_rows_returned + block->rows() >= _parent->_limit) {
442
9.57k
        block->set_num_rows(_parent->_limit - _num_rows_returned);
443
9.57k
        *eos = true;
444
9.57k
    }
445
446
2.48M
    DBUG_EXECUTE_IF("Pipeline::reached_limit_early", {
447
2.48M
        auto op_name = to_lower(_parent->_op_name);
448
2.48M
        auto arg_op_name = dp->param<std::string>("op_name");
449
2.48M
        arg_op_name = to_lower(arg_op_name);
450
451
2.48M
        if (op_name == arg_op_name) {
452
2.48M
            *eos = true;
453
2.48M
        }
454
2.48M
    });
455
456
2.48M
    if (auto rows = block->rows()) {
457
719k
        _num_rows_returned += rows;
458
719k
        _state->get_query_ctx()->resource_ctx()->io_context()->update_process_rows(rows);
459
719k
    }
460
2.48M
}
461
462
30.9k
Status DataSinkOperatorXBase::terminate(RuntimeState* state) {
463
30.9k
    auto result = state->get_sink_local_state_result();
464
30.9k
    if (!result) {
465
0
        return result.error();
466
0
    }
467
30.9k
    return result.value()->terminate(state);
468
30.9k
}
469
470
17.6k
std::string DataSinkOperatorXBase::debug_string(int indentation_level) const {
471
17.6k
    fmt::memory_buffer debug_string_buffer;
472
473
17.6k
    fmt::format_to(debug_string_buffer, "{}{}: id={}, _is_serial_operator={}",
474
17.6k
                   std::string(indentation_level * 2, ' '), _name, node_id(), _is_serial_operator);
475
17.6k
    return fmt::to_string(debug_string_buffer);
476
17.6k
}
477
478
17.6k
std::string DataSinkOperatorXBase::debug_string(RuntimeState* state, int indentation_level) const {
479
17.6k
    return state->get_sink_local_state()->debug_string(indentation_level);
480
17.6k
}
481
482
334k
Status DataSinkOperatorXBase::init(const TDataSink& tsink) {
483
334k
    std::string op_name = "UNKNOWN_SINK";
484
334k
    auto it = _TDataSinkType_VALUES_TO_NAMES.find(tsink.type);
485
486
335k
    if (it != _TDataSinkType_VALUES_TO_NAMES.end()) {
487
335k
        op_name = it->second;
488
335k
    }
489
334k
    _name = op_name + "_OPERATOR";
490
334k
    return Status::OK();
491
334k
}
492
493
284k
Status DataSinkOperatorXBase::init(const TPlanNode& tnode, RuntimeState* state) {
494
284k
    std::string op_name = print_plan_node_type(tnode.node_type);
495
284k
    _nereids_id = tnode.nereids_id;
496
284k
    auto substr = op_name.substr(0, op_name.find("_NODE"));
497
284k
    _name = substr + "_SINK_OPERATOR";
498
284k
    return Status::OK();
499
284k
}
500
501
template <typename LocalStateType>
502
Status DataSinkOperatorX<LocalStateType>::setup_local_state(RuntimeState* state,
503
1.59M
                                                            LocalSinkStateInfo& info) {
504
1.59M
    auto local_state = LocalStateType::create_unique(this, state);
505
1.59M
    RETURN_IF_ERROR(local_state->init(state, info));
506
1.59M
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
1.59M
    return Status::OK();
508
1.59M
}
_ZN5doris17DataSinkOperatorXINS_27HashJoinBuildSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
116k
                                                            LocalSinkStateInfo& info) {
504
116k
    auto local_state = LocalStateType::create_unique(this, state);
505
116k
    RETURN_IF_ERROR(local_state->init(state, info));
506
116k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
116k
    return Status::OK();
508
116k
}
_ZN5doris17DataSinkOperatorXINS_20ResultSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
338k
                                                            LocalSinkStateInfo& info) {
504
338k
    auto local_state = LocalStateType::create_unique(this, state);
505
338k
    RETURN_IF_ERROR(local_state->init(state, info));
506
338k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
338k
    return Status::OK();
508
338k
}
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
352
                                                            LocalSinkStateInfo& info) {
504
352
    auto local_state = LocalStateType::create_unique(this, state);
505
352
    RETURN_IF_ERROR(local_state->init(state, info));
506
352
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
352
    return Status::OK();
508
352
}
_ZN5doris17DataSinkOperatorXINS_23OlapTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
47.8k
                                                            LocalSinkStateInfo& info) {
504
47.8k
    auto local_state = LocalStateType::create_unique(this, state);
505
47.8k
    RETURN_IF_ERROR(local_state->init(state, info));
506
47.8k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
47.8k
    return Status::OK();
508
47.8k
}
_ZN5doris17DataSinkOperatorXINS_25OlapTableSinkV2LocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
18
                                                            LocalSinkStateInfo& info) {
504
18
    auto local_state = LocalStateType::create_unique(this, state);
505
18
    RETURN_IF_ERROR(local_state->init(state, info));
506
18
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
18
    return Status::OK();
508
18
}
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
8.05k
                                                            LocalSinkStateInfo& info) {
504
8.05k
    auto local_state = LocalStateType::create_unique(this, state);
505
8.05k
    RETURN_IF_ERROR(local_state->init(state, info));
506
8.05k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
8.05k
    return Status::OK();
508
8.05k
}
_ZN5doris17DataSinkOperatorXINS_23BlackholeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
45
                                                            LocalSinkStateInfo& info) {
504
45
    auto local_state = LocalStateType::create_unique(this, state);
505
45
    RETURN_IF_ERROR(local_state->init(state, info));
506
45
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
45
    return Status::OK();
508
45
}
_ZN5doris17DataSinkOperatorXINS_18SortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
218k
                                                            LocalSinkStateInfo& info) {
504
218k
    auto local_state = LocalStateType::create_unique(this, state);
505
218k
    RETURN_IF_ERROR(local_state->init(state, info));
506
218k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
218k
    return Status::OK();
508
218k
}
_ZN5doris17DataSinkOperatorXINS_23SpillSortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
34
                                                            LocalSinkStateInfo& info) {
504
34
    auto local_state = LocalStateType::create_unique(this, state);
505
34
    RETURN_IF_ERROR(local_state->init(state, info));
506
34
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
34
    return Status::OK();
508
34
}
_ZN5doris17DataSinkOperatorXINS_27LocalExchangeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
201k
                                                            LocalSinkStateInfo& info) {
504
201k
    auto local_state = LocalStateType::create_unique(this, state);
505
201k
    RETURN_IF_ERROR(local_state->init(state, info));
506
201k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
201k
    return Status::OK();
508
201k
}
_ZN5doris17DataSinkOperatorXINS_17AggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
86.3k
                                                            LocalSinkStateInfo& info) {
504
86.3k
    auto local_state = LocalStateType::create_unique(this, state);
505
86.3k
    RETURN_IF_ERROR(local_state->init(state, info));
506
86.3k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
86.3k
    return Status::OK();
508
86.3k
}
_ZN5doris17DataSinkOperatorXINS_25BucketedAggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
57.7k
                                                            LocalSinkStateInfo& info) {
504
57.7k
    auto local_state = LocalStateType::create_unique(this, state);
505
57.7k
    RETURN_IF_ERROR(local_state->init(state, info));
506
57.7k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
57.7k
    return Status::OK();
508
57.7k
}
_ZN5doris17DataSinkOperatorXINS_28PartitionedAggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
124
                                                            LocalSinkStateInfo& info) {
504
124
    auto local_state = LocalStateType::create_unique(this, state);
505
124
    RETURN_IF_ERROR(local_state->init(state, info));
506
124
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
124
    return Status::OK();
508
124
}
_ZN5doris17DataSinkOperatorXINS_22ExchangeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
482k
                                                            LocalSinkStateInfo& info) {
504
482k
    auto local_state = LocalStateType::create_unique(this, state);
505
482k
    RETURN_IF_ERROR(local_state->init(state, info));
506
482k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
482k
    return Status::OK();
508
482k
}
_ZN5doris17DataSinkOperatorXINS_33NestedLoopJoinBuildSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
6.15k
                                                            LocalSinkStateInfo& info) {
504
6.15k
    auto local_state = LocalStateType::create_unique(this, state);
505
6.15k
    RETURN_IF_ERROR(local_state->init(state, info));
506
6.15k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
6.15k
    return Status::OK();
508
6.15k
}
_ZN5doris17DataSinkOperatorXINS_19UnionSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
11.3k
                                                            LocalSinkStateInfo& info) {
504
11.3k
    auto local_state = LocalStateType::create_unique(this, state);
505
11.3k
    RETURN_IF_ERROR(local_state->init(state, info));
506
11.3k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
11.3k
    return Status::OK();
508
11.3k
}
_ZN5doris17DataSinkOperatorXINS_33MultiCastDataStreamSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
1.87k
                                                            LocalSinkStateInfo& info) {
504
1.87k
    auto local_state = LocalStateType::create_unique(this, state);
505
1.87k
    RETURN_IF_ERROR(local_state->init(state, info));
506
1.87k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
1.87k
    return Status::OK();
508
1.87k
}
_ZN5doris17DataSinkOperatorXINS_27PartitionSortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
707
                                                            LocalSinkStateInfo& info) {
504
707
    auto local_state = LocalStateType::create_unique(this, state);
505
707
    RETURN_IF_ERROR(local_state->init(state, info));
506
707
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
707
    return Status::OK();
508
707
}
_ZN5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
4.76k
                                                            LocalSinkStateInfo& info) {
504
4.76k
    auto local_state = LocalStateType::create_unique(this, state);
505
4.76k
    RETURN_IF_ERROR(local_state->init(state, info));
506
4.76k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
4.76k
    return Status::OK();
508
4.76k
}
_ZN5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
2.51k
                                                            LocalSinkStateInfo& info) {
504
2.51k
    auto local_state = LocalStateType::create_unique(this, state);
505
2.51k
    RETURN_IF_ERROR(local_state->init(state, info));
506
2.51k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
2.51k
    return Status::OK();
508
2.51k
}
_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.44k
                                                            LocalSinkStateInfo& info) {
504
2.44k
    auto local_state = LocalStateType::create_unique(this, state);
505
2.44k
    RETURN_IF_ERROR(local_state->init(state, info));
506
2.44k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
2.44k
    return Status::OK();
508
2.44k
}
_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
563
                                                            LocalSinkStateInfo& info) {
504
563
    auto local_state = LocalStateType::create_unique(this, state);
505
563
    RETURN_IF_ERROR(local_state->init(state, info));
506
563
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
563
    return Status::OK();
508
563
}
_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.29M
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.29M
    } else {
519
1.29M
        auto ss = LocalStateType::SharedStateType::create_shared();
520
1.29M
        ss->id = operator_id();
521
1.29M
        for (auto& dest : dests_id()) {
522
1.29M
            ss->related_op_ids.insert(dest);
523
1.29M
        }
524
1.29M
        return ss;
525
1.29M
    }
526
1.29M
}
_ZNK5doris17DataSinkOperatorXINS_27HashJoinBuildSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
101k
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
101k
    } else {
519
101k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
101k
        ss->id = operator_id();
521
101k
        for (auto& dest : dests_id()) {
522
101k
            ss->related_op_ids.insert(dest);
523
101k
        }
524
101k
        return ss;
525
101k
    }
526
101k
}
_ZNK5doris17DataSinkOperatorXINS_20ResultSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
338k
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
338k
    } else {
519
338k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
338k
        ss->id = operator_id();
521
338k
        for (auto& dest : dests_id()) {
522
336k
            ss->related_op_ids.insert(dest);
523
336k
        }
524
338k
        return ss;
525
338k
    }
526
338k
}
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
352
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
352
    } else {
519
352
        auto ss = LocalStateType::SharedStateType::create_shared();
520
352
        ss->id = operator_id();
521
352
        for (auto& dest : dests_id()) {
522
351
            ss->related_op_ids.insert(dest);
523
351
        }
524
352
        return ss;
525
352
    }
526
352
}
_ZNK5doris17DataSinkOperatorXINS_23OlapTableSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
48.0k
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
48.0k
    } else {
519
48.0k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
48.0k
        ss->id = operator_id();
521
48.0k
        for (auto& dest : dests_id()) {
522
47.6k
            ss->related_op_ids.insert(dest);
523
47.6k
        }
524
48.0k
        return ss;
525
48.0k
    }
526
48.0k
}
_ZNK5doris17DataSinkOperatorXINS_25OlapTableSinkV2LocalStateEE19create_shared_stateEv
Line
Count
Source
511
18
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
18
    } else {
519
18
        auto ss = LocalStateType::SharedStateType::create_shared();
520
18
        ss->id = operator_id();
521
18
        for (auto& dest : dests_id()) {
522
18
            ss->related_op_ids.insert(dest);
523
18
        }
524
18
        return ss;
525
18
    }
526
18
}
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
8.09k
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
8.09k
    } else {
519
8.09k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
8.09k
        ss->id = operator_id();
521
8.09k
        for (auto& dest : dests_id()) {
522
8.09k
            ss->related_op_ids.insert(dest);
523
8.09k
        }
524
8.09k
        return ss;
525
8.09k
    }
526
8.09k
}
_ZNK5doris17DataSinkOperatorXINS_23BlackholeSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
45
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
    } else {
519
45
        auto ss = LocalStateType::SharedStateType::create_shared();
520
45
        ss->id = operator_id();
521
45
        for (auto& dest : dests_id()) {
522
45
            ss->related_op_ids.insert(dest);
523
45
        }
524
45
        return ss;
525
45
    }
526
45
}
_ZNK5doris17DataSinkOperatorXINS_18SortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
218k
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
218k
    } else {
519
218k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
218k
        ss->id = operator_id();
521
218k
        for (auto& dest : dests_id()) {
522
218k
            ss->related_op_ids.insert(dest);
523
218k
        }
524
218k
        return ss;
525
218k
    }
526
218k
}
_ZNK5doris17DataSinkOperatorXINS_23SpillSortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
36
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
36
    } else {
519
36
        auto ss = LocalStateType::SharedStateType::create_shared();
520
36
        ss->id = operator_id();
521
36
        for (auto& dest : dests_id()) {
522
36
            ss->related_op_ids.insert(dest);
523
36
        }
524
36
        return ss;
525
36
    }
526
36
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_27LocalExchangeSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_17AggSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
86.5k
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
86.5k
    } else {
519
86.5k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
86.5k
        ss->id = operator_id();
521
86.5k
        for (auto& dest : dests_id()) {
522
86.5k
            ss->related_op_ids.insert(dest);
523
86.5k
        }
524
86.5k
        return ss;
525
86.5k
    }
526
86.5k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_25BucketedAggSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_28PartitionedAggSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
123
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
123
    } else {
519
123
        auto ss = LocalStateType::SharedStateType::create_shared();
520
123
        ss->id = operator_id();
521
123
        for (auto& dest : dests_id()) {
522
123
            ss->related_op_ids.insert(dest);
523
123
        }
524
123
        return ss;
525
123
    }
526
123
}
_ZNK5doris17DataSinkOperatorXINS_22ExchangeSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
482k
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
482k
    } else {
519
482k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
482k
        ss->id = operator_id();
521
482k
        for (auto& dest : dests_id()) {
522
481k
            ss->related_op_ids.insert(dest);
523
481k
        }
524
482k
        return ss;
525
482k
    }
526
482k
}
_ZNK5doris17DataSinkOperatorXINS_33NestedLoopJoinBuildSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
6.15k
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.15k
    } else {
519
6.15k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
6.15k
        ss->id = operator_id();
521
6.15k
        for (auto& dest : dests_id()) {
522
6.15k
            ss->related_op_ids.insert(dest);
523
6.15k
        }
524
6.15k
        return ss;
525
6.15k
    }
526
6.15k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_19UnionSinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_33MultiCastDataStreamSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_27PartitionSortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
811
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
811
    } else {
519
811
        auto ss = LocalStateType::SharedStateType::create_shared();
520
811
        ss->id = operator_id();
521
813
        for (auto& dest : dests_id()) {
522
813
            ss->related_op_ids.insert(dest);
523
813
        }
524
811
        return ss;
525
811
    }
526
811
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb1EEEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb0EEEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb1EEEE19create_shared_stateEv
Line
Count
Source
511
2.60k
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.60k
    } else {
519
2.60k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
2.60k
        ss->id = operator_id();
521
2.60k
        for (auto& dest : dests_id()) {
522
2.60k
            ss->related_op_ids.insert(dest);
523
2.60k
        }
524
2.60k
        return ss;
525
2.60k
    }
526
2.60k
}
_ZNK5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb0EEEE19create_shared_stateEv
Line
Count
Source
511
2.44k
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.44k
    } else {
519
2.44k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
2.44k
        ss->id = operator_id();
521
2.44k
        for (auto& dest : dests_id()) {
522
2.44k
            ss->related_op_ids.insert(dest);
523
2.44k
        }
524
2.44k
        return ss;
525
2.44k
    }
526
2.44k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_33PartitionedHashJoinSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_30GroupCommitBlockSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
562
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
562
    } else {
519
562
        auto ss = LocalStateType::SharedStateType::create_shared();
520
562
        ss->id = operator_id();
521
562
        for (auto& dest : dests_id()) {
522
558
            ss->related_op_ids.insert(dest);
523
558
        }
524
562
        return ss;
525
562
    }
526
562
}
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
106
            ss->related_op_ids.insert(dest);
523
106
        }
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
1.86M
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
1.86M
    auto local_state = LocalStateType::create_unique(state, this);
531
1.86M
    RETURN_IF_ERROR(local_state->init(state, info));
532
1.86M
    state->emplace_local_state(operator_id(), std::move(local_state));
533
1.86M
    return Status::OK();
534
1.86M
}
_ZN5doris9OperatorXINS_23HashJoinProbeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
68.6k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
68.6k
    auto local_state = LocalStateType::create_unique(state, this);
531
68.6k
    RETURN_IF_ERROR(local_state->init(state, info));
532
68.6k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
68.6k
    return Status::OK();
534
68.6k
}
_ZN5doris9OperatorXINS_18OlapScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
234k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
234k
    auto local_state = LocalStateType::create_unique(state, this);
531
234k
    RETURN_IF_ERROR(local_state->init(state, info));
532
234k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
234k
    return Status::OK();
534
234k
}
_ZN5doris9OperatorXINS_21GroupCommitLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
127
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
127
    auto local_state = LocalStateType::create_unique(state, this);
531
127
    RETURN_IF_ERROR(local_state->init(state, info));
532
127
    state->emplace_local_state(operator_id(), std::move(local_state));
533
127
    return Status::OK();
534
127
}
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
8.06k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
8.06k
    auto local_state = LocalStateType::create_unique(state, this);
531
8.06k
    RETURN_IF_ERROR(local_state->init(state, info));
532
8.06k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
8.06k
    return Status::OK();
534
8.06k
}
_ZN5doris9OperatorXINS_14SortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
7.93k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
7.93k
    auto local_state = LocalStateType::create_unique(state, this);
531
7.93k
    RETURN_IF_ERROR(local_state->init(state, info));
532
7.93k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
7.93k
    return Status::OK();
534
7.93k
}
_ZN5doris9OperatorXINS_19SpillSortLocalStateEE17setup_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_24LocalMergeSortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
209k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
209k
    auto local_state = LocalStateType::create_unique(state, this);
531
209k
    RETURN_IF_ERROR(local_state->init(state, info));
532
209k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
209k
    return Status::OK();
534
209k
}
_ZN5doris9OperatorXINS_13AggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
86.1k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
86.1k
    auto local_state = LocalStateType::create_unique(state, this);
531
86.1k
    RETURN_IF_ERROR(local_state->init(state, info));
532
86.1k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
86.1k
    return Status::OK();
534
86.1k
}
_ZN5doris9OperatorXINS_21BucketedAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
57.9k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
57.9k
    auto local_state = LocalStateType::create_unique(state, this);
531
57.9k
    RETURN_IF_ERROR(local_state->init(state, info));
532
57.9k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
57.9k
    return Status::OK();
534
57.9k
}
_ZN5doris9OperatorXINS_24PartitionedAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
114
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
114
    auto local_state = LocalStateType::create_unique(state, this);
531
114
    RETURN_IF_ERROR(local_state->init(state, info));
532
114
    state->emplace_local_state(operator_id(), std::move(local_state));
533
114
    return Status::OK();
534
114
}
_ZN5doris9OperatorXINS_23TableFunctionLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
5.06k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
5.06k
    auto local_state = LocalStateType::create_unique(state, this);
531
5.06k
    RETURN_IF_ERROR(local_state->init(state, info));
532
5.06k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
5.06k
    return Status::OK();
534
5.06k
}
_ZN5doris9OperatorXINS_18ExchangeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
265k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
265k
    auto local_state = LocalStateType::create_unique(state, this);
531
265k
    RETURN_IF_ERROR(local_state->init(state, info));
532
265k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
265k
    return Status::OK();
534
265k
}
_ZN5doris9OperatorXINS_16RepeatLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
1.38k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
1.38k
    auto local_state = LocalStateType::create_unique(state, this);
531
1.38k
    RETURN_IF_ERROR(local_state->init(state, info));
532
1.38k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
1.38k
    return Status::OK();
534
1.38k
}
_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
54.7k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
54.7k
    auto local_state = LocalStateType::create_unique(state, this);
531
54.7k
    RETURN_IF_ERROR(local_state->init(state, info));
532
54.7k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
54.7k
    return Status::OK();
534
54.7k
}
_ZN5doris9OperatorXINS_35MultiCastDataStreamSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
4.81k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
4.81k
    auto local_state = LocalStateType::create_unique(state, this);
531
4.81k
    RETURN_IF_ERROR(local_state->init(state, info));
532
4.81k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
4.81k
    return Status::OK();
534
4.81k
}
_ZN5doris9OperatorXINS_29PartitionSortSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
698
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
698
    auto local_state = LocalStateType::create_unique(state, this);
531
698
    RETURN_IF_ERROR(local_state->init(state, info));
532
698
    state->emplace_local_state(operator_id(), std::move(local_state));
533
698
    return Status::OK();
534
698
}
_ZN5doris9OperatorXINS_19SetSourceLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
2.57k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
2.57k
    auto local_state = LocalStateType::create_unique(state, this);
531
2.57k
    RETURN_IF_ERROR(local_state->init(state, info));
532
2.57k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
2.57k
    return Status::OK();
534
2.57k
}
_ZN5doris9OperatorXINS_19SetSourceLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
2.43k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
2.43k
    auto local_state = LocalStateType::create_unique(state, this);
531
2.43k
    RETURN_IF_ERROR(local_state->init(state, info));
532
2.43k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
2.43k
    return Status::OK();
534
2.43k
}
_ZN5doris9OperatorXINS_17DataGenLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
317
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
317
    auto local_state = LocalStateType::create_unique(state, this);
531
317
    RETURN_IF_ERROR(local_state->init(state, info));
532
317
    state->emplace_local_state(operator_id(), std::move(local_state));
533
317
    return Status::OK();
534
317
}
_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.3k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
10.3k
    auto local_state = LocalStateType::create_unique(state, this);
531
10.3k
    RETURN_IF_ERROR(local_state->init(state, info));
532
10.3k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
10.3k
    return Status::OK();
534
10.3k
}
_ZN5doris9OperatorXINS_29LocalExchangeSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
564k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
564k
    auto local_state = LocalStateType::create_unique(state, this);
531
564k
    RETURN_IF_ERROR(local_state->init(state, info));
532
564k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
564k
    return Status::OK();
534
564k
}
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.20k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
2.20k
    auto local_state = LocalStateType::create_unique(state, this);
531
2.20k
    RETURN_IF_ERROR(local_state->init(state, info));
532
2.20k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
2.20k
    return Status::OK();
534
2.20k
}
_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
1.00k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
1.00k
    auto local_state = LocalStateType::create_unique(state, this);
531
1.00k
    RETURN_IF_ERROR(local_state->init(state, info));
532
1.00k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
1.00k
    return Status::OK();
534
1.00k
}
_ZN5doris9OperatorXINS_22StreamingAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
6.26k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
6.26k
    auto local_state = LocalStateType::create_unique(state, this);
531
6.26k
    RETURN_IF_ERROR(local_state->init(state, info));
532
6.26k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
6.26k
    return Status::OK();
534
6.26k
}
_ZN5doris9OperatorXINS_30DistinctStreamingAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
259k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
259k
    auto local_state = LocalStateType::create_unique(state, this);
531
259k
    RETURN_IF_ERROR(local_state->init(state, info));
532
259k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
259k
    return Status::OK();
534
259k
}
535
536
PipelineXSinkLocalStateBase::PipelineXSinkLocalStateBase(DataSinkOperatorXBase* parent,
537
                                                         RuntimeState* state)
538
1.58M
        : _parent(parent), _state(state) {}
539
540
PipelineXLocalStateBase::PipelineXLocalStateBase(RuntimeState* state, OperatorXBase* parent)
541
1.85M
        : _num_rows_returned(0),
542
1.85M
          _rows_returned_counter(nullptr),
543
1.85M
          _parent(parent),
544
1.85M
          _state(state),
545
1.85M
          _budget(state->batch_size(), state->preferred_block_size_bytes()) {}
546
547
template <typename SharedStateArg>
548
1.86M
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
1.86M
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
1.86M
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
1.86M
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
1.86M
    _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.86M
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
1.86M
    _operator_profile->add_child(_common_profile.get(), true);
557
1.86M
    _operator_profile->add_child(_custom_profile.get(), true);
558
1.86M
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
1.86M
    if constexpr (!is_fake_shared) {
560
1.07M
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
632k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
632k
                                    .first.get()
563
632k
                                    ->template cast<SharedStateArg>();
564
565
632k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
632k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
632k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
632k
        } else if (info.shared_state) {
569
381k
            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
381k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
381k
            _dependency = _shared_state->create_source_dependency(
576
381k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
381k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
381k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
381k
        } else {
580
64.7k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
7.91k
                DCHECK(false);
582
7.91k
            }
583
64.7k
        }
584
1.07M
    }
585
586
1.86M
    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.86M
    _rows_returned_counter =
591
1.86M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
1.86M
    _blocks_returned_counter =
593
1.86M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
1.86M
    _output_block_bytes_counter =
595
1.86M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
1.86M
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
1.86M
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
1.86M
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
1.86M
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
1.86M
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
1.86M
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
1.86M
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
1.86M
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
1.86M
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
1.86M
    _memory_used_counter =
606
1.86M
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
1.86M
    _common_profile->add_info_string("IsColocate",
608
1.86M
                                     std::to_string(_parent->is_colocated_operator()));
609
1.86M
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
1.86M
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
1.86M
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
1.86M
    return Status::OK();
613
1.86M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
68.8k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
68.8k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
68.8k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
68.8k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
68.8k
    _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.8k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
68.8k
    _operator_profile->add_child(_common_profile.get(), true);
557
68.8k
    _operator_profile->add_child(_custom_profile.get(), true);
558
68.8k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
68.8k
    if constexpr (!is_fake_shared) {
560
68.8k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
15.2k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
15.2k
                                    .first.get()
563
15.2k
                                    ->template cast<SharedStateArg>();
564
565
15.2k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
15.2k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
15.2k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
53.5k
        } 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
52.9k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
52.9k
            _dependency = _shared_state->create_source_dependency(
576
52.9k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
52.9k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
52.9k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
52.9k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
644
        }
584
68.8k
    }
585
586
68.8k
    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.8k
    _rows_returned_counter =
591
68.8k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
68.8k
    _blocks_returned_counter =
593
68.8k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
68.8k
    _output_block_bytes_counter =
595
68.8k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
68.8k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
68.8k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
68.8k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
68.8k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
68.8k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
68.8k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
68.8k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
68.8k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
68.8k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
68.8k
    _memory_used_counter =
606
68.8k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
68.8k
    _common_profile->add_info_string("IsColocate",
608
68.8k
                                     std::to_string(_parent->is_colocated_operator()));
609
68.8k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
68.8k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
68.8k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
68.8k
    return Status::OK();
613
68.8k
}
_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
218k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
218k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
218k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
218k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
218k
    _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
218k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
218k
    _operator_profile->add_child(_common_profile.get(), true);
557
218k
    _operator_profile->add_child(_custom_profile.get(), true);
558
218k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
218k
    if constexpr (!is_fake_shared) {
560
218k
        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
218k
        } 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
213k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
213k
            _dependency = _shared_state->create_source_dependency(
576
213k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
213k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
213k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
213k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
4.59k
        }
584
218k
    }
585
586
218k
    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
218k
    _rows_returned_counter =
591
218k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
218k
    _blocks_returned_counter =
593
218k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
218k
    _output_block_bytes_counter =
595
218k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
218k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
218k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
218k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
218k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
218k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
218k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
218k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
218k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
218k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
218k
    _memory_used_counter =
606
218k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
218k
    _common_profile->add_info_string("IsColocate",
608
218k
                                     std::to_string(_parent->is_colocated_operator()));
609
218k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
218k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
218k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
218k
    return Status::OK();
613
218k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
27
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
27
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
27
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
27
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
27
    _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
27
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
27
    _operator_profile->add_child(_common_profile.get(), true);
557
27
    _operator_profile->add_child(_custom_profile.get(), true);
558
27
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
27
    if constexpr (!is_fake_shared) {
560
27
        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
27
        } 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
27
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
27
            _dependency = _shared_state->create_source_dependency(
576
27
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
27
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
27
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
27
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
0
        }
584
27
    }
585
586
27
    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
27
    _rows_returned_counter =
591
27
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
27
    _blocks_returned_counter =
593
27
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
27
    _output_block_bytes_counter =
595
27
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
27
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
27
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
27
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
27
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
27
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
27
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
27
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
27
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
27
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
27
    _memory_used_counter =
606
27
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
27
    _common_profile->add_info_string("IsColocate",
608
27
                                     std::to_string(_parent->is_colocated_operator()));
609
27
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
27
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
27
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
27
    return Status::OK();
613
27
}
_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.13k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
6.13k
            _dependency = _shared_state->create_source_dependency(
576
6.13k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
6.13k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
6.13k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
6.13k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
21
        }
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
8.08k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
8.08k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
8.08k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
8.08k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
8.08k
    _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
8.08k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
8.08k
    _operator_profile->add_child(_common_profile.get(), true);
557
8.08k
    _operator_profile->add_child(_custom_profile.get(), true);
558
8.08k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
8.08k
    if constexpr (!is_fake_shared) {
560
8.08k
        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
8.08k
        } 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
8.06k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
8.06k
            _dependency = _shared_state->create_source_dependency(
576
8.06k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
8.06k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
8.06k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
8.06k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
22
        }
584
8.08k
    }
585
586
8.08k
    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
8.08k
    _rows_returned_counter =
591
8.08k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
8.08k
    _blocks_returned_counter =
593
8.08k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
8.08k
    _output_block_bytes_counter =
595
8.08k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
8.08k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
8.08k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
8.08k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
8.08k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
8.08k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
8.08k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
8.08k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
8.08k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
8.08k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
8.08k
    _memory_used_counter =
606
8.08k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
8.08k
    _common_profile->add_info_string("IsColocate",
608
8.08k
                                     std::to_string(_parent->is_colocated_operator()));
609
8.08k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
8.08k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
8.08k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
8.08k
    return Status::OK();
613
8.08k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
86.4k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
86.4k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
86.4k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
86.4k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
86.4k
    _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
86.4k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
86.4k
    _operator_profile->add_child(_common_profile.get(), true);
557
86.4k
    _operator_profile->add_child(_custom_profile.get(), true);
558
86.4k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
86.4k
    if constexpr (!is_fake_shared) {
560
86.4k
        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
86.4k
        } 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
85.1k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
85.1k
            _dependency = _shared_state->create_source_dependency(
576
85.1k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
85.1k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
85.1k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
85.1k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
1.30k
        }
584
86.4k
    }
585
586
86.4k
    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
86.4k
    _rows_returned_counter =
591
86.4k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
86.4k
    _blocks_returned_counter =
593
86.4k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
86.4k
    _output_block_bytes_counter =
595
86.4k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
86.4k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
86.4k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
86.4k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
86.4k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
86.4k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
86.4k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
86.4k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
86.4k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
86.4k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
86.4k
    _memory_used_counter =
606
86.4k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
86.4k
    _common_profile->add_info_string("IsColocate",
608
86.4k
                                     std::to_string(_parent->is_colocated_operator()));
609
86.4k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
86.4k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
86.4k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
86.4k
    return Status::OK();
613
86.4k
}
_ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
57.9k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
57.9k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
57.9k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
57.9k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
57.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
57.9k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
57.9k
    _operator_profile->add_child(_common_profile.get(), true);
557
57.9k
    _operator_profile->add_child(_custom_profile.get(), true);
558
57.9k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
57.9k
    if constexpr (!is_fake_shared) {
560
57.9k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
57.9k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
57.9k
                                    .first.get()
563
57.9k
                                    ->template cast<SharedStateArg>();
564
565
57.9k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
57.9k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
57.9k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
57.9k
        } 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
13
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
13
        }
584
57.9k
    }
585
586
57.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
57.9k
    _rows_returned_counter =
591
57.9k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
57.9k
    _blocks_returned_counter =
593
57.9k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
57.9k
    _output_block_bytes_counter =
595
57.9k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
57.9k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
57.9k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
57.9k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
57.9k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
57.9k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
57.9k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
57.9k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
57.9k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
57.9k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
57.9k
    _memory_used_counter =
606
57.9k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
57.9k
    _common_profile->add_info_string("IsColocate",
608
57.9k
                                     std::to_string(_parent->is_colocated_operator()));
609
57.9k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
57.9k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
57.9k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
57.9k
    return Status::OK();
613
57.9k
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
114
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
114
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
114
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
114
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
114
    _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
114
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
114
    _operator_profile->add_child(_common_profile.get(), true);
557
114
    _operator_profile->add_child(_custom_profile.get(), true);
558
114
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
114
    if constexpr (!is_fake_shared) {
560
114
        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
114
        } 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
114
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
114
            _dependency = _shared_state->create_source_dependency(
576
114
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
114
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
114
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
114
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
0
        }
584
114
    }
585
586
114
    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
114
    _rows_returned_counter =
591
114
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
114
    _blocks_returned_counter =
593
114
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
114
    _output_block_bytes_counter =
595
114
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
114
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
114
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
114
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
114
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
114
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
114
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
114
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
114
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
114
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
114
    _memory_used_counter =
606
114
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
114
    _common_profile->add_info_string("IsColocate",
608
114
                                     std::to_string(_parent->is_colocated_operator()));
609
114
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
114
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
114
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
114
    return Status::OK();
613
114
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
790k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
790k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
790k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
790k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
790k
    _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
790k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
790k
    _operator_profile->add_child(_common_profile.get(), true);
557
790k
    _operator_profile->add_child(_custom_profile.get(), true);
558
790k
    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
790k
    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
790k
    _rows_returned_counter =
591
790k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
790k
    _blocks_returned_counter =
593
790k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
790k
    _output_block_bytes_counter =
595
790k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
790k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
790k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
790k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
790k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
790k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
790k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
790k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
790k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
790k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
790k
    _memory_used_counter =
606
790k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
790k
    _common_profile->add_info_string("IsColocate",
608
790k
                                     std::to_string(_parent->is_colocated_operator()));
609
790k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
790k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
790k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
790k
    return Status::OK();
613
790k
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
54.7k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
54.7k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
54.7k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
54.7k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
54.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
54.7k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
54.7k
    _operator_profile->add_child(_common_profile.get(), true);
557
54.7k
    _operator_profile->add_child(_custom_profile.get(), true);
558
54.7k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
54.7k
    if constexpr (!is_fake_shared) {
560
54.7k
        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
54.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
4.77k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
4.77k
            _dependency = _shared_state->create_source_dependency(
576
4.77k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
4.77k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
4.77k
                    _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
54.7k
    }
585
586
54.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
54.7k
    _rows_returned_counter =
591
54.7k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
54.7k
    _blocks_returned_counter =
593
54.7k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
54.7k
    _output_block_bytes_counter =
595
54.7k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
54.7k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
54.7k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
54.7k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
54.7k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
54.7k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
54.7k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
54.7k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
54.7k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
54.7k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
54.7k
    _memory_used_counter =
606
54.7k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
54.7k
    _common_profile->add_info_string("IsColocate",
608
54.7k
                                     std::to_string(_parent->is_colocated_operator()));
609
54.7k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
54.7k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
54.7k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
54.7k
    return Status::OK();
613
54.7k
}
_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.81k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
4.81k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
4.81k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
4.81k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
4.81k
    _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.81k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
4.81k
    _operator_profile->add_child(_common_profile.get(), true);
557
4.81k
    _operator_profile->add_child(_custom_profile.get(), true);
558
4.81k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
4.81k
    if constexpr (!is_fake_shared) {
560
4.81k
        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.81k
        } 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.81k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
4.81k
            _dependency = _shared_state->create_source_dependency(
576
4.81k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
4.81k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
4.81k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
4.81k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
4
        }
584
4.81k
    }
585
586
4.81k
    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.81k
    _rows_returned_counter =
591
4.81k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
4.81k
    _blocks_returned_counter =
593
4.81k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
4.81k
    _output_block_bytes_counter =
595
4.81k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
4.81k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
4.81k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
4.81k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
4.81k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
4.81k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
4.81k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
4.81k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
4.81k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
4.81k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
4.81k
    _memory_used_counter =
606
4.81k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
4.81k
    _common_profile->add_info_string("IsColocate",
608
4.81k
                                     std::to_string(_parent->is_colocated_operator()));
609
4.81k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
4.81k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
4.81k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
4.81k
    return Status::OK();
613
4.81k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
810
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
810
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
810
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
810
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
810
    _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
810
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
810
    _operator_profile->add_child(_common_profile.get(), true);
557
810
    _operator_profile->add_child(_custom_profile.get(), true);
558
810
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
810
    if constexpr (!is_fake_shared) {
560
810
        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
810
        } 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
804
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
804
            _dependency = _shared_state->create_source_dependency(
576
804
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
804
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
804
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
804
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
6
        }
584
810
    }
585
586
810
    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
810
    _rows_returned_counter =
591
810
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
810
    _blocks_returned_counter =
593
810
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
810
    _output_block_bytes_counter =
595
810
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
810
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
810
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
810
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
810
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
810
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
810
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
810
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
810
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
810
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
810
    _memory_used_counter =
606
810
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
810
    _common_profile->add_info_string("IsColocate",
608
810
                                     std::to_string(_parent->is_colocated_operator()));
609
810
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
810
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
810
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
810
    return Status::OK();
613
810
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
5.04k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
5.04k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
5.04k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
5.04k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
5.04k
    _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.04k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
5.04k
    _operator_profile->add_child(_common_profile.get(), true);
557
5.04k
    _operator_profile->add_child(_custom_profile.get(), true);
558
5.04k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
5.04k
    if constexpr (!is_fake_shared) {
560
5.04k
        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.04k
        } 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.77k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
4.77k
            _dependency = _shared_state->create_source_dependency(
576
4.77k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
4.77k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
4.77k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
4.77k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
272
        }
584
5.04k
    }
585
586
5.04k
    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.04k
    _rows_returned_counter =
591
5.04k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
5.04k
    _blocks_returned_counter =
593
5.04k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
5.04k
    _output_block_bytes_counter =
595
5.04k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
5.04k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
5.04k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
5.04k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
5.04k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
5.04k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
5.04k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
5.04k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
5.04k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
5.04k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
5.04k
    _memory_used_counter =
606
5.04k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
5.04k
    _common_profile->add_info_string("IsColocate",
608
5.04k
                                     std::to_string(_parent->is_colocated_operator()));
609
5.04k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
5.04k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
5.04k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
5.04k
    return Status::OK();
613
5.04k
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
567k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
567k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
567k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
567k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
567k
    _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
567k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
567k
    _operator_profile->add_child(_common_profile.get(), true);
557
567k
    _operator_profile->add_child(_custom_profile.get(), true);
558
567k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
567k
    if constexpr (!is_fake_shared) {
560
567k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
559k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
559k
                                    .first.get()
563
559k
                                    ->template cast<SharedStateArg>();
564
565
559k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
559k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
559k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
559k
        } 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.91k
        } else {
580
7.91k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
7.91k
                DCHECK(false);
582
7.91k
            }
583
7.91k
        }
584
567k
    }
585
586
567k
    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
567k
    _rows_returned_counter =
591
567k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
567k
    _blocks_returned_counter =
593
567k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
567k
    _output_block_bytes_counter =
595
567k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
567k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
567k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
567k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
567k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
567k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
567k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
567k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
567k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
567k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
567k
    _memory_used_counter =
606
567k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
567k
    _common_profile->add_info_string("IsColocate",
608
567k
                                     std::to_string(_parent->is_colocated_operator()));
609
567k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
567k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
567k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
567k
    return Status::OK();
613
567k
}
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
1.87M
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
1.87M
    _conjuncts.resize(_parent->_conjuncts.size());
618
2.18M
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
303k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
303k
    }
621
1.87M
    if (_parent->has_projection()) {
622
372k
        const auto& projection = *_parent->_projection;
623
372k
        _projections.resize(projection.projections.size());
624
2.32M
        for (size_t i = 0; i < _projections.size(); i++) {
625
1.94M
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
1.94M
        }
627
372k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
385k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
13.6k
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
199k
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
186k
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
186k
                        state, _intermediate_projections[i][j]));
633
186k
            }
634
13.6k
        }
635
372k
    }
636
1.87M
    return Status::OK();
637
1.87M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
68.9k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
68.9k
    _conjuncts.resize(_parent->_conjuncts.size());
618
70.2k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
1.25k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
1.25k
    }
621
68.9k
    if (_parent->has_projection()) {
622
68.9k
        const auto& projection = *_parent->_projection;
623
68.9k
        _projections.resize(projection.projections.size());
624
361k
        for (size_t i = 0; i < _projections.size(); i++) {
625
292k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
292k
        }
627
68.9k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
75.8k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
6.90k
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
153k
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
146k
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
146k
                        state, _intermediate_projections[i][j]));
633
146k
            }
634
6.90k
        }
635
68.9k
    }
636
68.9k
    return Status::OK();
637
68.9k
}
_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
219k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
219k
    _conjuncts.resize(_parent->_conjuncts.size());
618
219k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
219k
    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
219k
    return Status::OK();
637
219k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
27
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
27
    _conjuncts.resize(_parent->_conjuncts.size());
618
27
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
27
    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
27
    return Status::OK();
637
27
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
6.14k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
6.14k
    _conjuncts.resize(_parent->_conjuncts.size());
618
6.20k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
62
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
62
    }
621
6.14k
    if (_parent->has_projection()) {
622
6.14k
        const auto& projection = *_parent->_projection;
623
6.14k
        _projections.resize(projection.projections.size());
624
26.9k
        for (size_t i = 0; i < _projections.size(); i++) {
625
20.8k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
20.8k
        }
627
6.14k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
6.18k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
33
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
228
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
195
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
195
                        state, _intermediate_projections[i][j]));
633
195
            }
634
33
        }
635
6.14k
    }
636
6.14k
    return Status::OK();
637
6.14k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
8.10k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
8.10k
    _conjuncts.resize(_parent->_conjuncts.size());
618
9.17k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
1.07k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
1.07k
    }
621
8.10k
    if (_parent->has_projection()) {
622
4.78k
        const auto& projection = *_parent->_projection;
623
4.78k
        _projections.resize(projection.projections.size());
624
19.0k
        for (size_t i = 0; i < _projections.size(); i++) {
625
14.2k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
14.2k
        }
627
4.78k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
4.87k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
93
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
702
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
609
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
609
                        state, _intermediate_projections[i][j]));
633
609
            }
634
93
        }
635
4.78k
    }
636
8.10k
    return Status::OK();
637
8.10k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
86.6k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
86.6k
    _conjuncts.resize(_parent->_conjuncts.size());
618
88.3k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
1.71k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
1.71k
    }
621
86.6k
    if (_parent->has_projection()) {
622
29.5k
        const auto& projection = *_parent->_projection;
623
29.5k
        _projections.resize(projection.projections.size());
624
272k
        for (size_t i = 0; i < _projections.size(); i++) {
625
243k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
243k
        }
627
29.5k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
29.7k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
171
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
1.29k
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
1.12k
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
1.12k
                        state, _intermediate_projections[i][j]));
633
1.12k
            }
634
171
        }
635
29.5k
    }
636
86.6k
    return Status::OK();
637
86.6k
}
_ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
58.0k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
58.0k
    _conjuncts.resize(_parent->_conjuncts.size());
618
58.0k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
33
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
33
    }
621
58.0k
    if (_parent->has_projection()) {
622
142
        const auto& projection = *_parent->_projection;
623
142
        _projections.resize(projection.projections.size());
624
546
        for (size_t i = 0; i < _projections.size(); i++) {
625
404
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
404
        }
627
142
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
142
        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
142
    }
636
58.0k
    return Status::OK();
637
58.0k
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
118
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
118
    _conjuncts.resize(_parent->_conjuncts.size());
618
118
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
118
    if (_parent->has_projection()) {
622
92
        const auto& projection = *_parent->_projection;
623
92
        _projections.resize(projection.projections.size());
624
276
        for (size_t i = 0; i < _projections.size(); i++) {
625
184
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
184
        }
627
92
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
92
        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
92
    }
636
118
    return Status::OK();
637
118
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
797k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
797k
    _conjuncts.resize(_parent->_conjuncts.size());
618
1.09M
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
298k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
298k
    }
621
797k
    if (_parent->has_projection()) {
622
250k
        const auto& projection = *_parent->_projection;
623
250k
        _projections.resize(projection.projections.size());
624
1.52M
        for (size_t i = 0; i < _projections.size(); i++) {
625
1.27M
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
1.27M
        }
627
250k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
256k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
6.20k
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
38.9k
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
32.7k
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
32.7k
                        state, _intermediate_projections[i][j]));
633
32.7k
            }
634
6.20k
        }
635
250k
    }
636
797k
    return Status::OK();
637
797k
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
54.9k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
54.9k
    _conjuncts.resize(_parent->_conjuncts.size());
618
54.9k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
54.9k
    if (_parent->has_projection()) {
622
11.6k
        const auto& projection = *_parent->_projection;
623
11.6k
        _projections.resize(projection.projections.size());
624
111k
        for (size_t i = 0; i < _projections.size(); i++) {
625
100k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
100k
        }
627
11.6k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
11.8k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
237
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
5.59k
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
5.35k
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
5.35k
                        state, _intermediate_projections[i][j]));
633
5.35k
            }
634
237
        }
635
11.6k
    }
636
54.9k
    return Status::OK();
637
54.9k
}
_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.81k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
4.81k
    _conjuncts.resize(_parent->_conjuncts.size());
618
5.48k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
672
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
672
    }
621
4.81k
    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.81k
    return Status::OK();
637
4.81k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
813
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
813
    _conjuncts.resize(_parent->_conjuncts.size());
618
813
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
813
    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
813
    return Status::OK();
637
813
}
_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
569k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
569k
    _conjuncts.resize(_parent->_conjuncts.size());
618
569k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
569k
    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
569k
    return Status::OK();
637
569k
}
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.60k
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
7.60k
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
7.60k
    _terminated = true;
645
7.60k
    return Status::OK();
646
7.60k
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
334
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
334
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
334
    _terminated = true;
645
334
    return Status::OK();
646
334
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
14
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
14
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
14
    _terminated = true;
645
14
    return Status::OK();
646
14
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
37
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
37
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
37
    _terminated = true;
645
37
    return Status::OK();
646
37
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
10
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
10
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
10
    _terminated = true;
645
10
    return Status::OK();
646
10
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
134
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
134
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
134
    _terminated = true;
645
134
    return Status::OK();
646
134
}
_ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE9terminateEPNS_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
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
5.78k
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
5.78k
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
5.78k
    _terminated = true;
645
5.78k
    return Status::OK();
646
5.78k
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE9terminateEPNS_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
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
8
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
8
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
8
    _terminated = true;
645
8
    return Status::OK();
646
8
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
270
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
270
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
270
    _terminated = true;
645
270
    return Status::OK();
646
270
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
950
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
950
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
950
    _terminated = true;
645
950
    return Status::OK();
646
950
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
33
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
33
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
33
    _terminated = true;
645
33
    return Status::OK();
646
33
}
647
648
template <typename SharedStateArg>
649
2.12M
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
2.12M
    if (_closed) {
651
249k
        return Status::OK();
652
249k
    }
653
1.87M
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
1.08M
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
1.08M
    }
656
1.87M
    _closed = true;
657
1.87M
    return Status::OK();
658
2.12M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
68.8k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
68.8k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
68.8k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
68.8k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
68.8k
    }
656
68.8k
    _closed = true;
657
68.8k
    return Status::OK();
658
68.8k
}
_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
434k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
434k
    if (_closed) {
651
218k
        return Status::OK();
652
218k
    }
653
216k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
216k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
216k
    }
656
216k
    _closed = true;
657
216k
    return Status::OK();
658
434k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
27
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
27
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
27
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
27
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
27
    }
656
27
    _closed = true;
657
27
    return Status::OK();
658
27
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
6.14k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
6.14k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
6.14k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
6.14k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
6.14k
    }
656
6.14k
    _closed = true;
657
6.14k
    return Status::OK();
658
6.14k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
16.3k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
16.3k
    if (_closed) {
651
8.26k
        return Status::OK();
652
8.26k
    }
653
8.08k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
8.08k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
8.08k
    }
656
8.08k
    _closed = true;
657
8.08k
    return Status::OK();
658
16.3k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
86.5k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
86.5k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
86.5k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
86.5k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
86.5k
    }
656
86.5k
    _closed = true;
657
86.5k
    return Status::OK();
658
86.5k
}
_ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
57.6k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
57.6k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
57.6k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
57.6k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
57.6k
    }
656
57.6k
    _closed = true;
657
57.6k
    return Status::OK();
658
57.6k
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
113
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
113
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
113
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
113
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
113
    }
656
113
    _closed = true;
657
113
    return Status::OK();
658
113
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
814k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
814k
    if (_closed) {
651
16.4k
        return Status::OK();
652
16.4k
    }
653
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
    }
656
797k
    _closed = true;
657
797k
    return Status::OK();
658
814k
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
54.9k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
54.9k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
54.9k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
54.9k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
54.9k
    }
656
54.9k
    _closed = true;
657
54.9k
    return Status::OK();
658
54.9k
}
_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.77k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
4.77k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
4.77k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
4.77k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
4.77k
    }
656
4.77k
    _closed = true;
657
4.77k
    return Status::OK();
658
4.77k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
1.41k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
1.41k
    if (_closed) {
651
711
        return Status::OK();
652
711
    }
653
705
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
705
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
705
    }
656
705
    _closed = true;
657
705
    return Status::OK();
658
1.41k
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
10.4k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
10.4k
    if (_closed) {
651
5.37k
        return Status::OK();
652
5.37k
    }
653
5.11k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
5.11k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
5.11k
    }
656
5.11k
    _closed = true;
657
5.11k
    return Status::OK();
658
10.4k
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
571k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
571k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
571k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
571k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
571k
    }
656
571k
    _closed = true;
657
571k
    return Status::OK();
658
571k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE5closeEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
335
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
335
    if (_closed) {
651
175
        return Status::OK();
652
175
    }
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
335
}
659
660
template <typename SharedState>
661
1.59M
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
1.59M
    _operator_profile =
664
1.59M
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
1.59M
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
1.59M
    _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.59M
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
1.59M
    _operator_profile->add_child(_common_profile, true);
673
1.59M
    _operator_profile->add_child(_custom_profile, true);
674
675
1.59M
    _operator_profile->set_metadata(_parent->node_id());
676
1.59M
    _wait_for_finish_dependency_timer =
677
1.59M
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
1.59M
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
1.59M
    if constexpr (!is_fake_shared) {
680
1.10M
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
1.10M
            info.shared_state_map.end()) {
682
274k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
201k
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
201k
            }
685
274k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
274k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
274k
                                                  ? 0
688
274k
                                                  : info.task_idx]
689
274k
                                  .get();
690
274k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
834k
        } else {
692
18.4E
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
18.4E
                DCHECK(false);
694
18.4E
            }
695
834k
            _shared_state = info.shared_state->template cast<SharedState>();
696
834k
            _dependency = _shared_state->create_sink_dependency(
697
834k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
834k
        }
699
1.10M
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
1.10M
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
1.10M
    }
702
703
1.59M
    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.59M
    _rows_input_counter =
708
1.59M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
1.59M
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
1.59M
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
1.59M
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
1.59M
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
1.59M
    _memory_used_counter =
714
1.59M
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
1.59M
    _common_profile->add_info_string("IsColocate",
716
1.59M
                                     std::to_string(_parent->is_colocated_operator()));
717
1.59M
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
1.59M
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
1.59M
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
1.59M
    return Status::OK();
721
1.59M
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
116k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
116k
    _operator_profile =
664
116k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
116k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
116k
    _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
116k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
116k
    _operator_profile->add_child(_common_profile, true);
673
116k
    _operator_profile->add_child(_custom_profile, true);
674
675
116k
    _operator_profile->set_metadata(_parent->node_id());
676
116k
    _wait_for_finish_dependency_timer =
677
116k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
116k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
116k
    if constexpr (!is_fake_shared) {
680
116k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
116k
            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
15.4k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
15.4k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
15.4k
                                                  ? 0
688
15.4k
                                                  : info.task_idx]
689
15.4k
                                  .get();
690
15.4k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
101k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
101k
            _shared_state = info.shared_state->template cast<SharedState>();
696
101k
            _dependency = _shared_state->create_sink_dependency(
697
101k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
101k
        }
699
116k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
116k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
116k
    }
702
703
116k
    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
116k
    _rows_input_counter =
708
116k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
116k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
116k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
116k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
116k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
116k
    _memory_used_counter =
714
116k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
116k
    _common_profile->add_info_string("IsColocate",
716
116k
                                     std::to_string(_parent->is_colocated_operator()));
717
116k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
116k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
116k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
116k
    return Status::OK();
721
116k
}
_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
218k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
218k
    _operator_profile =
664
218k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
218k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
218k
    _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
218k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
218k
    _operator_profile->add_child(_common_profile, true);
673
218k
    _operator_profile->add_child(_custom_profile, true);
674
675
218k
    _operator_profile->set_metadata(_parent->node_id());
676
218k
    _wait_for_finish_dependency_timer =
677
218k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
218k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
218k
    if constexpr (!is_fake_shared) {
680
218k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
218k
            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
218k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
218k
            _shared_state = info.shared_state->template cast<SharedState>();
696
218k
            _dependency = _shared_state->create_sink_dependency(
697
218k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
218k
        }
699
218k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
218k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
218k
    }
702
703
218k
    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
218k
    _rows_input_counter =
708
218k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
218k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
218k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
218k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
218k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
218k
    _memory_used_counter =
714
218k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
218k
    _common_profile->add_info_string("IsColocate",
716
218k
                                     std::to_string(_parent->is_colocated_operator()));
717
218k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
218k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
218k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
218k
    return Status::OK();
721
218k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
34
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
34
    _operator_profile =
664
34
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
34
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
34
    _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
34
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
34
    _operator_profile->add_child(_common_profile, true);
673
34
    _operator_profile->add_child(_custom_profile, true);
674
675
34
    _operator_profile->set_metadata(_parent->node_id());
676
34
    _wait_for_finish_dependency_timer =
677
34
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
34
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
34
    if constexpr (!is_fake_shared) {
680
34
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
34
            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
34
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
34
            _shared_state = info.shared_state->template cast<SharedState>();
696
34
            _dependency = _shared_state->create_sink_dependency(
697
34
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
34
        }
699
34
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
34
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
34
    }
702
703
34
    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
34
    _rows_input_counter =
708
34
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
34
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
34
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
34
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
34
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
34
    _memory_used_counter =
714
34
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
34
    _common_profile->add_info_string("IsColocate",
716
34
                                     std::to_string(_parent->is_colocated_operator()));
717
34
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
34
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
34
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
34
    return Status::OK();
721
34
}
_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
8.08k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
8.08k
    _operator_profile =
664
8.08k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
8.08k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
8.08k
    _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
8.08k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
8.08k
    _operator_profile->add_child(_common_profile, true);
673
8.08k
    _operator_profile->add_child(_custom_profile, true);
674
675
8.08k
    _operator_profile->set_metadata(_parent->node_id());
676
8.08k
    _wait_for_finish_dependency_timer =
677
8.08k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
8.08k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
8.08k
    if constexpr (!is_fake_shared) {
680
8.08k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
8.08k
            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
8.08k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
8.08k
            _shared_state = info.shared_state->template cast<SharedState>();
696
8.08k
            _dependency = _shared_state->create_sink_dependency(
697
8.08k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
8.08k
        }
699
8.08k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
8.08k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
8.08k
    }
702
703
8.08k
    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
8.08k
    _rows_input_counter =
708
8.08k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
8.08k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
8.08k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
8.08k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
8.08k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
8.08k
    _memory_used_counter =
714
8.08k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
8.08k
    _common_profile->add_info_string("IsColocate",
716
8.08k
                                     std::to_string(_parent->is_colocated_operator()));
717
8.08k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
8.08k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
8.08k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
8.08k
    return Status::OK();
721
8.08k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
86.5k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
86.5k
    _operator_profile =
664
86.5k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
86.5k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
86.5k
    _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
86.5k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
86.5k
    _operator_profile->add_child(_common_profile, true);
673
86.5k
    _operator_profile->add_child(_custom_profile, true);
674
675
86.5k
    _operator_profile->set_metadata(_parent->node_id());
676
86.5k
    _wait_for_finish_dependency_timer =
677
86.5k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
86.5k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
86.5k
    if constexpr (!is_fake_shared) {
680
86.5k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
86.5k
            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
86.5k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
86.5k
            _shared_state = info.shared_state->template cast<SharedState>();
696
86.5k
            _dependency = _shared_state->create_sink_dependency(
697
86.5k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
86.5k
        }
699
86.5k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
86.5k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
86.5k
    }
702
703
86.5k
    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
86.5k
    _rows_input_counter =
708
86.5k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
86.5k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
86.5k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
86.5k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
86.5k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
86.5k
    _memory_used_counter =
714
86.5k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
86.5k
    _common_profile->add_info_string("IsColocate",
716
86.5k
                                     std::to_string(_parent->is_colocated_operator()));
717
86.5k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
86.5k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
86.5k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
86.5k
    return Status::OK();
721
86.5k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
57.8k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
57.8k
    _operator_profile =
664
57.8k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
57.8k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
57.8k
    _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
57.8k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
57.8k
    _operator_profile->add_child(_common_profile, true);
673
57.8k
    _operator_profile->add_child(_custom_profile, true);
674
675
57.8k
    _operator_profile->set_metadata(_parent->node_id());
676
57.8k
    _wait_for_finish_dependency_timer =
677
57.8k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
57.8k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
57.8k
    if constexpr (!is_fake_shared) {
680
57.8k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
57.9k
            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
57.9k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
57.9k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
57.9k
                                                  ? 0
688
57.9k
                                                  : info.task_idx]
689
57.9k
                                  .get();
690
57.9k
            _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
57.8k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
57.8k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
57.8k
    }
702
703
57.8k
    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
57.8k
    _rows_input_counter =
708
57.8k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
57.8k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
57.8k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
57.8k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
57.8k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
57.8k
    _memory_used_counter =
714
57.8k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
57.8k
    _common_profile->add_info_string("IsColocate",
716
57.8k
                                     std::to_string(_parent->is_colocated_operator()));
717
57.8k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
57.8k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
57.8k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
57.8k
    return Status::OK();
721
57.8k
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
124
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
124
    _operator_profile =
664
124
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
124
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
124
    _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
124
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
124
    _operator_profile->add_child(_common_profile, true);
673
124
    _operator_profile->add_child(_custom_profile, true);
674
675
124
    _operator_profile->set_metadata(_parent->node_id());
676
124
    _wait_for_finish_dependency_timer =
677
124
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
124
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
124
    if constexpr (!is_fake_shared) {
680
124
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
124
            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
124
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
124
            _shared_state = info.shared_state->template cast<SharedState>();
696
124
            _dependency = _shared_state->create_sink_dependency(
697
124
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
124
        }
699
124
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
124
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
124
    }
702
703
124
    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
124
    _rows_input_counter =
708
124
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
124
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
124
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
124
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
124
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
124
    _memory_used_counter =
714
124
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
124
    _common_profile->add_info_string("IsColocate",
716
124
                                     std::to_string(_parent->is_colocated_operator()));
717
124
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
124
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
124
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
124
    return Status::OK();
721
124
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE4initEPNS_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
    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
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_16UnionSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
11.3k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
11.3k
    _operator_profile =
664
11.3k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
11.3k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
11.3k
    _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
11.3k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
11.3k
    _operator_profile->add_child(_common_profile, true);
673
11.3k
    _operator_profile->add_child(_custom_profile, true);
674
675
11.3k
    _operator_profile->set_metadata(_parent->node_id());
676
11.3k
    _wait_for_finish_dependency_timer =
677
11.3k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
11.3k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
11.3k
    if constexpr (!is_fake_shared) {
680
11.3k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
11.3k
            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
11.3k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
11.3k
            _shared_state = info.shared_state->template cast<SharedState>();
696
11.3k
            _dependency = _shared_state->create_sink_dependency(
697
11.3k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
11.3k
        }
699
11.3k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
11.3k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
11.3k
    }
702
703
11.3k
    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
11.3k
    _rows_input_counter =
708
11.3k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
11.3k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
11.3k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
11.3k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
11.3k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
11.3k
    _memory_used_counter =
714
11.3k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
11.3k
    _common_profile->add_info_string("IsColocate",
716
11.3k
                                     std::to_string(_parent->is_colocated_operator()));
717
11.3k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
11.3k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
11.3k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
11.3k
    return Status::OK();
721
11.3k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
811
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
811
    _operator_profile =
664
811
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
811
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
811
    _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
811
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
811
    _operator_profile->add_child(_common_profile, true);
673
811
    _operator_profile->add_child(_custom_profile, true);
674
675
811
    _operator_profile->set_metadata(_parent->node_id());
676
811
    _wait_for_finish_dependency_timer =
677
811
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
811
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
811
    if constexpr (!is_fake_shared) {
680
811
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
811
            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
811
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
811
            _shared_state = info.shared_state->template cast<SharedState>();
696
811
            _dependency = _shared_state->create_sink_dependency(
697
811
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
811
        }
699
811
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
811
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
811
    }
702
703
814
    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
811
    _rows_input_counter =
708
811
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
811
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
811
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
811
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
811
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
811
    _memory_used_counter =
714
811
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
811
    _common_profile->add_info_string("IsColocate",
716
811
                                     std::to_string(_parent->is_colocated_operator()));
717
811
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
811
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
811
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
811
    return Status::OK();
721
811
}
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
1.87k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
1.87k
    _operator_profile =
664
1.87k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
1.87k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
1.87k
    _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.87k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
1.87k
    _operator_profile->add_child(_common_profile, true);
673
1.87k
    _operator_profile->add_child(_custom_profile, true);
674
675
1.87k
    _operator_profile->set_metadata(_parent->node_id());
676
1.87k
    _wait_for_finish_dependency_timer =
677
1.87k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
1.87k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
1.87k
    if constexpr (!is_fake_shared) {
680
1.87k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
1.87k
            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.87k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
1.87k
            _shared_state = info.shared_state->template cast<SharedState>();
696
1.87k
            _dependency = _shared_state->create_sink_dependency(
697
1.87k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
1.87k
        }
699
1.87k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
1.87k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
1.87k
    }
702
703
1.87k
    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.87k
    _rows_input_counter =
708
1.87k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
1.87k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
1.87k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
1.87k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
1.87k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
1.87k
    _memory_used_counter =
714
1.87k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
1.87k
    _common_profile->add_info_string("IsColocate",
716
1.87k
                                     std::to_string(_parent->is_colocated_operator()));
717
1.87k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
1.87k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
1.87k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
1.87k
    return Status::OK();
721
1.87k
}
_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
201k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
201k
    _operator_profile =
664
201k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
201k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
201k
    _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
201k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
201k
    _operator_profile->add_child(_common_profile, true);
673
201k
    _operator_profile->add_child(_custom_profile, true);
674
675
201k
    _operator_profile->set_metadata(_parent->node_id());
676
201k
    _wait_for_finish_dependency_timer =
677
201k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
201k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
201k
    if constexpr (!is_fake_shared) {
680
201k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
201k
            info.shared_state_map.end()) {
682
201k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
201k
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
201k
            }
685
201k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
201k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
201k
                                                  ? 0
688
201k
                                                  : info.task_idx]
689
201k
                                  .get();
690
201k
            _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
201k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
201k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
201k
    }
702
703
201k
    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
201k
    _rows_input_counter =
708
201k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
201k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
201k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
201k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
201k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
201k
    _memory_used_counter =
714
201k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
201k
    _common_profile->add_info_string("IsColocate",
716
201k
                                     std::to_string(_parent->is_colocated_operator()));
717
201k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
201k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
201k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
201k
    return Status::OK();
721
201k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
387k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
387k
    _operator_profile =
664
387k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
387k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
387k
    _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
387k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
387k
    _operator_profile->add_child(_common_profile, true);
673
387k
    _operator_profile->add_child(_custom_profile, true);
674
675
387k
    _operator_profile->set_metadata(_parent->node_id());
676
387k
    _wait_for_finish_dependency_timer =
677
387k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
387k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
387k
    if constexpr (!is_fake_shared) {
680
387k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
387k
            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
387k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
387k
            _shared_state = info.shared_state->template cast<SharedState>();
696
387k
            _dependency = _shared_state->create_sink_dependency(
697
387k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
387k
        }
699
387k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
387k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
387k
    }
702
703
387k
    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
387k
    _rows_input_counter =
708
387k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
387k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
387k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
387k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
387k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
387k
    _memory_used_counter =
714
387k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
387k
    _common_profile->add_info_string("IsColocate",
716
387k
                                     std::to_string(_parent->is_colocated_operator()));
717
387k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
387k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
387k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
387k
    return Status::OK();
721
387k
}
_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.59M
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
1.59M
    if (_closed) {
726
2
        return Status::OK();
727
2
    }
728
1.59M
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
1.11M
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
1.11M
    }
731
1.59M
    _closed = true;
732
1.59M
    return Status::OK();
733
1.59M
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
116k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
116k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
116k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
116k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
116k
    }
731
116k
    _closed = true;
732
116k
    return Status::OK();
733
116k
}
_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
217k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
217k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
217k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
217k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
217k
    }
731
217k
    _closed = true;
732
217k
    return Status::OK();
733
217k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
25
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
25
    if (_closed) {
726
2
        return Status::OK();
727
2
    }
728
23
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
23
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
23
    }
731
23
    _closed = true;
732
23
    return Status::OK();
733
25
}
_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
8.08k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
8.08k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
8.08k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
8.08k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
8.08k
    }
731
8.08k
    _closed = true;
732
8.08k
    return Status::OK();
733
8.08k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
86.3k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
86.3k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
86.3k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
86.3k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
86.3k
    }
731
86.3k
    _closed = true;
732
86.3k
    return Status::OK();
733
86.3k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
57.7k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
57.7k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
57.7k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
57.7k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
57.7k
    }
731
57.7k
    _closed = true;
732
57.7k
    return Status::OK();
733
57.7k
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
113
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
113
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
113
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
113
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
113
    }
731
113
    _closed = true;
732
113
    return Status::OK();
733
113
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
486k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
486k
    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
486k
    _closed = true;
732
486k
    return Status::OK();
733
486k
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
11.3k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
11.3k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
11.3k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
11.3k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
11.3k
    }
731
11.3k
    _closed = true;
732
11.3k
    return Status::OK();
733
11.3k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
710
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
710
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
710
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
710
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
710
    }
731
710
    _closed = true;
732
710
    return Status::OK();
733
710
}
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
1.87k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
1.87k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
1.87k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
1.87k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
1.87k
    }
731
1.87k
    _closed = true;
732
1.87k
    return Status::OK();
733
1.87k
}
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
12.4k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
12.4k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
12.4k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
12.4k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
12.4k
    }
731
12.4k
    _closed = true;
732
12.4k
    return Status::OK();
733
12.4k
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
202k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
202k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
202k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
202k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
202k
    }
731
202k
    _closed = true;
732
202k
    return Status::OK();
733
202k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
389k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
389k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
389k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
389k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
389k
    }
731
389k
    _closed = true;
732
389k
    return Status::OK();
733
389k
}
_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
7.16k
                                                          bool* eos) {
738
7.16k
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
739
7.16k
    return pull(state, block, eos);
740
7.16k
}
_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
7.12k
                                                          bool* eos) {
738
7.12k
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
739
7.12k
    return pull(state, block, eos);
740
7.12k
}
741
742
template <typename LocalStateType>
743
Status StatefulOperatorX<LocalStateType>::get_block_impl(RuntimeState* state, Block* block,
744
492k
                                                         bool* eos) {
745
492k
    auto& local_state = get_local_state(state);
746
492k
    if (need_more_input_data(state)) {
747
462k
        local_state._child_block->clear_column_data(
748
462k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
462k
                        .num_materialized_slots());
750
462k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
462k
                state, local_state._child_block.get(), &local_state._child_eos));
752
462k
        *eos = local_state._child_eos;
753
462k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
61.5k
            return Status::OK();
755
61.5k
        }
756
401k
        {
757
401k
            SCOPED_TIMER(local_state.exec_time_counter());
758
401k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
401k
        }
760
401k
    }
761
762
431k
    if (!need_more_input_data(state)) {
763
405k
        SCOPED_TIMER(local_state.exec_time_counter());
764
405k
        bool new_eos = false;
765
405k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
405k
        if (new_eos) {
767
324k
            *eos = true;
768
324k
        } else if (!need_more_input_data(state)) {
769
23.2k
            *eos = false;
770
23.2k
        }
771
405k
    }
772
431k
    return Status::OK();
773
431k
}
_ZN5doris17StatefulOperatorXINS_23HashJoinProbeLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
141k
                                                         bool* eos) {
745
141k
    auto& local_state = get_local_state(state);
746
141k
    if (need_more_input_data(state)) {
747
124k
        local_state._child_block->clear_column_data(
748
124k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
124k
                        .num_materialized_slots());
750
124k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
124k
                state, local_state._child_block.get(), &local_state._child_eos));
752
124k
        *eos = local_state._child_eos;
753
124k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
36.3k
            return Status::OK();
755
36.3k
        }
756
88.2k
        {
757
88.2k
            SCOPED_TIMER(local_state.exec_time_counter());
758
88.2k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
88.2k
        }
760
88.2k
    }
761
762
105k
    if (!need_more_input_data(state)) {
763
105k
        SCOPED_TIMER(local_state.exec_time_counter());
764
105k
        bool new_eos = false;
765
105k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
105k
        if (new_eos) {
767
44.6k
            *eos = true;
768
60.6k
        } else if (!need_more_input_data(state)) {
769
9.33k
            *eos = false;
770
9.33k
        }
771
105k
    }
772
105k
    return Status::OK();
773
105k
}
Unexecuted instantiation: _ZN5doris17StatefulOperatorXINS_34PartitionedHashJoinProbeLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
_ZN5doris17StatefulOperatorXINS_16RepeatLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
4.03k
                                                         bool* eos) {
745
4.03k
    auto& local_state = get_local_state(state);
746
4.03k
    if (need_more_input_data(state)) {
747
2.16k
        local_state._child_block->clear_column_data(
748
2.16k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
2.16k
                        .num_materialized_slots());
750
2.16k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
2.16k
                state, local_state._child_block.get(), &local_state._child_eos));
752
2.16k
        *eos = local_state._child_eos;
753
2.16k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
309
            return Status::OK();
755
309
        }
756
1.85k
        {
757
1.85k
            SCOPED_TIMER(local_state.exec_time_counter());
758
1.85k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
1.85k
        }
760
1.85k
    }
761
762
3.75k
    if (!need_more_input_data(state)) {
763
3.75k
        SCOPED_TIMER(local_state.exec_time_counter());
764
3.75k
        bool new_eos = false;
765
3.75k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
3.75k
        if (new_eos) {
767
1.37k
            *eos = true;
768
2.37k
        } else if (!need_more_input_data(state)) {
769
1.86k
            *eos = false;
770
1.86k
        }
771
3.75k
    }
772
3.72k
    return Status::OK();
773
3.72k
}
_ZN5doris17StatefulOperatorXINS_25MaterializationLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
1.84k
                                                         bool* eos) {
745
1.84k
    auto& local_state = get_local_state(state);
746
1.84k
    if (need_more_input_data(state)) {
747
1.84k
        local_state._child_block->clear_column_data(
748
1.84k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
1.84k
                        .num_materialized_slots());
750
1.84k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
1.84k
                state, local_state._child_block.get(), &local_state._child_eos));
752
1.84k
        *eos = local_state._child_eos;
753
1.84k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
777
            return Status::OK();
755
777
        }
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
17.7k
                                                         bool* eos) {
745
17.7k
    auto& local_state = get_local_state(state);
746
17.7k
    if (need_more_input_data(state)) {
747
17.7k
        local_state._child_block->clear_column_data(
748
17.7k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
17.7k
                        .num_materialized_slots());
750
17.7k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
17.7k
                state, local_state._child_block.get(), &local_state._child_eos));
752
17.7k
        *eos = local_state._child_eos;
753
17.7k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
3.91k
            return Status::OK();
755
3.91k
        }
756
13.8k
        {
757
13.8k
            SCOPED_TIMER(local_state.exec_time_counter());
758
13.8k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
13.8k
        }
760
13.8k
    }
761
762
13.8k
    if (!need_more_input_data(state)) {
763
6.28k
        SCOPED_TIMER(local_state.exec_time_counter());
764
6.28k
        bool new_eos = false;
765
6.28k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
6.28k
        if (new_eos) {
767
6.20k
            *eos = true;
768
6.20k
        } else if (!need_more_input_data(state)) {
769
6
            *eos = false;
770
6
        }
771
6.28k
    }
772
13.8k
    return Status::OK();
773
13.8k
}
_ZN5doris17StatefulOperatorXINS_30DistinctStreamingAggLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
297k
                                                         bool* eos) {
745
297k
    auto& local_state = get_local_state(state);
746
298k
    if (need_more_input_data(state)) {
747
298k
        local_state._child_block->clear_column_data(
748
298k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
298k
                        .num_materialized_slots());
750
298k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
298k
                state, local_state._child_block.get(), &local_state._child_eos));
752
298k
        *eos = local_state._child_eos;
753
298k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
18.8k
            return Status::OK();
755
18.8k
        }
756
279k
        {
757
279k
            SCOPED_TIMER(local_state.exec_time_counter());
758
279k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
279k
        }
760
279k
    }
761
762
278k
    if (!need_more_input_data(state)) {
763
261k
        SCOPED_TIMER(local_state.exec_time_counter());
764
261k
        bool new_eos = false;
765
261k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
261k
        if (new_eos) {
767
260k
            *eos = true;
768
260k
        } else if (!need_more_input_data(state)) {
769
0
            *eos = false;
770
0
        }
771
261k
    }
772
278k
    return Status::OK();
773
278k
}
_ZN5doris17StatefulOperatorXINS_29NestedLoopJoinProbeLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
22.4k
                                                         bool* eos) {
745
22.4k
    auto& local_state = get_local_state(state);
746
22.4k
    if (need_more_input_data(state)) {
747
10.7k
        local_state._child_block->clear_column_data(
748
10.7k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
10.7k
                        .num_materialized_slots());
750
10.7k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
10.7k
                state, local_state._child_block.get(), &local_state._child_eos));
752
10.7k
        *eos = local_state._child_eos;
753
10.7k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
774
            return Status::OK();
755
774
        }
756
9.95k
        {
757
9.95k
            SCOPED_TIMER(local_state.exec_time_counter());
758
9.95k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
9.95k
        }
760
9.95k
    }
761
762
21.6k
    if (!need_more_input_data(state)) {
763
21.0k
        SCOPED_TIMER(local_state.exec_time_counter());
764
21.0k
        bool new_eos = false;
765
21.0k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
21.0k
        if (new_eos) {
767
6.11k
            *eos = true;
768
14.9k
        } else if (!need_more_input_data(state)) {
769
11.7k
            *eos = false;
770
11.7k
        }
771
21.0k
    }
772
21.6k
    return Status::OK();
773
21.6k
}
_ZN5doris17StatefulOperatorXINS_23TableFunctionLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
7.63k
                                                         bool* eos) {
745
7.63k
    auto& local_state = get_local_state(state);
746
7.63k
    if (need_more_input_data(state)) {
747
7.26k
        local_state._child_block->clear_column_data(
748
7.26k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
7.26k
                        .num_materialized_slots());
750
7.26k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
7.26k
                state, local_state._child_block.get(), &local_state._child_eos));
752
7.26k
        *eos = local_state._child_eos;
753
7.26k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
571
            return Status::OK();
755
571
        }
756
6.69k
        {
757
6.69k
            SCOPED_TIMER(local_state.exec_time_counter());
758
6.69k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
6.69k
        }
760
6.69k
    }
761
762
7.05k
    if (!need_more_input_data(state)) {
763
7.05k
        SCOPED_TIMER(local_state.exec_time_counter());
764
7.05k
        bool new_eos = false;
765
7.05k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
7.05k
        if (new_eos) {
767
5.02k
            *eos = true;
768
5.02k
        } else if (!need_more_input_data(state)) {
769
366
            *eos = false;
770
366
        }
771
7.05k
    }
772
7.05k
    return Status::OK();
773
7.05k
}
774
775
template <typename Writer, typename Parent>
776
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
777
47.4k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
778
47.4k
    RETURN_IF_ERROR(Base::init(state, info));
779
47.4k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
780
47.4k
                                                         "AsyncWriterDependency", true);
781
47.4k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
782
47.4k
                             _finish_dependency));
783
784
47.4k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
785
47.4k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
786
47.4k
    return Status::OK();
787
47.4k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
777
352
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
778
352
    RETURN_IF_ERROR(Base::init(state, info));
779
352
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
780
352
                                                         "AsyncWriterDependency", true);
781
352
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
782
352
                             _finish_dependency));
783
784
352
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
785
352
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
786
352
    return Status::OK();
787
352
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
777
47.0k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
778
47.0k
    RETURN_IF_ERROR(Base::init(state, info));
779
47.0k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
780
47.0k
                                                         "AsyncWriterDependency", true);
781
47.0k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
782
47.0k
                             _finish_dependency));
783
784
47.0k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
785
47.0k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
786
47.0k
    return Status::OK();
787
47.0k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
777
18
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
778
18
    RETURN_IF_ERROR(Base::init(state, info));
779
18
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
780
18
                                                         "AsyncWriterDependency", true);
781
18
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
782
18
                             _finish_dependency));
783
784
18
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
785
18
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
786
18
    return Status::OK();
787
18
}
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
48.6k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
792
48.6k
    RETURN_IF_ERROR(Base::open(state));
793
48.6k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
794
384k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
795
335k
        RETURN_IF_ERROR(
796
335k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
797
335k
    }
798
48.6k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
799
48.6k
    return Status::OK();
800
48.6k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
791
352
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
792
352
    RETURN_IF_ERROR(Base::open(state));
793
352
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
794
1.83k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
795
1.48k
        RETURN_IF_ERROR(
796
1.48k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
797
1.48k
    }
798
352
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
799
352
    return Status::OK();
800
352
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4openEPNS_12RuntimeStateE
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
791
48.2k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
792
48.2k
    RETURN_IF_ERROR(Base::open(state));
793
48.2k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
794
382k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
795
334k
        RETURN_IF_ERROR(
796
334k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
797
334k
    }
798
48.2k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
799
48.2k
    return Status::OK();
800
48.2k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
791
18
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
792
18
    RETURN_IF_ERROR(Base::open(state));
793
18
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
794
324
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
795
306
        RETURN_IF_ERROR(
796
306
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
797
306
    }
798
18
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
799
18
    return Status::OK();
800
18
}
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
64.1k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
805
64.1k
    return _writer->sink(block, eos);
806
64.1k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
804
1.59k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
805
1.59k
    return _writer->sink(block, eos);
806
1.59k
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
804
62.5k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
805
62.5k
    return _writer->sink(block, eos);
806
62.5k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
804
18
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
805
18
    return _writer->sink(block, eos);
806
18
}
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
48.7k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
811
48.7k
    if (_closed) {
812
0
        return Status::OK();
813
0
    }
814
48.7k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
815
48.7k
    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
48.7k
    if (_writer) {
818
48.7k
        Status st = _writer->get_writer_status();
819
48.7k
        if (exec_status.ok()) {
820
48.7k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
821
48.7k
                                                       : Status::Cancelled("force close"));
822
48.7k
        } else {
823
45
            _writer->force_close(exec_status);
824
45
        }
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
48.7k
        RETURN_IF_ERROR(st);
829
48.7k
    }
830
48.7k
    return Base::close(state, exec_status);
831
48.7k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
810
340
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
811
340
    if (_closed) {
812
0
        return Status::OK();
813
0
    }
814
340
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
815
340
    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
340
    if (_writer) {
818
340
        Status st = _writer->get_writer_status();
819
340
        if (exec_status.ok()) {
820
340
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
821
340
                                                       : Status::Cancelled("force close"));
822
340
        } 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
340
        RETURN_IF_ERROR(st);
829
340
    }
830
340
    return Base::close(state, exec_status);
831
340
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
810
48.4k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
811
48.4k
    if (_closed) {
812
0
        return Status::OK();
813
0
    }
814
48.4k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
815
48.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
48.4k
    if (_writer) {
818
48.4k
        Status st = _writer->get_writer_status();
819
48.4k
        if (exec_status.ok()) {
820
48.3k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
821
48.3k
                                                       : Status::Cancelled("force close"));
822
48.3k
        } else {
823
45
            _writer->force_close(exec_status);
824
45
        }
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
48.4k
        RETURN_IF_ERROR(st);
829
48.4k
    }
830
48.3k
    return Base::close(state, exec_status);
831
48.4k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
810
18
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
811
18
    if (_closed) {
812
0
        return Status::OK();
813
0
    }
814
18
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
815
18
    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
18
    if (_writer) {
818
18
        Status st = _writer->get_writer_status();
819
18
        if (exec_status.ok()) {
820
18
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
821
18
                                                       : Status::Cancelled("force close"));
822
18
        } 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
18
        RETURN_IF_ERROR(st);
829
18
    }
830
18
    return Base::close(state, exec_status);
831
18
}
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