Coverage Report

Created: 2026-09-11 20:44

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.91M
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
1.91M
    if (_parent->nereids_id() == -1) {
122
1.00M
        return fmt::format("(id={})", _parent->node_id());
123
1.00M
    } else {
124
917k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
917k
    }
126
1.91M
}
_ZNK5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
70.6k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
70.6k
    if (_parent->nereids_id() == -1) {
122
0
        return fmt::format("(id={})", _parent->node_id());
123
70.6k
    } else {
124
70.6k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
70.6k
    }
126
70.6k
}
_ZNK5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
1
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
1
    if (_parent->nereids_id() == -1) {
122
1
        return fmt::format("(id={})", _parent->node_id());
123
1
    } else {
124
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
0
    }
126
1
}
_ZNK5doris19PipelineXLocalStateINS_15SortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
219k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
219k
    if (_parent->nereids_id() == -1) {
122
12
        return fmt::format("(id={})", _parent->node_id());
123
219k
    } else {
124
219k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
219k
    }
126
219k
}
_ZNK5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
25
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
25
    if (_parent->nereids_id() == -1) {
122
0
        return fmt::format("(id={})", _parent->node_id());
123
25
    } else {
124
25
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
25
    }
126
25
}
_ZNK5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
6.24k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
6.24k
    if (_parent->nereids_id() == -1) {
122
0
        return fmt::format("(id={})", _parent->node_id());
123
6.24k
    } else {
124
6.24k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
6.24k
    }
126
6.24k
}
_ZNK5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
8.77k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
8.77k
    if (_parent->nereids_id() == -1) {
122
12
        return fmt::format("(id={})", _parent->node_id());
123
8.76k
    } else {
124
8.76k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
8.76k
    }
126
8.77k
}
_ZNK5doris19PipelineXLocalStateINS_14AggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
87.5k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
87.5k
    if (_parent->nereids_id() == -1) {
122
29
        return fmt::format("(id={})", _parent->node_id());
123
87.5k
    } else {
124
87.5k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
87.5k
    }
126
87.5k
}
_ZNK5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
78.6k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
78.6k
    if (_parent->nereids_id() == -1) {
122
0
        return fmt::format("(id={})", _parent->node_id());
123
78.6k
    } else {
124
78.6k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
78.6k
    }
126
78.6k
}
_ZNK5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
40
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
40
    if (_parent->nereids_id() == -1) {
122
0
        return fmt::format("(id={})", _parent->node_id());
123
40
    } else {
124
40
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
40
    }
126
40
}
_ZNK5doris19PipelineXLocalStateINS_15FakeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
701k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
701k
    if (_parent->nereids_id() == -1) {
122
313k
        return fmt::format("(id={})", _parent->node_id());
123
387k
    } else {
124
387k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
387k
    }
126
701k
}
_ZNK5doris19PipelineXLocalStateINS_16UnionSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
54.4k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
54.4k
    if (_parent->nereids_id() == -1) {
122
2
        return fmt::format("(id={})", _parent->node_id());
123
54.4k
    } else {
124
54.4k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
54.4k
    }
126
54.4k
}
_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
5.94k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
5.95k
    if (_parent->nereids_id() == -1) {
122
5.95k
        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
5.94k
}
_ZNK5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
457
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
457
    if (_parent->nereids_id() == -1) {
122
102
        return fmt::format("(id={})", _parent->node_id());
123
355
    } else {
124
355
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
355
    }
126
457
}
_ZNK5doris19PipelineXLocalStateINS_14SetSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
5.30k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
5.30k
    if (_parent->nereids_id() == -1) {
122
13
        return fmt::format("(id={})", _parent->node_id());
123
5.29k
    } else {
124
5.29k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
5.29k
    }
126
5.30k
}
_ZNK5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
680k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
681k
    if (_parent->nereids_id() == -1) {
122
681k
        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
680k
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_16BasicSharedStateEE11name_suffixB5cxx11Ev
_ZNK5doris19PipelineXLocalStateINS_17RecCTESharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
164
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
164
    if (_parent->nereids_id() == -1) {
122
0
        return fmt::format("(id={})", _parent->node_id());
123
164
    } else {
124
164
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
164
    }
126
164
}
127
128
template <typename SharedStateArg>
129
1.25M
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
1.25M
    if (_parent->nereids_id() == -1) {
131
717k
        return fmt::format("(id={})", _parent->node_id());
132
717k
    } else {
133
534k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
534k
    }
135
1.25M
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
119k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
119k
    if (_parent->nereids_id() == -1) {
131
0
        return fmt::format("(id={})", _parent->node_id());
132
119k
    } else {
133
119k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
119k
    }
135
119k
}
_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
224k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
224k
    if (_parent->nereids_id() == -1) {
131
9
        return fmt::format("(id={})", _parent->node_id());
132
224k
    } else {
133
224k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
224k
    }
135
224k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
32
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
32
    if (_parent->nereids_id() == -1) {
131
0
        return fmt::format("(id={})", _parent->node_id());
132
32
    } else {
133
32
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
32
    }
135
32
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
6.45k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
6.45k
    if (_parent->nereids_id() == -1) {
131
0
        return fmt::format("(id={})", _parent->node_id());
132
6.45k
    } else {
133
6.45k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
6.45k
    }
135
6.45k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
8.80k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
8.80k
    if (_parent->nereids_id() == -1) {
131
12
        return fmt::format("(id={})", _parent->node_id());
132
8.79k
    } else {
133
8.79k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
8.79k
    }
135
8.80k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
88.1k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
88.1k
    if (_parent->nereids_id() == -1) {
131
29
        return fmt::format("(id={})", _parent->node_id());
132
88.1k
    } else {
133
88.1k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
88.1k
    }
135
88.1k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
78.0k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
78.0k
    if (_parent->nereids_id() == -1) {
131
0
        return fmt::format("(id={})", _parent->node_id());
132
78.0k
    } else {
133
78.0k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
78.0k
    }
135
78.0k
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
50
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
50
    if (_parent->nereids_id() == -1) {
131
0
        return fmt::format("(id={})", _parent->node_id());
132
50
    } else {
133
50
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
50
    }
135
50
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
47
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
47
    if (_parent->nereids_id() == -1) {
131
46
        return fmt::format("(id={})", _parent->node_id());
132
46
    } else {
133
1
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
1
    }
135
47
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
10.0k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
10.0k
    if (_parent->nereids_id() == -1) {
131
3
        return fmt::format("(id={})", _parent->node_id());
132
10.0k
    } else {
133
10.0k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
10.0k
    }
135
10.0k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
460
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
460
    if (_parent->nereids_id() == -1) {
131
102
        return fmt::format("(id={})", _parent->node_id());
132
358
    } else {
133
358
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
358
    }
135
460
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE11name_suffixB5cxx11Ev
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
12.7k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
12.8k
    if (_parent->nereids_id() == -1) {
131
12.8k
        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.7k
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
251k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
251k
    if (_parent->nereids_id() == -1) {
131
251k
        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
251k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
450k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
452k
    if (_parent->nereids_id() == -1) {
131
452k
        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
450k
}
_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
328
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
328
    if (_parent->nereids_id() == -1) {
131
0
        return fmt::format("(id={})", _parent->node_id());
132
328
    } else {
133
328
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
328
    }
135
328
}
136
137
template <typename SharedStateArg>
138
30.1k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
30.1k
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
30.1k
    _terminated = true;
143
30.1k
    return Status::OK();
144
30.1k
}
_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.88k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
2.88k
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
2.88k
    _terminated = true;
143
2.88k
    return Status::OK();
144
2.88k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
2
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
2
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
2
    _terminated = true;
143
2
    return Status::OK();
144
2
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
9
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
9
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
9
    _terminated = true;
143
9
    return Status::OK();
144
9
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
2
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
2
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
2
    _terminated = true;
143
2
    return Status::OK();
144
2
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
1.38k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
1.38k
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
1.38k
    _terminated = true;
143
1.38k
    return Status::OK();
144
1.38k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
594
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
594
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
594
    _terminated = true;
143
594
    return Status::OK();
144
594
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
356
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
356
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
356
    _terminated = true;
143
356
    return Status::OK();
144
356
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
282
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
282
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
282
    _terminated = true;
143
282
    return Status::OK();
144
282
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
2
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
2
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
2
    _terminated = true;
143
2
    return Status::OK();
144
2
}
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
136
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
136
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
136
    _terminated = true;
143
136
    return Status::OK();
144
136
}
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
18
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
18
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
18
    _terminated = true;
143
18
    return Status::OK();
144
18
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
306
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
306
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
306
    _terminated = true;
143
306
    return Status::OK();
144
306
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE9terminateEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
130
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
130
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
130
    _terminated = true;
143
130
    return Status::OK();
144
130
}
145
146
305k
DataDistribution OperatorBase::required_data_distribution(RuntimeState* /*state*/) const {
147
305k
    return _child && _child->is_serial_operator() && !is_source()
148
305k
                   ? DataDistribution(TLocalPartitionType::PASSTHROUGH)
149
305k
                   : DataDistribution(TLocalPartitionType::NOOP);
150
305k
}
151
152
23.1k
bool OperatorBase::child_breaks_local_key_distribution(RuntimeState* state) const {
153
23.1k
    if (!_child) {
154
22.0k
        return false;
155
22.0k
    }
156
1.04k
    if (_child->is_serial_operator()) {
157
104
        return true;
158
104
    }
159
945
    const auto child_distribution = _child->required_data_distribution(state);
160
945
    return child_distribution.need_local_exchange() &&
161
945
           !is_shuffled_exchange(child_distribution.distribution_type);
162
1.04k
}
163
164
template <typename SharedStateArg>
165
19.7k
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
166
19.7k
    fmt::memory_buffer debug_string_buffer;
167
19.7k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
168
19.7k
    return fmt::to_string(debug_string_buffer);
169
19.7k
}
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
19.7k
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
166
19.7k
    fmt::memory_buffer debug_string_buffer;
167
19.7k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
168
19.7k
    return fmt::to_string(debug_string_buffer);
169
19.7k
}
_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
19.7k
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
173
19.7k
    fmt::memory_buffer debug_string_buffer;
174
19.7k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
175
19.7k
    return fmt::to_string(debug_string_buffer);
176
19.7k
}
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
19.7k
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
173
19.7k
    fmt::memory_buffer debug_string_buffer;
174
19.7k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
175
19.7k
    return fmt::to_string(debug_string_buffer);
176
19.7k
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE12debug_stringB5cxx11Ei
177
178
19.8k
std::string OperatorXBase::debug_string(int indentation_level) const {
179
19.8k
    fmt::memory_buffer debug_string_buffer;
180
19.8k
    fmt::format_to(debug_string_buffer, "{}{}: id={}, parallel_tasks={}, _is_serial_operator={}",
181
19.8k
                   std::string(indentation_level * 2, ' '), _op_name, node_id(), _parallel_tasks,
182
19.8k
                   _is_serial_operator);
183
19.8k
    return fmt::to_string(debug_string_buffer);
184
19.8k
}
185
186
19.7k
std::string OperatorXBase::debug_string(RuntimeState* state, int indentation_level) const {
187
19.7k
    return state->get_local_state(operator_id())->debug_string(indentation_level);
188
19.7k
}
189
190
661k
Status OperatorXBase::init(const TPlanNode& tnode, RuntimeState* state) {
191
661k
    std::string node_name = print_plan_node_type(tnode.node_type);
192
661k
    _nereids_id = tnode.nereids_id;
193
661k
    if (!tnode.intermediate_output_tuple_id_list.empty()) {
194
3.83k
        if (!has_projection()) {
195
0
            return Status::InternalError("no final output tuple id");
196
0
        }
197
3.83k
        if (tnode.intermediate_output_tuple_id_list.size() !=
198
3.83k
            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.83k
    }
206
661k
    auto substr = node_name.substr(0, node_name.find("_NODE"));
207
661k
    _op_name = substr + "_OPERATOR";
208
209
661k
    if (tnode.__isset.vconjunct) {
210
0
        return Status::InternalError("vconjunct is not supported yet");
211
661k
    } 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.6k
    }
218
219
    // create the projections expr
220
661k
    if (tnode.__isset.projections) {
221
258k
        RETURN_IF_ERROR(VExpr::create_expr_trees(tnode.projections, _projection->projections));
222
258k
    }
223
661k
    if (!tnode.intermediate_projections_list.empty()) {
224
3.83k
        DCHECK(has_projection()) << "no final projections";
225
3.83k
        _projection->intermediate_projections.reserve(tnode.intermediate_projections_list.size());
226
6.44k
        for (const auto& tnode_projections : tnode.intermediate_projections_list) {
227
6.44k
            VExprContextSPtrs projections;
228
6.44k
            RETURN_IF_ERROR(VExpr::create_expr_trees(tnode_projections, projections));
229
6.44k
            _projection->intermediate_projections.push_back(projections);
230
6.44k
        }
231
3.83k
    }
232
661k
    return Status::OK();
233
661k
}
234
235
688k
Status OperatorXBase::prepare(RuntimeState* state) {
236
688k
    for (auto& conjunct : _conjuncts) {
237
271k
        RETURN_IF_ERROR(conjunct->prepare(state, operator_row_desc_before_projection()));
238
271k
    }
239
688k
    if (state->enable_adjust_conjunct_order_by_cost()) {
240
638k
        std::ranges::stable_sort(_conjuncts, [](const auto& a, const auto& b) {
241
338k
            return a->execute_cost() < b->execute_cost();
242
338k
        });
243
638k
    };
244
245
688k
    if (has_projection()) {
246
258k
        auto& projection = *_projection;
247
264k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
248
6.44k
            const auto& input_row_desc =
249
6.44k
                    i == 0 ? operator_row_desc_before_projection()
250
6.44k
                           : projection.intermediate_output_row_descriptors[i - 1];
251
6.44k
            RETURN_IF_ERROR(
252
6.44k
                    VExpr::prepare(projection.intermediate_projections[i], state, input_row_desc));
253
6.44k
        }
254
258k
        const auto& final_projection_input_row_desc =
255
258k
                projection.intermediate_output_row_descriptors.empty()
256
258k
                        ? operator_row_desc_before_projection()
257
258k
                        : projection.intermediate_output_row_descriptors.back();
258
258k
        RETURN_IF_ERROR(
259
258k
                VExpr::prepare(projection.projections, state, final_projection_input_row_desc));
260
258k
        RETURN_IF_ERROR(VExpr::check_expr_output_type(projection.projections,
261
258k
                                                      projection.output_row_descriptor));
262
258k
    }
263
264
688k
    for (auto& conjunct : _conjuncts) {
265
272k
        RETURN_IF_ERROR(conjunct->open(state));
266
272k
    }
267
688k
    if (has_projection()) {
268
258k
        RETURN_IF_ERROR(VExpr::open(_projection->projections, state));
269
258k
        for (auto& projections : _projection->intermediate_projections) {
270
6.44k
            RETURN_IF_ERROR(VExpr::open(projections, state));
271
6.44k
        }
272
258k
    }
273
688k
    if (_child && !is_source()) {
274
104k
        RETURN_IF_ERROR(_child->prepare(state));
275
104k
    }
276
277
688k
    if (VExpr::contains_blockable_function(_conjuncts) ||
278
688k
        (has_projection() && VExpr::contains_blockable_function(_projection->projections))) {
279
0
        _blockable = true;
280
0
    }
281
282
688k
    return Status::OK();
283
688k
}
284
285
6.88k
Status OperatorXBase::terminate(RuntimeState* state) {
286
6.88k
    if (_child && !is_source()) {
287
690
        RETURN_IF_ERROR(_child->terminate(state));
288
690
    }
289
6.88k
    auto result = state->get_local_state_result(operator_id());
290
6.88k
    if (!result) {
291
0
        return result.error();
292
0
    }
293
6.88k
    return result.value()->terminate(state);
294
6.88k
}
295
296
5.26M
Status OperatorXBase::close(RuntimeState* state) {
297
5.26M
    if (_child && !is_source()) {
298
917k
        RETURN_IF_ERROR(_child->close(state));
299
917k
    }
300
5.26M
    auto result = state->get_local_state_result(operator_id());
301
5.26M
    if (!result) {
302
0
        return result.error();
303
0
    }
304
5.26M
    return result.value()->close(state);
305
5.26M
}
306
307
284k
void PipelineXLocalStateBase::clear_origin_block() {
308
284k
    _origin_block.clear_column_data(
309
284k
            _parent->operator_row_desc_before_projection().num_materialized_slots());
310
284k
}
311
312
905k
Status PipelineXLocalStateBase::filter_block(const VExprContextSPtrs& expr_contexts, Block* block) {
313
905k
    RETURN_IF_ERROR(VExprContext::filter_block(expr_contexts, block, block->columns()));
314
315
905k
    _estimate_memory_usage += VExprContext::get_memory_usage(expr_contexts);
316
905k
    return Status::OK();
317
905k
}
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
284k
                                     Block* output_block) const {
326
284k
    auto* local_state = state->get_local_state(operator_id());
327
284k
    SCOPED_TIMER(local_state->exec_time_counter());
328
284k
    SCOPED_TIMER(local_state->_projection_timer);
329
284k
    const size_t rows = origin_block->rows();
330
284k
    if (rows == 0) {
331
152k
        return Status::OK();
332
152k
    }
333
131k
    SCOPED_PEAK_MEM(&local_state->_estimate_memory_usage);
334
335
131k
    {
336
131k
        Block input_block = *origin_block;
337
338
131k
        ColumnsWithTypeAndName new_columns;
339
131k
        for (const auto& projections : local_state->_intermediate_projections) {
340
3.78k
            if (projections.empty()) {
341
0
                return Status::InternalError("meet empty intermediate projection, node id: {}",
342
0
                                             node_id());
343
0
            }
344
3.78k
            new_columns.resize(projections.size());
345
70.2k
            for (int i = 0; i < projections.size(); i++) {
346
66.4k
                RETURN_IF_ERROR(projections[i]->execute(&input_block, new_columns[i]));
347
66.4k
                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
66.4k
            }
355
3.77k
            Block tmp_block {new_columns};
356
3.77k
            input_block.swap(tmp_block);
357
3.77k
        }
358
359
131k
        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
131k
        auto scoped_mutable_block = VectorizedUtils::build_scoped_mutable_mem_reuse_block(
367
131k
                output_block, _projection->output_row_descriptor);
368
131k
        auto& mutable_columns = scoped_mutable_block.mutable_columns();
369
131k
        DCHECK_EQ(mutable_columns.size(), local_state->_projections.size()) << debug_string();
370
131k
        Columns shared_columns(mutable_columns.size());
371
372
769k
        for (int i = 0; i < mutable_columns.size(); ++i) {
373
637k
            ColumnPtr column_ptr;
374
637k
            RETURN_IF_ERROR(local_state->_projections[i]->execute(&input_block, column_ptr));
375
637k
            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
637k
            column_ptr = column_ptr->convert_to_full_column_if_const();
382
637k
            if (is_column_nullable(*mutable_columns[i]) && !is_column_nullable(*column_ptr)) {
383
0
                column_ptr = make_nullable(column_ptr, false);
384
0
            }
385
637k
            if (column_ptr->is_exclusive()) {
386
225k
                mutable_columns[i] = IColumn::mutate(std::move(column_ptr));
387
411k
            } else {
388
411k
                shared_columns[i] = std::move(column_ptr);
389
411k
            }
390
637k
        }
391
392
131k
        scoped_mutable_block.restore();
393
769k
        for (int i = 0; i < shared_columns.size(); ++i) {
394
637k
            if (shared_columns[i]) {
395
411k
                output_block->replace_by_position(i, std::move(shared_columns[i]));
396
411k
            }
397
637k
        }
398
131k
    }
399
400
0
    origin_block->clear_column_data(
401
131k
            local_state->_parent->operator_row_desc_before_projection().num_materialized_slots());
402
131k
    DCHECK_EQ(output_block->rows(), rows);
403
404
131k
    return Status::OK();
405
131k
}
406
407
4.63M
Status OperatorXBase::get_block_after_projects(RuntimeState* state, Block* block, bool* eos) {
408
4.63M
    DBUG_EXECUTE_IF("Pipeline::return_empty_block", {
409
4.63M
        if (this->_op_name == "AGGREGATION_OPERATOR" || this->_op_name == "HASH_JOIN_OPERATOR" ||
410
4.63M
            this->_op_name == "PARTITIONED_AGGREGATION_OPERATOR" ||
411
4.63M
            this->_op_name == "PARTITIONED_HASH_JOIN_OPERATOR" ||
412
4.63M
            this->_op_name == "CROSS_JOIN_OPERATOR" || this->_op_name == "SORT_OPERATOR") {
413
4.63M
            if (_debug_point_count++ % 2 == 0) {
414
4.63M
                return Status::OK();
415
4.63M
            }
416
4.63M
        }
417
4.63M
    });
418
419
4.63M
    Status status;
420
4.63M
    auto* local_state = state->get_local_state(operator_id());
421
4.63M
    Defer defer([&]() {
422
4.64M
        if (status.ok()) {
423
4.64M
            local_state->update_output_block_counters(*block);
424
4.64M
        }
425
4.63M
    });
426
4.63M
    if (has_projection()) {
427
284k
        local_state->clear_origin_block();
428
284k
        status = get_block(state, &local_state->_origin_block, eos);
429
284k
        if (UNLIKELY(!status.ok())) {
430
25
            return status;
431
25
        }
432
284k
        status = do_projections(state, &local_state->_origin_block, block);
433
284k
        return status;
434
284k
    }
435
4.35M
    status = get_block(state, block, eos);
436
4.35M
    RETURN_IF_ERROR(block->check_type_and_column());
437
4.35M
    return status;
438
4.35M
}
439
440
2.86M
void PipelineXLocalStateBase::reached_limit(Block* block, bool* eos) {
441
2.86M
    if (_parent->_limit != -1 and _num_rows_returned + block->rows() >= _parent->_limit) {
442
9.42k
        block->set_num_rows(_parent->_limit - _num_rows_returned);
443
9.42k
        *eos = true;
444
9.42k
    }
445
446
2.86M
    DBUG_EXECUTE_IF("Pipeline::reached_limit_early", {
447
2.86M
        auto op_name = to_lower(_parent->_op_name);
448
2.86M
        auto arg_op_name = dp->param<std::string>("op_name");
449
2.86M
        arg_op_name = to_lower(arg_op_name);
450
451
2.86M
        if (op_name == arg_op_name) {
452
2.86M
            *eos = true;
453
2.86M
        }
454
2.86M
    });
455
456
2.86M
    if (auto rows = block->rows()) {
457
730k
        _num_rows_returned += rows;
458
730k
        _state->get_query_ctx()->resource_ctx()->io_context()->update_process_rows(rows);
459
730k
    }
460
2.86M
}
461
462
30.1k
Status DataSinkOperatorXBase::terminate(RuntimeState* state) {
463
30.1k
    auto result = state->get_sink_local_state_result();
464
30.1k
    if (!result) {
465
0
        return result.error();
466
0
    }
467
30.1k
    return result.value()->terminate(state);
468
30.1k
}
469
470
19.7k
std::string DataSinkOperatorXBase::debug_string(int indentation_level) const {
471
19.7k
    fmt::memory_buffer debug_string_buffer;
472
473
19.7k
    fmt::format_to(debug_string_buffer, "{}{}: id={}, _is_serial_operator={}",
474
19.7k
                   std::string(indentation_level * 2, ' '), _name, node_id(), _is_serial_operator);
475
19.7k
    return fmt::to_string(debug_string_buffer);
476
19.7k
}
477
478
19.7k
std::string DataSinkOperatorXBase::debug_string(RuntimeState* state, int indentation_level) const {
479
19.7k
    return state->get_sink_local_state()->debug_string(indentation_level);
480
19.7k
}
481
482
341k
Status DataSinkOperatorXBase::init(const TDataSink& tsink) {
483
341k
    std::string op_name = "UNKNOWN_SINK";
484
341k
    auto it = _TDataSinkType_VALUES_TO_NAMES.find(tsink.type);
485
486
342k
    if (it != _TDataSinkType_VALUES_TO_NAMES.end()) {
487
342k
        op_name = it->second;
488
342k
    }
489
341k
    _name = op_name + "_OPERATOR";
490
341k
    return Status::OK();
491
341k
}
492
493
288k
Status DataSinkOperatorXBase::init(const TPlanNode& tnode, RuntimeState* state) {
494
288k
    std::string op_name = print_plan_node_type(tnode.node_type);
495
288k
    _nereids_id = tnode.nereids_id;
496
288k
    auto substr = op_name.substr(0, op_name.find("_NODE"));
497
288k
    _name = substr + "_SINK_OPERATOR";
498
288k
    return Status::OK();
499
288k
}
500
501
template <typename LocalStateType>
502
Status DataSinkOperatorX<LocalStateType>::setup_local_state(RuntimeState* state,
503
1.80M
                                                            LocalSinkStateInfo& info) {
504
1.80M
    auto local_state = LocalStateType::create_unique(this, state);
505
1.80M
    RETURN_IF_ERROR(local_state->init(state, info));
506
1.80M
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
1.80M
    return Status::OK();
508
1.80M
}
_ZN5doris17DataSinkOperatorXINS_27HashJoinBuildSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
119k
                                                            LocalSinkStateInfo& info) {
504
119k
    auto local_state = LocalStateType::create_unique(this, state);
505
119k
    RETURN_IF_ERROR(local_state->init(state, info));
506
119k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
119k
    return Status::OK();
508
119k
}
_ZN5doris17DataSinkOperatorXINS_20ResultSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
408k
                                                            LocalSinkStateInfo& info) {
504
408k
    auto local_state = LocalStateType::create_unique(this, state);
505
408k
    RETURN_IF_ERROR(local_state->init(state, info));
506
408k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
408k
    return Status::OK();
508
408k
}
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
358
                                                            LocalSinkStateInfo& info) {
504
358
    auto local_state = LocalStateType::create_unique(this, state);
505
358
    RETURN_IF_ERROR(local_state->init(state, info));
506
358
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
358
    return Status::OK();
508
358
}
_ZN5doris17DataSinkOperatorXINS_23OlapTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
45.7k
                                                            LocalSinkStateInfo& info) {
504
45.7k
    auto local_state = LocalStateType::create_unique(this, state);
505
45.7k
    RETURN_IF_ERROR(local_state->init(state, info));
506
45.7k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
45.7k
    return Status::OK();
508
45.7k
}
_ZN5doris17DataSinkOperatorXINS_25OlapTableSinkV2LocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
12
                                                            LocalSinkStateInfo& info) {
504
12
    auto local_state = LocalStateType::create_unique(this, state);
505
12
    RETURN_IF_ERROR(local_state->init(state, info));
506
12
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
12
    return Status::OK();
508
12
}
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.81k
                                                            LocalSinkStateInfo& info) {
504
8.81k
    auto local_state = LocalStateType::create_unique(this, state);
505
8.81k
    RETURN_IF_ERROR(local_state->init(state, info));
506
8.81k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
8.81k
    return Status::OK();
508
8.81k
}
_ZN5doris17DataSinkOperatorXINS_23BlackholeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
43
                                                            LocalSinkStateInfo& info) {
504
43
    auto local_state = LocalStateType::create_unique(this, state);
505
43
    RETURN_IF_ERROR(local_state->init(state, info));
506
43
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
43
    return Status::OK();
508
43
}
_ZN5doris17DataSinkOperatorXINS_18SortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
225k
                                                            LocalSinkStateInfo& info) {
504
225k
    auto local_state = LocalStateType::create_unique(this, state);
505
225k
    RETURN_IF_ERROR(local_state->init(state, info));
506
225k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
225k
    return Status::OK();
508
225k
}
_ZN5doris17DataSinkOperatorXINS_23SpillSortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
32
                                                            LocalSinkStateInfo& info) {
504
32
    auto local_state = LocalStateType::create_unique(this, state);
505
32
    RETURN_IF_ERROR(local_state->init(state, info));
506
32
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
32
    return Status::OK();
508
32
}
_ZN5doris17DataSinkOperatorXINS_27LocalExchangeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
251k
                                                            LocalSinkStateInfo& info) {
504
251k
    auto local_state = LocalStateType::create_unique(this, state);
505
251k
    RETURN_IF_ERROR(local_state->init(state, info));
506
251k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
251k
    return Status::OK();
508
251k
}
_ZN5doris17DataSinkOperatorXINS_17AggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
88.2k
                                                            LocalSinkStateInfo& info) {
504
88.2k
    auto local_state = LocalStateType::create_unique(this, state);
505
88.2k
    RETURN_IF_ERROR(local_state->init(state, info));
506
88.2k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
88.2k
    return Status::OK();
508
88.2k
}
_ZN5doris17DataSinkOperatorXINS_25BucketedAggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
77.7k
                                                            LocalSinkStateInfo& info) {
504
77.7k
    auto local_state = LocalStateType::create_unique(this, state);
505
77.7k
    RETURN_IF_ERROR(local_state->init(state, info));
506
77.7k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
77.7k
    return Status::OK();
508
77.7k
}
_ZN5doris17DataSinkOperatorXINS_28PartitionedAggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
50
                                                            LocalSinkStateInfo& info) {
504
50
    auto local_state = LocalStateType::create_unique(this, state);
505
50
    RETURN_IF_ERROR(local_state->init(state, info));
506
50
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
50
    return Status::OK();
508
50
}
_ZN5doris17DataSinkOperatorXINS_22ExchangeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
545k
                                                            LocalSinkStateInfo& info) {
504
545k
    auto local_state = LocalStateType::create_unique(this, state);
505
545k
    RETURN_IF_ERROR(local_state->init(state, info));
506
545k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
545k
    return Status::OK();
508
545k
}
_ZN5doris17DataSinkOperatorXINS_33NestedLoopJoinBuildSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
6.46k
                                                            LocalSinkStateInfo& info) {
504
6.46k
    auto local_state = LocalStateType::create_unique(this, state);
505
6.46k
    RETURN_IF_ERROR(local_state->init(state, info));
506
6.46k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
6.46k
    return Status::OK();
508
6.46k
}
_ZN5doris17DataSinkOperatorXINS_19UnionSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
10.0k
                                                            LocalSinkStateInfo& info) {
504
10.0k
    auto local_state = LocalStateType::create_unique(this, state);
505
10.0k
    RETURN_IF_ERROR(local_state->init(state, info));
506
10.0k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
10.0k
    return Status::OK();
508
10.0k
}
_ZN5doris17DataSinkOperatorXINS_33MultiCastDataStreamSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
2.37k
                                                            LocalSinkStateInfo& info) {
504
2.37k
    auto local_state = LocalStateType::create_unique(this, state);
505
2.37k
    RETURN_IF_ERROR(local_state->init(state, info));
506
2.37k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
2.37k
    return Status::OK();
508
2.37k
}
_ZN5doris17DataSinkOperatorXINS_27PartitionSortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
357
                                                            LocalSinkStateInfo& info) {
504
357
    auto local_state = LocalStateType::create_unique(this, state);
505
357
    RETURN_IF_ERROR(local_state->init(state, info));
506
357
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
357
    return Status::OK();
508
357
}
_ZN5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
4.87k
                                                            LocalSinkStateInfo& info) {
504
4.87k
    auto local_state = LocalStateType::create_unique(this, state);
505
4.87k
    RETURN_IF_ERROR(local_state->init(state, info));
506
4.87k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
4.87k
    return Status::OK();
508
4.87k
}
_ZN5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
2.62k
                                                            LocalSinkStateInfo& info) {
504
2.62k
    auto local_state = LocalStateType::create_unique(this, state);
505
2.62k
    RETURN_IF_ERROR(local_state->init(state, info));
506
2.62k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
2.62k
    return Status::OK();
508
2.62k
}
_ZN5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
2.69k
                                                            LocalSinkStateInfo& info) {
504
2.69k
    auto local_state = LocalStateType::create_unique(this, state);
505
2.69k
    RETURN_IF_ERROR(local_state->init(state, info));
506
2.69k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
2.69k
    return Status::OK();
508
2.69k
}
_ZN5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
2.55k
                                                            LocalSinkStateInfo& info) {
504
2.55k
    auto local_state = LocalStateType::create_unique(this, state);
505
2.55k
    RETURN_IF_ERROR(local_state->init(state, info));
506
2.55k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
2.55k
    return Status::OK();
508
2.55k
}
_ZN5doris17DataSinkOperatorXINS_33PartitionedHashJoinSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
1
                                                            LocalSinkStateInfo& info) {
504
1
    auto local_state = LocalStateType::create_unique(this, state);
505
1
    RETURN_IF_ERROR(local_state->init(state, info));
506
1
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
1
    return Status::OK();
508
1
}
_ZN5doris17DataSinkOperatorXINS_30GroupCommitBlockSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
565
                                                            LocalSinkStateInfo& info) {
504
565
    auto local_state = LocalStateType::create_unique(this, state);
505
565
    RETURN_IF_ERROR(local_state->init(state, info));
506
565
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
565
    return Status::OK();
508
565
}
_ZN5doris17DataSinkOperatorXINS_19CacheSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
14
                                                            LocalSinkStateInfo& info) {
504
14
    auto local_state = LocalStateType::create_unique(this, state);
505
14
    RETURN_IF_ERROR(local_state->init(state, info));
506
14
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
14
    return Status::OK();
508
14
}
_ZN5doris17DataSinkOperatorXINS_18DictSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
106
                                                            LocalSinkStateInfo& info) {
504
106
    auto local_state = LocalStateType::create_unique(this, state);
505
106
    RETURN_IF_ERROR(local_state->init(state, info));
506
106
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
106
    return Status::OK();
508
106
}
_ZN5doris17DataSinkOperatorXINS_20RecCTESinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
164
                                                            LocalSinkStateInfo& info) {
504
164
    auto local_state = LocalStateType::create_unique(this, state);
505
164
    RETURN_IF_ERROR(local_state->init(state, info));
506
164
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
164
    return Status::OK();
508
164
}
_ZN5doris17DataSinkOperatorXINS_26RecCTEAnchorSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
164
                                                            LocalSinkStateInfo& info) {
504
164
    auto local_state = LocalStateType::create_unique(this, state);
505
164
    RETURN_IF_ERROR(local_state->init(state, info));
506
164
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
164
    return Status::OK();
508
164
}
509
510
template <typename LocalStateType>
511
1.44M
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.44M
    } else {
519
1.44M
        auto ss = LocalStateType::SharedStateType::create_shared();
520
1.44M
        ss->id = operator_id();
521
1.44M
        for (auto& dest : dests_id()) {
522
1.42M
            ss->related_op_ids.insert(dest);
523
1.42M
        }
524
1.44M
        return ss;
525
1.44M
    }
526
1.44M
}
_ZNK5doris17DataSinkOperatorXINS_27HashJoinBuildSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
105k
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
105k
    } else {
519
105k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
105k
        ss->id = operator_id();
521
105k
        for (auto& dest : dests_id()) {
522
105k
            ss->related_op_ids.insert(dest);
523
105k
        }
524
105k
        return ss;
525
105k
    }
526
105k
}
_ZNK5doris17DataSinkOperatorXINS_20ResultSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
408k
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
408k
    } else {
519
408k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
408k
        ss->id = operator_id();
521
408k
        for (auto& dest : dests_id()) {
522
405k
            ss->related_op_ids.insert(dest);
523
405k
        }
524
408k
        return ss;
525
408k
    }
526
408k
}
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
360
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
360
    } else {
519
360
        auto ss = LocalStateType::SharedStateType::create_shared();
520
360
        ss->id = operator_id();
521
360
        for (auto& dest : dests_id()) {
522
359
            ss->related_op_ids.insert(dest);
523
359
        }
524
360
        return ss;
525
360
    }
526
360
}
_ZNK5doris17DataSinkOperatorXINS_23OlapTableSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
45.7k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
45.7k
    } else {
519
45.7k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
45.7k
        ss->id = operator_id();
521
45.7k
        for (auto& dest : dests_id()) {
522
45.2k
            ss->related_op_ids.insert(dest);
523
45.2k
        }
524
45.7k
        return ss;
525
45.7k
    }
526
45.7k
}
_ZNK5doris17DataSinkOperatorXINS_25OlapTableSinkV2LocalStateEE19create_shared_stateEv
Line
Count
Source
511
12
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
12
    } else {
519
12
        auto ss = LocalStateType::SharedStateType::create_shared();
520
12
        ss->id = operator_id();
521
12
        for (auto& dest : dests_id()) {
522
12
            ss->related_op_ids.insert(dest);
523
12
        }
524
12
        return ss;
525
12
    }
526
12
}
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.87k
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.87k
    } else {
519
8.87k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
8.87k
        ss->id = operator_id();
521
8.89k
        for (auto& dest : dests_id()) {
522
8.89k
            ss->related_op_ids.insert(dest);
523
8.89k
        }
524
8.87k
        return ss;
525
8.87k
    }
526
8.87k
}
_ZNK5doris17DataSinkOperatorXINS_23BlackholeSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
44
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
44
    } else {
519
44
        auto ss = LocalStateType::SharedStateType::create_shared();
520
44
        ss->id = operator_id();
521
44
        for (auto& dest : dests_id()) {
522
41
            ss->related_op_ids.insert(dest);
523
41
        }
524
44
        return ss;
525
44
    }
526
44
}
_ZNK5doris17DataSinkOperatorXINS_18SortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
225k
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
225k
    } else {
519
225k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
225k
        ss->id = operator_id();
521
225k
        for (auto& dest : dests_id()) {
522
225k
            ss->related_op_ids.insert(dest);
523
225k
        }
524
225k
        return ss;
525
225k
    }
526
225k
}
_ZNK5doris17DataSinkOperatorXINS_23SpillSortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
34
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
34
    } else {
519
34
        auto ss = LocalStateType::SharedStateType::create_shared();
520
34
        ss->id = operator_id();
521
34
        for (auto& dest : dests_id()) {
522
34
            ss->related_op_ids.insert(dest);
523
34
        }
524
34
        return ss;
525
34
    }
526
34
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_27LocalExchangeSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_17AggSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
88.4k
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
88.4k
    } else {
519
88.4k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
88.4k
        ss->id = operator_id();
521
88.6k
        for (auto& dest : dests_id()) {
522
88.6k
            ss->related_op_ids.insert(dest);
523
88.6k
        }
524
88.4k
        return ss;
525
88.4k
    }
526
88.4k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_25BucketedAggSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_28PartitionedAggSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
49
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
49
    } else {
519
49
        auto ss = LocalStateType::SharedStateType::create_shared();
520
49
        ss->id = operator_id();
521
49
        for (auto& dest : dests_id()) {
522
49
            ss->related_op_ids.insert(dest);
523
49
        }
524
49
        return ss;
525
49
    }
526
49
}
_ZNK5doris17DataSinkOperatorXINS_22ExchangeSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
544k
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
544k
    } else {
519
544k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
544k
        ss->id = operator_id();
521
544k
        for (auto& dest : dests_id()) {
522
536k
            ss->related_op_ids.insert(dest);
523
536k
        }
524
544k
        return ss;
525
544k
    }
526
544k
}
_ZNK5doris17DataSinkOperatorXINS_33NestedLoopJoinBuildSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
6.49k
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.49k
    } else {
519
6.49k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
6.49k
        ss->id = operator_id();
521
6.49k
        for (auto& dest : dests_id()) {
522
6.48k
            ss->related_op_ids.insert(dest);
523
6.48k
        }
524
6.49k
        return ss;
525
6.49k
    }
526
6.49k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_19UnionSinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_33MultiCastDataStreamSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_27PartitionSortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
457
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
457
    } else {
519
457
        auto ss = LocalStateType::SharedStateType::create_shared();
520
457
        ss->id = operator_id();
521
461
        for (auto& dest : dests_id()) {
522
461
            ss->related_op_ids.insert(dest);
523
461
        }
524
457
        return ss;
525
457
    }
526
457
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb1EEEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb0EEEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb1EEEE19create_shared_stateEv
Line
Count
Source
511
2.67k
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.67k
    } else {
519
2.67k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
2.67k
        ss->id = operator_id();
521
2.67k
        for (auto& dest : dests_id()) {
522
2.67k
            ss->related_op_ids.insert(dest);
523
2.67k
        }
524
2.67k
        return ss;
525
2.67k
    }
526
2.67k
}
_ZNK5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb0EEEE19create_shared_stateEv
Line
Count
Source
511
2.57k
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.57k
    } else {
519
2.57k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
2.57k
        ss->id = operator_id();
521
2.57k
        for (auto& dest : dests_id()) {
522
2.54k
            ss->related_op_ids.insert(dest);
523
2.54k
        }
524
2.57k
        return ss;
525
2.57k
    }
526
2.57k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_33PartitionedHashJoinSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_30GroupCommitBlockSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
570
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
570
    } else {
519
570
        auto ss = LocalStateType::SharedStateType::create_shared();
520
570
        ss->id = operator_id();
521
570
        for (auto& dest : dests_id()) {
522
567
            ss->related_op_ids.insert(dest);
523
567
        }
524
570
        return ss;
525
570
    }
526
570
}
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
2.18M
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
2.18M
    auto local_state = LocalStateType::create_unique(state, this);
531
2.18M
    RETURN_IF_ERROR(local_state->init(state, info));
532
2.18M
    state->emplace_local_state(operator_id(), std::move(local_state));
533
2.18M
    return Status::OK();
534
2.18M
}
_ZN5doris9OperatorXINS_23HashJoinProbeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
71.2k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
71.2k
    auto local_state = LocalStateType::create_unique(state, this);
531
71.2k
    RETURN_IF_ERROR(local_state->init(state, info));
532
71.2k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
71.2k
    return Status::OK();
534
71.2k
}
_ZN5doris9OperatorXINS_18OlapScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
241k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
241k
    auto local_state = LocalStateType::create_unique(state, this);
531
241k
    RETURN_IF_ERROR(local_state->init(state, info));
532
241k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
241k
    return Status::OK();
534
241k
}
_ZN5doris9OperatorXINS_21GroupCommitLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
144
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
144
    auto local_state = LocalStateType::create_unique(state, this);
531
144
    RETURN_IF_ERROR(local_state->init(state, info));
532
144
    state->emplace_local_state(operator_id(), std::move(local_state));
533
144
    return Status::OK();
534
144
}
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.80k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
8.80k
    auto local_state = LocalStateType::create_unique(state, this);
531
8.80k
    RETURN_IF_ERROR(local_state->init(state, info));
532
8.80k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
8.80k
    return Status::OK();
534
8.80k
}
_ZN5doris9OperatorXINS_14SortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
8.66k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
8.66k
    auto local_state = LocalStateType::create_unique(state, this);
531
8.66k
    RETURN_IF_ERROR(local_state->init(state, info));
532
8.66k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
8.66k
    return Status::OK();
534
8.66k
}
_ZN5doris9OperatorXINS_19SpillSortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
25
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
25
    auto local_state = LocalStateType::create_unique(state, this);
531
25
    RETURN_IF_ERROR(local_state->init(state, info));
532
25
    state->emplace_local_state(operator_id(), std::move(local_state));
533
25
    return Status::OK();
534
25
}
_ZN5doris9OperatorXINS_24LocalMergeSortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
215k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
215k
    auto local_state = LocalStateType::create_unique(state, this);
531
215k
    RETURN_IF_ERROR(local_state->init(state, info));
532
215k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
215k
    return Status::OK();
534
215k
}
_ZN5doris9OperatorXINS_13AggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
88.1k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
88.1k
    auto local_state = LocalStateType::create_unique(state, this);
531
88.1k
    RETURN_IF_ERROR(local_state->init(state, info));
532
88.1k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
88.1k
    return Status::OK();
534
88.1k
}
_ZN5doris9OperatorXINS_21BucketedAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
78.6k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
78.6k
    auto local_state = LocalStateType::create_unique(state, this);
531
78.6k
    RETURN_IF_ERROR(local_state->init(state, info));
532
78.6k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
78.6k
    return Status::OK();
534
78.6k
}
_ZN5doris9OperatorXINS_24PartitionedAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
40
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
40
    auto local_state = LocalStateType::create_unique(state, this);
531
40
    RETURN_IF_ERROR(local_state->init(state, info));
532
40
    state->emplace_local_state(operator_id(), std::move(local_state));
533
40
    return Status::OK();
534
40
}
_ZN5doris9OperatorXINS_23TableFunctionLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
4.22k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
4.22k
    auto local_state = LocalStateType::create_unique(state, this);
531
4.22k
    RETURN_IF_ERROR(local_state->init(state, info));
532
4.22k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
4.22k
    return Status::OK();
534
4.22k
}
_ZN5doris9OperatorXINS_18ExchangeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
315k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
315k
    auto local_state = LocalStateType::create_unique(state, this);
531
315k
    RETURN_IF_ERROR(local_state->init(state, info));
532
315k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
315k
    return Status::OK();
534
315k
}
_ZN5doris9OperatorXINS_16RepeatLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
1.39k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
1.39k
    auto local_state = LocalStateType::create_unique(state, this);
531
1.39k
    RETURN_IF_ERROR(local_state->init(state, info));
532
1.39k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
1.39k
    return Status::OK();
534
1.39k
}
_ZN5doris9OperatorXINS_29NestedLoopJoinProbeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
6.39k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
6.39k
    auto local_state = LocalStateType::create_unique(state, this);
531
6.39k
    RETURN_IF_ERROR(local_state->init(state, info));
532
6.39k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
6.39k
    return Status::OK();
534
6.39k
}
_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.4k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
54.4k
    auto local_state = LocalStateType::create_unique(state, this);
531
54.4k
    RETURN_IF_ERROR(local_state->init(state, info));
532
54.4k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
54.4k
    return Status::OK();
534
54.4k
}
_ZN5doris9OperatorXINS_35MultiCastDataStreamSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
5.95k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
5.95k
    auto local_state = LocalStateType::create_unique(state, this);
531
5.95k
    RETURN_IF_ERROR(local_state->init(state, info));
532
5.95k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
5.95k
    return Status::OK();
534
5.95k
}
_ZN5doris9OperatorXINS_29PartitionSortSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
359
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
359
    auto local_state = LocalStateType::create_unique(state, this);
531
359
    RETURN_IF_ERROR(local_state->init(state, info));
532
359
    state->emplace_local_state(operator_id(), std::move(local_state));
533
359
    return Status::OK();
534
359
}
_ZN5doris9OperatorXINS_19SetSourceLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
2.71k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
2.71k
    auto local_state = LocalStateType::create_unique(state, this);
531
2.71k
    RETURN_IF_ERROR(local_state->init(state, info));
532
2.71k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
2.71k
    return Status::OK();
534
2.71k
}
_ZN5doris9OperatorXINS_19SetSourceLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
2.58k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
2.58k
    auto local_state = LocalStateType::create_unique(state, this);
531
2.58k
    RETURN_IF_ERROR(local_state->init(state, info));
532
2.58k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
2.58k
    return Status::OK();
534
2.58k
}
_ZN5doris9OperatorXINS_17DataGenLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
304
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
304
    auto local_state = LocalStateType::create_unique(state, this);
531
304
    RETURN_IF_ERROR(local_state->init(state, info));
532
304
    state->emplace_local_state(operator_id(), std::move(local_state));
533
304
    return Status::OK();
534
304
}
_ZN5doris9OperatorXINS_20SchemaScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
1.61k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
1.61k
    auto local_state = LocalStateType::create_unique(state, this);
531
1.61k
    RETURN_IF_ERROR(local_state->init(state, info));
532
1.61k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
1.61k
    return Status::OK();
534
1.61k
}
_ZN5doris9OperatorXINS_18MetaScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
10.2k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
10.2k
    auto local_state = LocalStateType::create_unique(state, this);
531
10.2k
    RETURN_IF_ERROR(local_state->init(state, info));
532
10.2k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
10.2k
    return Status::OK();
534
10.2k
}
_ZN5doris9OperatorXINS_29LocalExchangeSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
690k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
690k
    auto local_state = LocalStateType::create_unique(state, this);
531
690k
    RETURN_IF_ERROR(local_state->init(state, info));
532
690k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
690k
    return Status::OK();
534
690k
}
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
164
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
164
    auto local_state = LocalStateType::create_unique(state, this);
531
164
    RETURN_IF_ERROR(local_state->init(state, info));
532
164
    state->emplace_local_state(operator_id(), std::move(local_state));
533
164
    return Status::OK();
534
164
}
_ZN5doris9OperatorXINS_20RecCTEScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
2.18k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
2.18k
    auto local_state = LocalStateType::create_unique(state, this);
531
2.18k
    RETURN_IF_ERROR(local_state->init(state, info));
532
2.18k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
2.18k
    return Status::OK();
534
2.18k
}
_ZN5doris9OperatorXINS_25MaterializationLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
786
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
786
    auto local_state = LocalStateType::create_unique(state, this);
531
786
    RETURN_IF_ERROR(local_state->init(state, info));
532
786
    state->emplace_local_state(operator_id(), std::move(local_state));
533
786
    return Status::OK();
534
786
}
_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.04k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
6.04k
    auto local_state = LocalStateType::create_unique(state, this);
531
6.04k
    RETURN_IF_ERROR(local_state->init(state, info));
532
6.04k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
6.04k
    return Status::OK();
534
6.04k
}
_ZN5doris9OperatorXINS_30DistinctStreamingAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
362k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
362k
    auto local_state = LocalStateType::create_unique(state, this);
531
362k
    RETURN_IF_ERROR(local_state->init(state, info));
532
362k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
362k
    return Status::OK();
534
362k
}
535
536
PipelineXSinkLocalStateBase::PipelineXSinkLocalStateBase(DataSinkOperatorXBase* parent,
537
                                                         RuntimeState* state)
538
1.79M
        : _parent(parent), _state(state) {}
539
540
PipelineXLocalStateBase::PipelineXLocalStateBase(RuntimeState* state, OperatorXBase* parent)
541
2.16M
        : _num_rows_returned(0),
542
2.16M
          _rows_returned_counter(nullptr),
543
2.16M
          _parent(parent),
544
2.16M
          _state(state),
545
2.16M
          _budget(state->batch_size(), state->preferred_block_size_bytes()) {}
546
547
template <typename SharedStateArg>
548
2.19M
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
2.19M
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
2.19M
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
2.19M
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
2.19M
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
2.19M
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
2.19M
    _operator_profile->add_child(_common_profile.get(), true);
557
2.19M
    _operator_profile->add_child(_custom_profile.get(), true);
558
2.19M
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
2.19M
    if constexpr (!is_fake_shared) {
560
1.24M
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
775k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
775k
                                    .first.get()
563
775k
                                    ->template cast<SharedStateArg>();
564
565
775k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
775k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
775k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
775k
        } else if (info.shared_state) {
569
389k
            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
389k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
389k
            _dependency = _shared_state->create_source_dependency(
576
389k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
389k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
389k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
389k
        } else {
580
78.2k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
13.5k
                DCHECK(false);
582
13.5k
            }
583
78.2k
        }
584
1.24M
    }
585
586
2.19M
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
2.19M
    _rows_returned_counter =
591
2.19M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
2.19M
    _blocks_returned_counter =
593
2.19M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
2.19M
    _output_block_bytes_counter =
595
2.19M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
2.19M
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
2.19M
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
2.19M
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
2.19M
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
2.19M
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
2.19M
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
2.19M
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
2.19M
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
2.19M
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
2.19M
    _memory_used_counter =
606
2.19M
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
2.19M
    _common_profile->add_info_string("IsColocate",
608
2.19M
                                     std::to_string(_parent->is_colocated_operator()));
609
2.19M
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
2.19M
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
2.19M
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
2.19M
    return Status::OK();
613
2.19M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
71.2k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
71.2k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
71.2k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
71.2k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
71.2k
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
71.2k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
71.2k
    _operator_profile->add_child(_common_profile.get(), true);
557
71.2k
    _operator_profile->add_child(_custom_profile.get(), true);
558
71.2k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
71.2k
    if constexpr (!is_fake_shared) {
560
71.2k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
13.4k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
13.4k
                                    .first.get()
563
13.4k
                                    ->template cast<SharedStateArg>();
564
565
13.4k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
13.4k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
13.4k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
57.8k
        } 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
56.6k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
56.6k
            _dependency = _shared_state->create_source_dependency(
576
56.6k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
56.6k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
56.6k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
56.6k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
1.12k
        }
584
71.2k
    }
585
586
71.2k
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
71.2k
    _rows_returned_counter =
591
71.2k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
71.2k
    _blocks_returned_counter =
593
71.2k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
71.2k
    _output_block_bytes_counter =
595
71.2k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
71.2k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
71.2k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
71.2k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
71.2k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
71.2k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
71.2k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
71.2k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
71.2k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
71.2k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
71.2k
    _memory_used_counter =
606
71.2k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
71.2k
    _common_profile->add_info_string("IsColocate",
608
71.2k
                                     std::to_string(_parent->is_colocated_operator()));
609
71.2k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
71.2k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
71.2k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
71.2k
    return Status::OK();
613
71.2k
}
_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
226k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
226k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
226k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
226k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
226k
    _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
226k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
226k
    _operator_profile->add_child(_common_profile.get(), true);
557
226k
    _operator_profile->add_child(_custom_profile.get(), true);
558
226k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
226k
    if constexpr (!is_fake_shared) {
560
226k
        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
226k
        } 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
214k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
214k
            _dependency = _shared_state->create_source_dependency(
576
214k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
214k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
214k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
214k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
11.3k
        }
584
226k
    }
585
586
226k
    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
226k
    _rows_returned_counter =
591
226k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
226k
    _blocks_returned_counter =
593
226k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
226k
    _output_block_bytes_counter =
595
226k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
226k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
226k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
226k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
226k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
226k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
226k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
226k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
226k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
226k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
226k
    _memory_used_counter =
606
226k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
226k
    _common_profile->add_info_string("IsColocate",
608
226k
                                     std::to_string(_parent->is_colocated_operator()));
609
226k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
226k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
226k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
226k
    return Status::OK();
613
226k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
25
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
25
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
25
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
25
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
25
    _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
25
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
25
    _operator_profile->add_child(_common_profile.get(), true);
557
25
    _operator_profile->add_child(_custom_profile.get(), true);
558
25
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
25
    if constexpr (!is_fake_shared) {
560
25
        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
25
        } 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
25
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
25
            _dependency = _shared_state->create_source_dependency(
576
25
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
25
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
25
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
25
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
0
        }
584
25
    }
585
586
25
    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
25
    _rows_returned_counter =
591
25
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
25
    _blocks_returned_counter =
593
25
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
25
    _output_block_bytes_counter =
595
25
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
25
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
25
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
25
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
25
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
25
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
25
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
25
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
25
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
25
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
25
    _memory_used_counter =
606
25
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
25
    _common_profile->add_info_string("IsColocate",
608
25
                                     std::to_string(_parent->is_colocated_operator()));
609
25
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
25
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
25
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
25
    return Status::OK();
613
25
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
6.42k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
6.42k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
6.42k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
6.42k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
6.42k
    _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.42k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
6.42k
    _operator_profile->add_child(_common_profile.get(), true);
557
6.42k
    _operator_profile->add_child(_custom_profile.get(), true);
558
6.42k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
6.42k
    if constexpr (!is_fake_shared) {
560
6.42k
        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.42k
        } 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.15k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
6.15k
            _dependency = _shared_state->create_source_dependency(
576
6.15k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
6.15k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
6.15k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
6.15k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
263
        }
584
6.42k
    }
585
586
6.42k
    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.42k
    _rows_returned_counter =
591
6.42k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
6.42k
    _blocks_returned_counter =
593
6.42k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
6.42k
    _output_block_bytes_counter =
595
6.42k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
6.42k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
6.42k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
6.42k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
6.42k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
6.42k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
6.42k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
6.42k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
6.42k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
6.42k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
6.42k
    _memory_used_counter =
606
6.42k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
6.42k
    _common_profile->add_info_string("IsColocate",
608
6.42k
                                     std::to_string(_parent->is_colocated_operator()));
609
6.42k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
6.42k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
6.42k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
6.42k
    return Status::OK();
613
6.42k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
8.87k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
8.87k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
8.87k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
8.87k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
8.87k
    _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.87k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
8.87k
    _operator_profile->add_child(_common_profile.get(), true);
557
8.87k
    _operator_profile->add_child(_custom_profile.get(), true);
558
8.87k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
8.87k
    if constexpr (!is_fake_shared) {
560
8.87k
        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.87k
        } 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.76k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
8.76k
            _dependency = _shared_state->create_source_dependency(
576
8.76k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
8.76k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
8.76k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
8.76k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
113
        }
584
8.87k
    }
585
586
8.87k
    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.87k
    _rows_returned_counter =
591
8.87k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
8.87k
    _blocks_returned_counter =
593
8.87k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
8.87k
    _output_block_bytes_counter =
595
8.87k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
8.87k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
8.87k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
8.87k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
8.87k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
8.87k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
8.87k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
8.87k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
8.87k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
8.87k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
8.87k
    _memory_used_counter =
606
8.87k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
8.87k
    _common_profile->add_info_string("IsColocate",
608
8.87k
                                     std::to_string(_parent->is_colocated_operator()));
609
8.87k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
8.87k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
8.87k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
8.87k
    return Status::OK();
613
8.87k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
88.4k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
88.4k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
88.4k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
88.4k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
88.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
88.4k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
88.4k
    _operator_profile->add_child(_common_profile.get(), true);
557
88.4k
    _operator_profile->add_child(_custom_profile.get(), true);
558
88.4k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
88.4k
    if constexpr (!is_fake_shared) {
560
88.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
88.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
86.6k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
86.6k
            _dependency = _shared_state->create_source_dependency(
576
86.6k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
86.6k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
86.6k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
86.6k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
1.82k
        }
584
88.4k
    }
585
586
88.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
88.4k
    _rows_returned_counter =
591
88.4k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
88.4k
    _blocks_returned_counter =
593
88.4k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
88.4k
    _output_block_bytes_counter =
595
88.4k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
88.4k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
88.4k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
88.4k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
88.4k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
88.4k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
88.4k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
88.4k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
88.4k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
88.4k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
88.4k
    _memory_used_counter =
606
88.4k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
88.4k
    _common_profile->add_info_string("IsColocate",
608
88.4k
                                     std::to_string(_parent->is_colocated_operator()));
609
88.4k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
88.4k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
88.4k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
88.4k
    return Status::OK();
613
88.4k
}
_ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
78.6k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
78.6k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
78.6k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
78.6k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
78.6k
    _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
78.6k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
78.6k
    _operator_profile->add_child(_common_profile.get(), true);
557
78.6k
    _operator_profile->add_child(_custom_profile.get(), true);
558
78.6k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
78.6k
    if constexpr (!is_fake_shared) {
560
78.6k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
78.6k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
78.6k
                                    .first.get()
563
78.6k
                                    ->template cast<SharedStateArg>();
564
565
78.6k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
78.6k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
78.6k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
78.6k
        } 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
32
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
32
        }
584
78.6k
    }
585
586
78.6k
    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
78.6k
    _rows_returned_counter =
591
78.6k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
78.6k
    _blocks_returned_counter =
593
78.6k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
78.6k
    _output_block_bytes_counter =
595
78.6k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
78.6k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
78.6k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
78.6k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
78.6k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
78.6k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
78.6k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
78.6k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
78.6k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
78.6k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
78.6k
    _memory_used_counter =
606
78.6k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
78.6k
    _common_profile->add_info_string("IsColocate",
608
78.6k
                                     std::to_string(_parent->is_colocated_operator()));
609
78.6k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
78.6k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
78.6k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
78.6k
    return Status::OK();
613
78.6k
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
40
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
40
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
40
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
40
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
40
    _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
40
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
40
    _operator_profile->add_child(_common_profile.get(), true);
557
40
    _operator_profile->add_child(_custom_profile.get(), true);
558
40
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
40
    if constexpr (!is_fake_shared) {
560
40
        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
40
        } 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
40
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
40
            _dependency = _shared_state->create_source_dependency(
576
40
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
40
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
40
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
40
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
0
        }
584
40
    }
585
586
40
    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
40
    _rows_returned_counter =
591
40
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
40
    _blocks_returned_counter =
593
40
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
40
    _output_block_bytes_counter =
595
40
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
40
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
40
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
40
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
40
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
40
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
40
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
40
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
40
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
40
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
40
    _memory_used_counter =
606
40
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
40
    _common_profile->add_info_string("IsColocate",
608
40
                                     std::to_string(_parent->is_colocated_operator()));
609
40
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
40
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
40
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
40
    return Status::OK();
613
40
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
950k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
950k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
950k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
950k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
950k
    _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
950k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
950k
    _operator_profile->add_child(_common_profile.get(), true);
557
950k
    _operator_profile->add_child(_custom_profile.get(), true);
558
950k
    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
950k
    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
950k
    _rows_returned_counter =
591
950k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
950k
    _blocks_returned_counter =
593
950k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
950k
    _output_block_bytes_counter =
595
950k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
950k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
950k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
950k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
950k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
950k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
950k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
950k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
950k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
950k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
950k
    _memory_used_counter =
606
950k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
950k
    _common_profile->add_info_string("IsColocate",
608
950k
                                     std::to_string(_parent->is_colocated_operator()));
609
950k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
950k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
950k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
950k
    return Status::OK();
613
950k
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
54.3k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
54.3k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
54.3k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
54.3k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
54.3k
    _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.3k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
54.3k
    _operator_profile->add_child(_common_profile.get(), true);
557
54.3k
    _operator_profile->add_child(_custom_profile.get(), true);
558
54.3k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
54.3k
    if constexpr (!is_fake_shared) {
560
54.3k
        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.3k
        } 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.52k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
4.52k
            _dependency = _shared_state->create_source_dependency(
576
4.52k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
4.52k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
4.52k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
49.8k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
49.8k
        }
584
54.3k
    }
585
586
54.3k
    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.3k
    _rows_returned_counter =
591
54.3k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
54.3k
    _blocks_returned_counter =
593
54.3k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
54.3k
    _output_block_bytes_counter =
595
54.3k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
54.3k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
54.3k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
54.3k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
54.3k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
54.3k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
54.3k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
54.3k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
54.3k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
54.3k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
54.3k
    _memory_used_counter =
606
54.3k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
54.3k
    _common_profile->add_info_string("IsColocate",
608
54.3k
                                     std::to_string(_parent->is_colocated_operator()));
609
54.3k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
54.3k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
54.3k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
54.3k
    return Status::OK();
613
54.3k
}
_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
5.97k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
5.97k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
5.97k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
5.97k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
5.97k
    _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.97k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
5.97k
    _operator_profile->add_child(_common_profile.get(), true);
557
5.97k
    _operator_profile->add_child(_custom_profile.get(), true);
558
5.97k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
5.97k
    if constexpr (!is_fake_shared) {
560
5.97k
        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.97k
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
5.89k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
5.89k
            _dependency = _shared_state->create_source_dependency(
576
5.89k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
5.89k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
5.89k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
5.89k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
80
        }
584
5.97k
    }
585
586
5.97k
    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.97k
    _rows_returned_counter =
591
5.97k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
5.97k
    _blocks_returned_counter =
593
5.97k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
5.97k
    _output_block_bytes_counter =
595
5.97k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
5.97k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
5.97k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
5.97k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
5.97k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
5.97k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
5.97k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
5.97k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
5.97k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
5.97k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
5.97k
    _memory_used_counter =
606
5.97k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
5.97k
    _common_profile->add_info_string("IsColocate",
608
5.97k
                                     std::to_string(_parent->is_colocated_operator()));
609
5.97k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
5.97k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
5.97k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
5.97k
    return Status::OK();
613
5.97k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
462
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
462
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
462
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
462
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
462
    _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
462
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
462
    _operator_profile->add_child(_common_profile.get(), true);
557
462
    _operator_profile->add_child(_custom_profile.get(), true);
558
462
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
462
    if constexpr (!is_fake_shared) {
560
462
        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
462
        } 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
442
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
442
            _dependency = _shared_state->create_source_dependency(
576
442
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
442
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
442
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
442
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
20
        }
584
462
    }
585
586
462
    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
462
    _rows_returned_counter =
591
462
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
462
    _blocks_returned_counter =
593
462
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
462
    _output_block_bytes_counter =
595
462
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
462
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
462
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
462
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
462
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
462
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
462
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
462
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
462
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
462
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
462
    _memory_used_counter =
606
462
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
462
    _common_profile->add_info_string("IsColocate",
608
462
                                     std::to_string(_parent->is_colocated_operator()));
609
462
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
462
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
462
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
462
    return Status::OK();
613
462
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
5.33k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
5.33k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
5.33k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
5.33k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
5.33k
    _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.33k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
5.33k
    _operator_profile->add_child(_common_profile.get(), true);
557
5.33k
    _operator_profile->add_child(_custom_profile.get(), true);
558
5.33k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
5.33k
    if constexpr (!is_fake_shared) {
560
5.33k
        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.33k
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
5.27k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
5.27k
            _dependency = _shared_state->create_source_dependency(
576
5.27k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
5.27k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
5.27k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
5.27k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
67
        }
584
5.33k
    }
585
586
5.33k
    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.33k
    _rows_returned_counter =
591
5.33k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
5.33k
    _blocks_returned_counter =
593
5.33k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
5.33k
    _output_block_bytes_counter =
595
5.33k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
5.33k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
5.33k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
5.33k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
5.33k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
5.33k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
5.33k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
5.33k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
5.33k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
5.33k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
5.33k
    _memory_used_counter =
606
5.33k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
5.33k
    _common_profile->add_info_string("IsColocate",
608
5.33k
                                     std::to_string(_parent->is_colocated_operator()));
609
5.33k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
5.33k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
5.33k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
5.33k
    return Status::OK();
613
5.33k
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
696k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
696k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
696k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
696k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
696k
    _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
696k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
696k
    _operator_profile->add_child(_common_profile.get(), true);
557
696k
    _operator_profile->add_child(_custom_profile.get(), true);
558
696k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
696k
    if constexpr (!is_fake_shared) {
560
696k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
683k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
683k
                                    .first.get()
563
683k
                                    ->template cast<SharedStateArg>();
564
565
683k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
683k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
683k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
683k
        } 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
13.5k
        } else {
580
13.5k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
13.5k
                DCHECK(false);
582
13.5k
            }
583
13.5k
        }
584
696k
    }
585
586
696k
    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
696k
    _rows_returned_counter =
591
696k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
696k
    _blocks_returned_counter =
593
696k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
696k
    _output_block_bytes_counter =
595
696k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
696k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
696k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
696k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
696k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
696k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
696k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
696k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
696k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
696k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
696k
    _memory_used_counter =
606
696k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
696k
    _common_profile->add_info_string("IsColocate",
608
696k
                                     std::to_string(_parent->is_colocated_operator()));
609
696k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
696k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
696k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
696k
    return Status::OK();
613
696k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
164
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
164
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
164
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
164
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
164
    _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
164
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
164
    _operator_profile->add_child(_common_profile.get(), true);
557
164
    _operator_profile->add_child(_custom_profile.get(), true);
558
164
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
164
    if constexpr (!is_fake_shared) {
560
164
        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
164
        } 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
164
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
164
            _dependency = _shared_state->create_source_dependency(
576
164
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
164
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
164
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
164
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
0
        }
584
164
    }
585
586
164
    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
164
    _rows_returned_counter =
591
164
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
164
    _blocks_returned_counter =
593
164
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
164
    _output_block_bytes_counter =
595
164
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
164
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
164
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
164
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
164
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
164
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
164
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
164
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
164
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
164
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
164
    _memory_used_counter =
606
164
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
164
    _common_profile->add_info_string("IsColocate",
608
164
                                     std::to_string(_parent->is_colocated_operator()));
609
164
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
164
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
164
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
164
    return Status::OK();
613
164
}
614
615
template <typename SharedStateArg>
616
2.20M
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
2.20M
    _conjuncts.resize(_parent->_conjuncts.size());
618
2.51M
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
301k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
301k
    }
621
2.20M
    if (_parent->has_projection()) {
622
379k
        const auto& projection = *_parent->_projection;
623
379k
        _projections.resize(projection.projections.size());
624
2.37M
        for (size_t i = 0; i < _projections.size(); i++) {
625
1.99M
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
1.99M
        }
627
379k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
395k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
15.8k
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
213k
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
197k
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
197k
                        state, _intermediate_projections[i][j]));
633
197k
            }
634
15.8k
        }
635
379k
    }
636
2.20M
    return Status::OK();
637
2.20M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
72.0k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
72.0k
    _conjuncts.resize(_parent->_conjuncts.size());
618
73.4k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
1.44k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
1.44k
    }
621
72.0k
    if (_parent->has_projection()) {
622
72.0k
        const auto& projection = *_parent->_projection;
623
72.0k
        _projections.resize(projection.projections.size());
624
400k
        for (size_t i = 0; i < _projections.size(); i++) {
625
328k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
328k
        }
627
72.0k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
78.5k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
6.54k
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
153k
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
147k
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
147k
                        state, _intermediate_projections[i][j]));
633
147k
            }
634
6.54k
        }
635
72.0k
    }
636
72.0k
    return Status::OK();
637
72.0k
}
_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
228k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
228k
    _conjuncts.resize(_parent->_conjuncts.size());
618
228k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
228k
    if (_parent->has_projection()) {
622
78
        const auto& projection = *_parent->_projection;
623
78
        _projections.resize(projection.projections.size());
624
396
        for (size_t i = 0; i < _projections.size(); i++) {
625
318
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
318
        }
627
78
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
78
        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
78
    }
636
228k
    return Status::OK();
637
228k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE4openEPNS_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_25NestedLoopJoinSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
6.54k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
6.54k
    _conjuncts.resize(_parent->_conjuncts.size());
618
6.62k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
81
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
81
    }
621
6.55k
    if (_parent->has_projection()) {
622
6.55k
        const auto& projection = *_parent->_projection;
623
6.55k
        _projections.resize(projection.projections.size());
624
30.5k
        for (size_t i = 0; i < _projections.size(); i++) {
625
23.9k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
23.9k
        }
627
6.55k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
6.59k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
45
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
420
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
375
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
375
                        state, _intermediate_projections[i][j]));
633
375
            }
634
45
        }
635
6.55k
    }
636
6.54k
    return Status::OK();
637
6.54k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
8.93k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
8.93k
    _conjuncts.resize(_parent->_conjuncts.size());
618
9.76k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
830
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
830
    }
621
8.93k
    if (_parent->has_projection()) {
622
4.83k
        const auto& projection = *_parent->_projection;
623
4.83k
        _projections.resize(projection.projections.size());
624
20.4k
        for (size_t i = 0; i < _projections.size(); i++) {
625
15.5k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
15.5k
        }
627
4.83k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
4.92k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
93
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
706
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
613
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
613
                        state, _intermediate_projections[i][j]));
633
613
            }
634
93
        }
635
4.83k
    }
636
8.93k
    return Status::OK();
637
8.93k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
88.6k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
88.6k
    _conjuncts.resize(_parent->_conjuncts.size());
618
90.1k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
1.52k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
1.52k
    }
621
88.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
132
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
794
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
662
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
662
                        state, _intermediate_projections[i][j]));
633
662
            }
634
132
        }
635
29.5k
    }
636
88.6k
    return Status::OK();
637
88.6k
}
_ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
78.6k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
78.6k
    _conjuncts.resize(_parent->_conjuncts.size());
618
78.6k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
21
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
21
    }
621
78.6k
    if (_parent->has_projection()) {
622
140
        const auto& projection = *_parent->_projection;
623
140
        _projections.resize(projection.projections.size());
624
652
        for (size_t i = 0; i < _projections.size(); i++) {
625
512
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
512
        }
627
140
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
142
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
2
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
15
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
13
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
13
                        state, _intermediate_projections[i][j]));
633
13
            }
634
2
        }
635
140
    }
636
78.6k
    return Status::OK();
637
78.6k
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
44
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
44
    _conjuncts.resize(_parent->_conjuncts.size());
618
44
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
44
    if (_parent->has_projection()) {
622
26
        const auto& projection = *_parent->_projection;
623
26
        _projections.resize(projection.projections.size());
624
78
        for (size_t i = 0; i < _projections.size(); i++) {
625
52
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
52
        }
627
26
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
26
        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
26
    }
636
44
    return Status::OK();
637
44
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
958k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
958k
    _conjuncts.resize(_parent->_conjuncts.size());
618
1.25M
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
297k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
297k
    }
621
958k
    if (_parent->has_projection()) {
622
254k
        const auto& projection = *_parent->_projection;
623
254k
        _projections.resize(projection.projections.size());
624
1.54M
        for (size_t i = 0; i < _projections.size(); i++) {
625
1.28M
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
1.28M
        }
627
254k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
263k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
8.88k
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
53.2k
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
44.3k
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
44.3k
                        state, _intermediate_projections[i][j]));
633
44.3k
            }
634
8.88k
        }
635
254k
    }
636
958k
    return Status::OK();
637
958k
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
54.7k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
54.7k
    _conjuncts.resize(_parent->_conjuncts.size());
618
54.7k
    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.7k
    if (_parent->has_projection()) {
622
11.4k
        const auto& projection = *_parent->_projection;
623
11.4k
        _projections.resize(projection.projections.size());
624
111k
        for (size_t i = 0; i < _projections.size(); i++) {
625
99.5k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
99.5k
        }
627
11.4k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
11.6k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
186
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
4.32k
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
4.13k
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
4.13k
                        state, _intermediate_projections[i][j]));
633
4.13k
            }
634
186
        }
635
11.4k
    }
636
54.7k
    return Status::OK();
637
54.7k
}
_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
5.97k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
5.97k
    _conjuncts.resize(_parent->_conjuncts.size());
618
6.43k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
468
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
468
    }
621
5.97k
    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
5.97k
    return Status::OK();
637
5.97k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
463
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
463
    _conjuncts.resize(_parent->_conjuncts.size());
618
463
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
463
    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
463
    return Status::OK();
637
463
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
5.34k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
5.34k
    _conjuncts.resize(_parent->_conjuncts.size());
618
5.34k
    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.34k
    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.34k
    return Status::OK();
637
5.34k
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
701k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
701k
    _conjuncts.resize(_parent->_conjuncts.size());
618
701k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
701k
    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
701k
    return Status::OK();
637
701k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE4openEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
164
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
164
    _conjuncts.resize(_parent->_conjuncts.size());
618
171
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
7
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
7
    }
621
164
    if (_parent->has_projection()) {
622
161
        const auto& projection = *_parent->_projection;
623
161
        _projections.resize(projection.projections.size());
624
480
        for (size_t i = 0; i < _projections.size(); i++) {
625
319
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
319
        }
627
161
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
164
        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
161
    }
636
164
    return Status::OK();
637
164
}
638
639
template <typename SharedStateArg>
640
6.88k
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
6.88k
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
6.88k
    _terminated = true;
645
6.88k
    return Status::OK();
646
6.88k
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
363
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
363
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
363
    _terminated = true;
645
363
    return Status::OK();
646
363
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
20
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
20
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
20
    _terminated = true;
645
20
    return Status::OK();
646
20
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
40
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
40
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
40
    _terminated = true;
645
40
    return Status::OK();
646
40
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
1
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
1
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
1
    _terminated = true;
645
1
    return Status::OK();
646
1
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
55
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
55
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
55
    _terminated = true;
645
55
    return Status::OK();
646
55
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE9terminateEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
5.39k
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
5.39k
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
5.39k
    _terminated = true;
645
5.39k
    return Status::OK();
646
5.39k
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
31
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
31
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
31
    _terminated = true;
645
31
    return Status::OK();
646
31
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
3
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
3
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
3
    _terminated = true;
645
3
    return Status::OK();
646
3
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
1
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
1
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
1
    _terminated = true;
645
1
    return Status::OK();
646
1
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
2
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
2
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
2
    _terminated = true;
645
2
    return Status::OK();
646
2
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
940
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
940
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
940
    _terminated = true;
645
940
    return Status::OK();
646
940
}
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.46M
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
2.46M
    if (_closed) {
651
258k
        return Status::OK();
652
258k
    }
653
2.20M
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
1.24M
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
1.24M
    }
656
2.20M
    _closed = true;
657
2.20M
    return Status::OK();
658
2.46M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
71.9k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
71.9k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
71.9k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
71.9k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
71.9k
    }
656
71.9k
    _closed = true;
657
71.9k
    return Status::OK();
658
71.9k
}
_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
451k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
451k
    if (_closed) {
651
227k
        return Status::OK();
652
227k
    }
653
224k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
224k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
224k
    }
656
224k
    _closed = true;
657
224k
    return Status::OK();
658
451k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
25
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
25
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
25
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
25
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
25
    }
656
25
    _closed = true;
657
25
    return Status::OK();
658
25
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
6.54k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
6.54k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
6.54k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
6.54k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
6.54k
    }
656
6.54k
    _closed = true;
657
6.54k
    return Status::OK();
658
6.54k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
18.0k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
18.0k
    if (_closed) {
651
9.10k
        return Status::OK();
652
9.10k
    }
653
8.92k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
8.92k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
8.92k
    }
656
8.92k
    _closed = true;
657
8.92k
    return Status::OK();
658
18.0k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
88.5k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
88.5k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
88.5k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
88.5k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
88.5k
    }
656
88.5k
    _closed = true;
657
88.5k
    return Status::OK();
658
88.5k
}
_ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
78.2k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
78.2k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
78.2k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
78.2k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
78.2k
    }
656
78.2k
    _closed = true;
657
78.2k
    return Status::OK();
658
78.2k
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
39
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
39
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
39
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
39
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
39
    }
656
39
    _closed = true;
657
39
    return Status::OK();
658
39
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
974k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
974k
    if (_closed) {
651
15.6k
        return Status::OK();
652
15.6k
    }
653
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
    }
656
959k
    _closed = true;
657
959k
    return Status::OK();
658
974k
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
54.7k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
54.7k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
54.7k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
54.7k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
54.7k
    }
656
54.7k
    _closed = true;
657
54.7k
    return Status::OK();
658
54.7k
}
_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
5.93k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
5.93k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
5.93k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
5.93k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
5.93k
    }
656
5.93k
    _closed = true;
657
5.93k
    return Status::OK();
658
5.93k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
717
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
717
    if (_closed) {
651
360
        return Status::OK();
652
360
    }
653
357
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
357
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
357
    }
656
357
    _closed = true;
657
357
    return Status::OK();
658
717
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
11.0k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
11.0k
    if (_closed) {
651
5.71k
        return Status::OK();
652
5.71k
    }
653
5.33k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
5.33k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
5.33k
    }
656
5.33k
    _closed = true;
657
5.33k
    return Status::OK();
658
11.0k
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
702k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
702k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
702k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
702k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
702k
    }
656
702k
    _closed = true;
657
702k
    return Status::OK();
658
702k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE5closeEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
321
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
321
    if (_closed) {
651
166
        return Status::OK();
652
166
    }
653
155
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
155
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
155
    }
656
155
    _closed = true;
657
155
    return Status::OK();
658
321
}
659
660
template <typename SharedState>
661
1.81M
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
1.81M
    _operator_profile =
664
1.81M
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
1.81M
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
1.81M
    _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.81M
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
1.81M
    _operator_profile->add_child(_common_profile, true);
673
1.81M
    _operator_profile->add_child(_custom_profile, true);
674
675
1.81M
    _operator_profile->set_metadata(_parent->node_id());
676
1.81M
    _wait_for_finish_dependency_timer =
677
1.81M
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
1.81M
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
1.81M
    if constexpr (!is_fake_shared) {
680
1.26M
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
1.26M
            info.shared_state_map.end()) {
682
344k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
251k
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
251k
            }
685
344k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
344k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
344k
                                                  ? 0
688
344k
                                                  : info.task_idx]
689
344k
                                  .get();
690
344k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
918k
        } else {
692
918k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
337
                DCHECK(false);
694
337
            }
695
918k
            _shared_state = info.shared_state->template cast<SharedState>();
696
918k
            _dependency = _shared_state->create_sink_dependency(
697
918k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
918k
        }
699
1.26M
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
1.26M
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
1.26M
    }
702
703
1.81M
    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.81M
    _rows_input_counter =
708
1.81M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
1.81M
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
1.81M
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
1.81M
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
1.81M
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
1.81M
    _memory_used_counter =
714
1.81M
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
1.81M
    _common_profile->add_info_string("IsColocate",
716
1.81M
                                     std::to_string(_parent->is_colocated_operator()));
717
1.81M
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
1.81M
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
1.81M
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
1.81M
    return Status::OK();
721
1.81M
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
119k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
119k
    _operator_profile =
664
119k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
119k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
119k
    _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
119k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
119k
    _operator_profile->add_child(_common_profile, true);
673
119k
    _operator_profile->add_child(_custom_profile, true);
674
675
119k
    _operator_profile->set_metadata(_parent->node_id());
676
119k
    _wait_for_finish_dependency_timer =
677
119k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
119k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
119k
    if constexpr (!is_fake_shared) {
680
119k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
119k
            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
14.2k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
14.2k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
14.2k
                                                  ? 0
688
14.2k
                                                  : info.task_idx]
689
14.2k
                                  .get();
690
14.2k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
105k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
105k
            _shared_state = info.shared_state->template cast<SharedState>();
696
105k
            _dependency = _shared_state->create_sink_dependency(
697
105k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
105k
        }
699
119k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
119k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
119k
    }
702
703
119k
    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
119k
    _rows_input_counter =
708
119k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
119k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
119k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
119k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
119k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
119k
    _memory_used_counter =
714
119k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
119k
    _common_profile->add_info_string("IsColocate",
716
119k
                                     std::to_string(_parent->is_colocated_operator()));
717
119k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
119k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
119k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
119k
    return Status::OK();
721
119k
}
_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
226k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
226k
    _operator_profile =
664
226k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
226k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
226k
    _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
226k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
226k
    _operator_profile->add_child(_common_profile, true);
673
226k
    _operator_profile->add_child(_custom_profile, true);
674
675
226k
    _operator_profile->set_metadata(_parent->node_id());
676
226k
    _wait_for_finish_dependency_timer =
677
226k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
226k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
226k
    if constexpr (!is_fake_shared) {
680
226k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
226k
            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
226k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
226k
            _shared_state = info.shared_state->template cast<SharedState>();
696
226k
            _dependency = _shared_state->create_sink_dependency(
697
226k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
226k
        }
699
226k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
226k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
226k
    }
702
703
226k
    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
226k
    _rows_input_counter =
708
226k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
226k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
226k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
226k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
226k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
226k
    _memory_used_counter =
714
226k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
226k
    _common_profile->add_info_string("IsColocate",
716
226k
                                     std::to_string(_parent->is_colocated_operator()));
717
226k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
226k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
226k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
226k
    return Status::OK();
721
226k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
32
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
32
    _operator_profile =
664
32
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
32
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
32
    _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
32
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
32
    _operator_profile->add_child(_common_profile, true);
673
32
    _operator_profile->add_child(_custom_profile, true);
674
675
32
    _operator_profile->set_metadata(_parent->node_id());
676
32
    _wait_for_finish_dependency_timer =
677
32
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
32
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
32
    if constexpr (!is_fake_shared) {
680
32
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
32
            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
32
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
32
            _shared_state = info.shared_state->template cast<SharedState>();
696
32
            _dependency = _shared_state->create_sink_dependency(
697
32
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
32
        }
699
32
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
32
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
32
    }
702
703
32
    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
32
    _rows_input_counter =
708
32
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
32
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
32
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
32
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
32
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
32
    _memory_used_counter =
714
32
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
32
    _common_profile->add_info_string("IsColocate",
716
32
                                     std::to_string(_parent->is_colocated_operator()));
717
32
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
32
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
32
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
32
    return Status::OK();
721
32
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
6.50k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
6.50k
    _operator_profile =
664
6.50k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
6.50k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
6.50k
    _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.50k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
6.50k
    _operator_profile->add_child(_common_profile, true);
673
6.50k
    _operator_profile->add_child(_custom_profile, true);
674
675
6.50k
    _operator_profile->set_metadata(_parent->node_id());
676
6.50k
    _wait_for_finish_dependency_timer =
677
6.50k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
6.50k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
6.50k
    if constexpr (!is_fake_shared) {
680
6.50k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
6.50k
            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.50k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
6.50k
            _shared_state = info.shared_state->template cast<SharedState>();
696
6.50k
            _dependency = _shared_state->create_sink_dependency(
697
6.50k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
6.50k
        }
699
6.50k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
6.50k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
6.50k
    }
702
703
6.50k
    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.50k
    _rows_input_counter =
708
6.50k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
6.50k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
6.50k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
6.50k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
6.50k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
6.50k
    _memory_used_counter =
714
6.50k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
6.50k
    _common_profile->add_info_string("IsColocate",
716
6.50k
                                     std::to_string(_parent->is_colocated_operator()));
717
6.50k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
6.50k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
6.50k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
6.50k
    return Status::OK();
721
6.50k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
8.90k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
8.90k
    _operator_profile =
664
8.90k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
8.90k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
8.90k
    _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.90k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
8.90k
    _operator_profile->add_child(_common_profile, true);
673
8.90k
    _operator_profile->add_child(_custom_profile, true);
674
675
8.90k
    _operator_profile->set_metadata(_parent->node_id());
676
8.90k
    _wait_for_finish_dependency_timer =
677
8.90k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
8.90k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
8.90k
    if constexpr (!is_fake_shared) {
680
8.90k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
8.90k
            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.90k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
8.90k
            _shared_state = info.shared_state->template cast<SharedState>();
696
8.90k
            _dependency = _shared_state->create_sink_dependency(
697
8.90k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
8.90k
        }
699
8.90k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
8.90k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
8.90k
    }
702
703
8.90k
    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.90k
    _rows_input_counter =
708
8.90k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
8.90k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
8.90k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
8.90k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
8.90k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
8.90k
    _memory_used_counter =
714
8.90k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
8.90k
    _common_profile->add_info_string("IsColocate",
716
8.90k
                                     std::to_string(_parent->is_colocated_operator()));
717
8.90k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
8.90k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
8.90k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
8.90k
    return Status::OK();
721
8.90k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
88.4k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
88.4k
    _operator_profile =
664
88.4k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
88.4k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
88.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
88.4k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
88.4k
    _operator_profile->add_child(_common_profile, true);
673
88.4k
    _operator_profile->add_child(_custom_profile, true);
674
675
88.4k
    _operator_profile->set_metadata(_parent->node_id());
676
88.4k
    _wait_for_finish_dependency_timer =
677
88.4k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
88.4k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
88.4k
    if constexpr (!is_fake_shared) {
680
88.4k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
88.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
88.4k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
88.4k
            _shared_state = info.shared_state->template cast<SharedState>();
696
88.4k
            _dependency = _shared_state->create_sink_dependency(
697
88.4k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
88.4k
        }
699
88.4k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
88.4k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
88.4k
    }
702
703
88.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
88.4k
    _rows_input_counter =
708
88.4k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
88.4k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
88.4k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
88.4k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
88.4k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
88.4k
    _memory_used_counter =
714
88.4k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
88.4k
    _common_profile->add_info_string("IsColocate",
716
88.4k
                                     std::to_string(_parent->is_colocated_operator()));
717
88.4k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
88.4k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
88.4k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
88.4k
    return Status::OK();
721
88.4k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
78.4k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
78.4k
    _operator_profile =
664
78.4k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
78.4k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
78.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
78.4k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
78.4k
    _operator_profile->add_child(_common_profile, true);
673
78.4k
    _operator_profile->add_child(_custom_profile, true);
674
675
78.4k
    _operator_profile->set_metadata(_parent->node_id());
676
78.4k
    _wait_for_finish_dependency_timer =
677
78.4k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
78.4k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
78.4k
    if constexpr (!is_fake_shared) {
680
78.4k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
78.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
78.5k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
78.5k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
78.5k
                                                  ? 0
688
78.5k
                                                  : info.task_idx]
689
78.5k
                                  .get();
690
78.5k
            _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
78.4k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
78.4k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
78.4k
    }
702
703
78.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
78.4k
    _rows_input_counter =
708
78.4k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
78.4k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
78.4k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
78.4k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
78.4k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
78.4k
    _memory_used_counter =
714
78.4k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
78.4k
    _common_profile->add_info_string("IsColocate",
716
78.4k
                                     std::to_string(_parent->is_colocated_operator()));
717
78.4k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
78.4k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
78.4k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
78.4k
    return Status::OK();
721
78.4k
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
50
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
50
    _operator_profile =
664
50
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
50
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
50
    _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
50
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
50
    _operator_profile->add_child(_common_profile, true);
673
50
    _operator_profile->add_child(_custom_profile, true);
674
675
50
    _operator_profile->set_metadata(_parent->node_id());
676
50
    _wait_for_finish_dependency_timer =
677
50
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
50
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
50
    if constexpr (!is_fake_shared) {
680
50
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
50
            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
50
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
50
            _shared_state = info.shared_state->template cast<SharedState>();
696
50
            _dependency = _shared_state->create_sink_dependency(
697
50
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
50
        }
699
50
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
50
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
50
    }
702
703
50
    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
50
    _rows_input_counter =
708
50
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
50
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
50
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
50
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
50
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
50
    _memory_used_counter =
714
50
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
50
    _common_profile->add_info_string("IsColocate",
716
50
                                     std::to_string(_parent->is_colocated_operator()));
717
50
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
50
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
50
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
50
    return Status::OK();
721
50
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
549k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
549k
    _operator_profile =
664
549k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
549k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
549k
    _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
549k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
549k
    _operator_profile->add_child(_common_profile, true);
673
549k
    _operator_profile->add_child(_custom_profile, true);
674
675
549k
    _operator_profile->set_metadata(_parent->node_id());
676
549k
    _wait_for_finish_dependency_timer =
677
549k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
549k
    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
549k
    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
549k
    _rows_input_counter =
708
549k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
549k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
549k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
549k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
549k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
549k
    _memory_used_counter =
714
549k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
549k
    _common_profile->add_info_string("IsColocate",
716
549k
                                     std::to_string(_parent->is_colocated_operator()));
717
549k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
549k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
549k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
549k
    return Status::OK();
721
549k
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
10.0k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
10.0k
    _operator_profile =
664
10.0k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
10.0k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
10.0k
    _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
10.0k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
10.0k
    _operator_profile->add_child(_common_profile, true);
673
10.0k
    _operator_profile->add_child(_custom_profile, true);
674
675
10.0k
    _operator_profile->set_metadata(_parent->node_id());
676
10.0k
    _wait_for_finish_dependency_timer =
677
10.0k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
10.0k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
10.0k
    if constexpr (!is_fake_shared) {
680
10.0k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
10.0k
            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
10.0k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
10.0k
            _shared_state = info.shared_state->template cast<SharedState>();
696
10.0k
            _dependency = _shared_state->create_sink_dependency(
697
10.0k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
10.0k
        }
699
10.0k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
10.0k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
10.0k
    }
702
703
10.0k
    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
10.0k
    _rows_input_counter =
708
10.0k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
10.0k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
10.0k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
10.0k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
10.0k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
10.0k
    _memory_used_counter =
714
10.0k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
10.0k
    _common_profile->add_info_string("IsColocate",
716
10.0k
                                     std::to_string(_parent->is_colocated_operator()));
717
10.0k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
10.0k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
10.0k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
10.0k
    return Status::OK();
721
10.0k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
459
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
459
    _operator_profile =
664
459
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
459
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
459
    _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
459
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
459
    _operator_profile->add_child(_common_profile, true);
673
459
    _operator_profile->add_child(_custom_profile, true);
674
675
459
    _operator_profile->set_metadata(_parent->node_id());
676
459
    _wait_for_finish_dependency_timer =
677
459
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
459
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
459
    if constexpr (!is_fake_shared) {
680
459
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
459
            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
459
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
459
            _shared_state = info.shared_state->template cast<SharedState>();
696
459
            _dependency = _shared_state->create_sink_dependency(
697
459
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
459
        }
699
459
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
459
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
459
    }
702
703
459
    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
459
    _rows_input_counter =
708
459
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
459
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
459
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
459
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
459
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
459
    _memory_used_counter =
714
459
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
459
    _common_profile->add_info_string("IsColocate",
716
459
                                     std::to_string(_parent->is_colocated_operator()));
717
459
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
459
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
459
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
459
    return Status::OK();
721
459
}
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
2.37k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
2.37k
    _operator_profile =
664
2.37k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
2.37k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
2.37k
    _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.37k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
2.37k
    _operator_profile->add_child(_common_profile, true);
673
2.37k
    _operator_profile->add_child(_custom_profile, true);
674
675
2.37k
    _operator_profile->set_metadata(_parent->node_id());
676
2.37k
    _wait_for_finish_dependency_timer =
677
2.37k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
2.37k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
2.37k
    if constexpr (!is_fake_shared) {
680
2.37k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
2.37k
            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.37k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
2.37k
            _shared_state = info.shared_state->template cast<SharedState>();
696
2.37k
            _dependency = _shared_state->create_sink_dependency(
697
2.37k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
2.37k
        }
699
2.37k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
2.37k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
2.37k
    }
702
703
2.37k
    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.37k
    _rows_input_counter =
708
2.37k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
2.37k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
2.37k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
2.37k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
2.37k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
2.37k
    _memory_used_counter =
714
2.37k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
2.37k
    _common_profile->add_info_string("IsColocate",
716
2.37k
                                     std::to_string(_parent->is_colocated_operator()));
717
2.37k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
2.37k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
2.37k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
2.37k
    return Status::OK();
721
2.37k
}
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
12.8k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
12.8k
    _operator_profile =
664
12.8k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
12.8k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
12.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
12.8k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
12.8k
    _operator_profile->add_child(_common_profile, true);
673
12.8k
    _operator_profile->add_child(_custom_profile, true);
674
675
12.8k
    _operator_profile->set_metadata(_parent->node_id());
676
12.8k
    _wait_for_finish_dependency_timer =
677
12.8k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
12.8k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
12.8k
    if constexpr (!is_fake_shared) {
680
12.8k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
12.8k
            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.8k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
12.8k
            _shared_state = info.shared_state->template cast<SharedState>();
696
12.8k
            _dependency = _shared_state->create_sink_dependency(
697
12.8k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
12.8k
        }
699
12.8k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
12.8k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
12.8k
    }
702
703
12.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
12.8k
    _rows_input_counter =
708
12.8k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
12.8k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
12.8k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
12.8k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
12.8k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
12.8k
    _memory_used_counter =
714
12.8k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
12.8k
    _common_profile->add_info_string("IsColocate",
716
12.8k
                                     std::to_string(_parent->is_colocated_operator()));
717
12.8k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
12.8k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
12.8k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
12.8k
    return Status::OK();
721
12.8k
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
252k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
252k
    _operator_profile =
664
252k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
252k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
252k
    _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
252k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
252k
    _operator_profile->add_child(_common_profile, true);
673
252k
    _operator_profile->add_child(_custom_profile, true);
674
675
252k
    _operator_profile->set_metadata(_parent->node_id());
676
252k
    _wait_for_finish_dependency_timer =
677
252k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
252k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
252k
    if constexpr (!is_fake_shared) {
680
252k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
252k
            info.shared_state_map.end()) {
682
251k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
251k
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
251k
            }
685
251k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
251k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
251k
                                                  ? 0
688
251k
                                                  : info.task_idx]
689
251k
                                  .get();
690
251k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
251k
        } else {
692
337
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
337
                DCHECK(false);
694
337
            }
695
337
            _shared_state = info.shared_state->template cast<SharedState>();
696
337
            _dependency = _shared_state->create_sink_dependency(
697
337
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
337
        }
699
252k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
252k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
252k
    }
702
703
252k
    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
252k
    _rows_input_counter =
708
252k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
252k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
252k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
252k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
252k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
252k
    _memory_used_counter =
714
252k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
252k
    _common_profile->add_info_string("IsColocate",
716
252k
                                     std::to_string(_parent->is_colocated_operator()));
717
252k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
252k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
252k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
252k
    return Status::OK();
721
252k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
456k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
456k
    _operator_profile =
664
456k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
456k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
456k
    _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
456k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
456k
    _operator_profile->add_child(_common_profile, true);
673
456k
    _operator_profile->add_child(_custom_profile, true);
674
675
456k
    _operator_profile->set_metadata(_parent->node_id());
676
456k
    _wait_for_finish_dependency_timer =
677
456k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
456k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
456k
    if constexpr (!is_fake_shared) {
680
456k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
456k
            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
456k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
456k
            _shared_state = info.shared_state->template cast<SharedState>();
696
456k
            _dependency = _shared_state->create_sink_dependency(
697
456k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
456k
        }
699
456k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
456k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
456k
    }
702
703
456k
    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
456k
    _rows_input_counter =
708
456k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
456k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
456k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
456k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
456k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
456k
    _memory_used_counter =
714
456k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
456k
    _common_profile->add_info_string("IsColocate",
716
456k
                                     std::to_string(_parent->is_colocated_operator()));
717
456k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
456k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
456k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
456k
    return Status::OK();
721
456k
}
_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
328
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
328
    _operator_profile =
664
328
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
328
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
328
    _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
328
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
328
    _operator_profile->add_child(_common_profile, true);
673
328
    _operator_profile->add_child(_custom_profile, true);
674
675
328
    _operator_profile->set_metadata(_parent->node_id());
676
328
    _wait_for_finish_dependency_timer =
677
328
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
328
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
328
    if constexpr (!is_fake_shared) {
680
328
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
328
            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
328
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
328
            _shared_state = info.shared_state->template cast<SharedState>();
696
328
            _dependency = _shared_state->create_sink_dependency(
697
328
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
328
        }
699
328
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
328
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
328
    }
702
703
328
    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
328
    _rows_input_counter =
708
328
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
328
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
328
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
328
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
328
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
328
    _memory_used_counter =
714
328
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
328
    _common_profile->add_info_string("IsColocate",
716
328
                                     std::to_string(_parent->is_colocated_operator()));
717
328
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
328
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
328
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
328
    return Status::OK();
721
328
}
722
723
template <typename SharedState>
724
1.81M
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
1.81M
    if (_closed) {
726
2
        return Status::OK();
727
2
    }
728
1.81M
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
1.26M
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
1.26M
    }
731
1.81M
    _closed = true;
732
1.81M
    return Status::OK();
733
1.81M
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
119k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
119k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
119k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
119k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
119k
    }
731
119k
    _closed = true;
732
119k
    return Status::OK();
733
119k
}
_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
227k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
227k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
227k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
227k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
227k
    }
731
227k
    _closed = true;
732
227k
    return Status::OK();
733
227k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
23
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
23
    if (_closed) {
726
2
        return Status::OK();
727
2
    }
728
21
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
21
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
21
    }
731
21
    _closed = true;
732
21
    return Status::OK();
733
23
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
6.48k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
6.48k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
6.48k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
6.48k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
6.48k
    }
731
6.48k
    _closed = true;
732
6.48k
    return Status::OK();
733
6.48k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
8.90k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
8.90k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
8.90k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
8.90k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
8.90k
    }
731
8.90k
    _closed = true;
732
8.90k
    return Status::OK();
733
8.90k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
88.3k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
88.3k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
88.3k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
88.3k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
88.3k
    }
731
88.3k
    _closed = true;
732
88.3k
    return Status::OK();
733
88.3k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
78.0k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
78.0k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
78.0k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
78.0k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
78.0k
    }
731
78.0k
    _closed = true;
732
78.0k
    return Status::OK();
733
78.0k
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
39
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
39
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
39
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
39
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
39
    }
731
39
    _closed = true;
732
39
    return Status::OK();
733
39
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
551k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
551k
    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
551k
    _closed = true;
732
551k
    return Status::OK();
733
551k
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
10.1k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
10.1k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
10.1k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
10.1k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
10.1k
    }
731
10.1k
    _closed = true;
732
10.1k
    return Status::OK();
733
10.1k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
358
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
358
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
358
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
358
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
358
    }
731
358
    _closed = true;
732
358
    return Status::OK();
733
358
}
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
2.41k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
2.41k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
2.41k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
2.41k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
2.41k
    }
731
2.41k
    _closed = true;
732
2.41k
    return Status::OK();
733
2.41k
}
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
12.9k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
12.9k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
12.9k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
12.9k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
12.9k
    }
731
12.9k
    _closed = true;
732
12.9k
    return Status::OK();
733
12.9k
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
253k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
253k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
253k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
253k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
253k
    }
731
253k
    _closed = true;
732
253k
    return Status::OK();
733
253k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
459k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
459k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
459k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
459k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
459k
    }
731
459k
    _closed = true;
732
459k
    return Status::OK();
733
459k
}
_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
328
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
328
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
328
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
328
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
328
    }
731
328
    _closed = true;
732
328
    return Status::OK();
733
328
}
734
735
template <typename LocalStateType>
736
Status StreamingOperatorX<LocalStateType>::get_block_impl(RuntimeState* state, Block* block,
737
3.33k
                                                          bool* eos) {
738
3.33k
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
739
3.33k
    return pull(state, block, eos);
740
3.33k
}
_ZN5doris18StreamingOperatorXINS_23AssertNumRowsLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
737
37
                                                          bool* eos) {
738
37
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
739
37
    return pull(state, block, eos);
740
37
}
_ZN5doris18StreamingOperatorXINS_16SelectLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
737
3.30k
                                                          bool* eos) {
738
3.30k
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
739
3.29k
    return pull(state, block, eos);
740
3.30k
}
741
742
template <typename LocalStateType>
743
Status StatefulOperatorX<LocalStateType>::get_block_impl(RuntimeState* state, Block* block,
744
596k
                                                         bool* eos) {
745
596k
    auto& local_state = get_local_state(state);
746
596k
    if (need_more_input_data(state)) {
747
566k
        local_state._child_block->clear_column_data(
748
566k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
566k
                        .num_materialized_slots());
750
566k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
566k
                state, local_state._child_block.get(), &local_state._child_eos));
752
566k
        *eos = local_state._child_eos;
753
566k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
57.3k
            return Status::OK();
755
57.3k
        }
756
509k
        {
757
509k
            SCOPED_TIMER(local_state.exec_time_counter());
758
509k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
509k
        }
760
509k
    }
761
762
539k
    if (!need_more_input_data(state)) {
763
511k
        SCOPED_TIMER(local_state.exec_time_counter());
764
511k
        bool new_eos = false;
765
511k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
511k
        if (new_eos) {
767
431k
            *eos = true;
768
431k
        } else if (!need_more_input_data(state)) {
769
22.4k
            *eos = false;
770
22.4k
        }
771
511k
    }
772
539k
    return Status::OK();
773
539k
}
_ZN5doris17StatefulOperatorXINS_23HashJoinProbeLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
143k
                                                         bool* eos) {
745
143k
    auto& local_state = get_local_state(state);
746
143k
    if (need_more_input_data(state)) {
747
126k
        local_state._child_block->clear_column_data(
748
126k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
126k
                        .num_materialized_slots());
750
126k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
126k
                state, local_state._child_block.get(), &local_state._child_eos));
752
126k
        *eos = local_state._child_eos;
753
126k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
35.7k
            return Status::OK();
755
35.7k
        }
756
90.2k
        {
757
90.2k
            SCOPED_TIMER(local_state.exec_time_counter());
758
90.2k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
90.2k
        }
760
90.2k
    }
761
762
107k
    if (!need_more_input_data(state)) {
763
107k
        SCOPED_TIMER(local_state.exec_time_counter());
764
107k
        bool new_eos = false;
765
107k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
107k
        if (new_eos) {
767
47.5k
            *eos = true;
768
60.3k
        } else if (!need_more_input_data(state)) {
769
9.34k
            *eos = false;
770
9.34k
        }
771
107k
    }
772
107k
    return Status::OK();
773
107k
}
Unexecuted instantiation: _ZN5doris17StatefulOperatorXINS_34PartitionedHashJoinProbeLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
_ZN5doris17StatefulOperatorXINS_16RepeatLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
4.55k
                                                         bool* eos) {
745
4.55k
    auto& local_state = get_local_state(state);
746
4.55k
    if (need_more_input_data(state)) {
747
2.63k
        local_state._child_block->clear_column_data(
748
2.63k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
2.63k
                        .num_materialized_slots());
750
2.63k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
2.63k
                state, local_state._child_block.get(), &local_state._child_eos));
752
2.63k
        *eos = local_state._child_eos;
753
2.63k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
578
            return Status::OK();
755
578
        }
756
2.05k
        {
757
2.05k
            SCOPED_TIMER(local_state.exec_time_counter());
758
2.05k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
2.05k
        }
760
2.05k
    }
761
762
3.98k
    if (!need_more_input_data(state)) {
763
3.98k
        SCOPED_TIMER(local_state.exec_time_counter());
764
3.98k
        bool new_eos = false;
765
3.98k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
3.98k
        if (new_eos) {
767
1.41k
            *eos = true;
768
2.56k
        } else if (!need_more_input_data(state)) {
769
1.91k
            *eos = false;
770
1.91k
        }
771
3.98k
    }
772
3.98k
    return Status::OK();
773
3.98k
}
_ZN5doris17StatefulOperatorXINS_25MaterializationLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
1.85k
                                                         bool* eos) {
745
1.85k
    auto& local_state = get_local_state(state);
746
1.85k
    if (need_more_input_data(state)) {
747
1.85k
        local_state._child_block->clear_column_data(
748
1.85k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
1.85k
                        .num_materialized_slots());
750
1.85k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
1.85k
                state, local_state._child_block.get(), &local_state._child_eos));
752
1.85k
        *eos = local_state._child_eos;
753
1.85k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
774
            return Status::OK();
755
774
        }
756
1.07k
        {
757
1.07k
            SCOPED_TIMER(local_state.exec_time_counter());
758
1.07k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
1.07k
        }
760
1.07k
    }
761
762
1.07k
    if (!need_more_input_data(state)) {
763
1.07k
        SCOPED_TIMER(local_state.exec_time_counter());
764
1.07k
        bool new_eos = false;
765
1.07k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
1.07k
        if (new_eos) {
767
786
            *eos = true;
768
786
        } else if (!need_more_input_data(state)) {
769
0
            *eos = false;
770
0
        }
771
1.07k
    }
772
1.07k
    return Status::OK();
773
1.07k
}
_ZN5doris17StatefulOperatorXINS_22StreamingAggLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
14.4k
                                                         bool* eos) {
745
14.4k
    auto& local_state = get_local_state(state);
746
14.4k
    if (need_more_input_data(state)) {
747
14.4k
        local_state._child_block->clear_column_data(
748
14.4k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
14.4k
                        .num_materialized_slots());
750
14.4k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
14.4k
                state, local_state._child_block.get(), &local_state._child_eos));
752
14.4k
        *eos = local_state._child_eos;
753
14.4k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
2.81k
            return Status::OK();
755
2.81k
        }
756
11.5k
        {
757
11.5k
            SCOPED_TIMER(local_state.exec_time_counter());
758
11.5k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
11.5k
        }
760
11.5k
    }
761
762
11.5k
    if (!need_more_input_data(state)) {
763
6.10k
        SCOPED_TIMER(local_state.exec_time_counter());
764
6.10k
        bool new_eos = false;
765
6.10k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
6.10k
        if (new_eos) {
767
6.03k
            *eos = true;
768
6.03k
        } else if (!need_more_input_data(state)) {
769
6
            *eos = false;
770
6
        }
771
6.10k
    }
772
11.5k
    return Status::OK();
773
11.5k
}
_ZN5doris17StatefulOperatorXINS_30DistinctStreamingAggLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
403k
                                                         bool* eos) {
745
403k
    auto& local_state = get_local_state(state);
746
404k
    if (need_more_input_data(state)) {
747
404k
        local_state._child_block->clear_column_data(
748
404k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
404k
                        .num_materialized_slots());
750
404k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
404k
                state, local_state._child_block.get(), &local_state._child_eos));
752
404k
        *eos = local_state._child_eos;
753
404k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
15.9k
            return Status::OK();
755
15.9k
        }
756
388k
        {
757
388k
            SCOPED_TIMER(local_state.exec_time_counter());
758
388k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
388k
        }
760
388k
    }
761
762
387k
    if (!need_more_input_data(state)) {
763
365k
        SCOPED_TIMER(local_state.exec_time_counter());
764
365k
        bool new_eos = false;
765
365k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
365k
        if (new_eos) {
767
364k
            *eos = true;
768
364k
        } else if (!need_more_input_data(state)) {
769
0
            *eos = false;
770
0
        }
771
365k
    }
772
387k
    return Status::OK();
773
387k
}
_ZN5doris17StatefulOperatorXINS_29NestedLoopJoinProbeLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
21.7k
                                                         bool* eos) {
745
21.7k
    auto& local_state = get_local_state(state);
746
21.7k
    if (need_more_input_data(state)) {
747
10.9k
        local_state._child_block->clear_column_data(
748
10.9k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
10.9k
                        .num_materialized_slots());
750
10.9k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
10.9k
                state, local_state._child_block.get(), &local_state._child_eos));
752
10.9k
        *eos = local_state._child_eos;
753
10.9k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
569
            return Status::OK();
755
569
        }
756
10.4k
        {
757
10.4k
            SCOPED_TIMER(local_state.exec_time_counter());
758
10.4k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
10.4k
        }
760
10.4k
    }
761
762
21.1k
    if (!need_more_input_data(state)) {
763
20.5k
        SCOPED_TIMER(local_state.exec_time_counter());
764
20.5k
        bool new_eos = false;
765
20.5k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
20.5k
        if (new_eos) {
767
6.51k
            *eos = true;
768
14.0k
        } else if (!need_more_input_data(state)) {
769
10.7k
            *eos = false;
770
10.7k
        }
771
20.5k
    }
772
21.1k
    return Status::OK();
773
21.1k
}
_ZN5doris17StatefulOperatorXINS_23TableFunctionLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
7.01k
                                                         bool* eos) {
745
7.01k
    auto& local_state = get_local_state(state);
746
7.01k
    if (need_more_input_data(state)) {
747
6.65k
        local_state._child_block->clear_column_data(
748
6.65k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
6.65k
                        .num_materialized_slots());
750
6.65k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
6.65k
                state, local_state._child_block.get(), &local_state._child_eos));
752
6.65k
        *eos = local_state._child_eos;
753
6.65k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
806
            return Status::OK();
755
806
        }
756
5.84k
        {
757
5.84k
            SCOPED_TIMER(local_state.exec_time_counter());
758
5.84k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
5.84k
        }
760
5.84k
    }
761
762
6.20k
    if (!need_more_input_data(state)) {
763
6.20k
        SCOPED_TIMER(local_state.exec_time_counter());
764
6.20k
        bool new_eos = false;
765
6.20k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
6.20k
        if (new_eos) {
767
4.17k
            *eos = true;
768
4.17k
        } else if (!need_more_input_data(state)) {
769
366
            *eos = false;
770
366
        }
771
6.20k
    }
772
6.20k
    return Status::OK();
773
6.20k
}
774
775
template <typename Writer, typename Parent>
776
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
777
45.6k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
778
45.6k
    RETURN_IF_ERROR(Base::init(state, info));
779
45.6k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
780
45.6k
                                                         "AsyncWriterDependency", true);
781
45.6k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
782
45.6k
                             _finish_dependency));
783
784
45.6k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
785
45.6k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
786
45.6k
    return Status::OK();
787
45.6k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
777
359
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
778
359
    RETURN_IF_ERROR(Base::init(state, info));
779
359
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
780
359
                                                         "AsyncWriterDependency", true);
781
359
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
782
359
                             _finish_dependency));
783
784
359
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
785
359
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
786
359
    return Status::OK();
787
359
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
777
45.2k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
778
45.2k
    RETURN_IF_ERROR(Base::init(state, info));
779
45.2k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
780
45.2k
                                                         "AsyncWriterDependency", true);
781
45.2k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
782
45.2k
                             _finish_dependency));
783
784
45.2k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
785
45.2k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
786
45.2k
    return Status::OK();
787
45.2k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
777
12
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
778
12
    RETURN_IF_ERROR(Base::init(state, info));
779
12
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
780
12
                                                         "AsyncWriterDependency", true);
781
12
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
782
12
                             _finish_dependency));
783
784
12
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
785
12
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
786
12
    return Status::OK();
787
12
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VHiveTableWriterENS_22HiveTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_25IcebergTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_30SpillIcebergTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_18VIcebergDeleteSinkENS_26IcebergDeleteSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_17VIcebergMergeSinkENS_25IcebergMergeSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_14VMCTableWriterENS_20MCTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_15VTVFTableWriterENS_21TVFTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
788
789
template <typename Writer, typename Parent>
790
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
791
46.3k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
792
46.3k
    RETURN_IF_ERROR(Base::open(state));
793
46.3k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
794
361k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
795
315k
        RETURN_IF_ERROR(
796
315k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
797
315k
    }
798
46.3k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
799
46.3k
    return Status::OK();
800
46.3k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
791
361
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
792
361
    RETURN_IF_ERROR(Base::open(state));
793
361
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
794
1.86k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
795
1.50k
        RETURN_IF_ERROR(
796
1.50k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
797
1.50k
    }
798
361
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
799
361
    return Status::OK();
800
361
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4openEPNS_12RuntimeStateE
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
791
45.9k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
792
45.9k
    RETURN_IF_ERROR(Base::open(state));
793
45.9k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
794
359k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
795
313k
        RETURN_IF_ERROR(
796
313k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
797
313k
    }
798
45.9k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
799
45.9k
    return Status::OK();
800
45.9k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
791
12
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
792
12
    RETURN_IF_ERROR(Base::open(state));
793
12
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
794
216
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
795
204
        RETURN_IF_ERROR(
796
204
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
797
204
    }
798
12
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
799
12
    return Status::OK();
800
12
}
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
60.9k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
805
60.9k
    return _writer->sink(block, eos);
806
60.9k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
804
1.19k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
805
1.19k
    return _writer->sink(block, eos);
806
1.19k
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
804
59.7k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
805
59.7k
    return _writer->sink(block, eos);
806
59.7k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
804
12
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
805
12
    return _writer->sink(block, eos);
806
12
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VHiveTableWriterENS_22HiveTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_25IcebergTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_30SpillIcebergTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_18VIcebergDeleteSinkENS_26IcebergDeleteSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_17VIcebergMergeSinkENS_25IcebergMergeSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_14VMCTableWriterENS_20MCTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_15VTVFTableWriterENS_21TVFTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
807
808
template <typename Writer, typename Parent>
809
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
810
46.3k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
811
46.3k
    if (_closed) {
812
0
        return Status::OK();
813
0
    }
814
46.3k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
815
46.3k
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
816
    // if the init failed, the _writer may be nullptr. so here need check
817
46.4k
    if (_writer) {
818
46.4k
        Status st = _writer->get_writer_status();
819
46.4k
        if (exec_status.ok()) {
820
46.3k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
821
46.3k
                                                       : Status::Cancelled("force close"));
822
46.3k
        } else {
823
60
            _writer->force_close(exec_status);
824
60
        }
825
        // If there is an error in process_block thread, then we should get the writer
826
        // status before call force_close. For example, the thread may failed in commit
827
        // transaction.
828
46.4k
        RETURN_IF_ERROR(st);
829
46.4k
    }
830
46.3k
    return Base::close(state, exec_status);
831
46.3k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
810
349
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
811
349
    if (_closed) {
812
0
        return Status::OK();
813
0
    }
814
349
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
815
349
    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
349
    if (_writer) {
818
349
        Status st = _writer->get_writer_status();
819
349
        if (exec_status.ok()) {
820
349
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
821
349
                                                       : Status::Cancelled("force close"));
822
349
        } 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
349
        RETURN_IF_ERROR(st);
829
349
    }
830
349
    return Base::close(state, exec_status);
831
349
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
810
46.0k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
811
46.0k
    if (_closed) {
812
0
        return Status::OK();
813
0
    }
814
46.0k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
815
46.0k
    COUNTER_SET(_wait_for_finish_dependency_timer, _finish_dependency->watcher_elapse_time());
816
    // if the init failed, the _writer may be nullptr. so here need check
817
46.0k
    if (_writer) {
818
46.0k
        Status st = _writer->get_writer_status();
819
46.0k
        if (exec_status.ok()) {
820
46.0k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
821
46.0k
                                                       : Status::Cancelled("force close"));
822
46.0k
        } else {
823
60
            _writer->force_close(exec_status);
824
60
        }
825
        // If there is an error in process_block thread, then we should get the writer
826
        // status before call force_close. For example, the thread may failed in commit
827
        // transaction.
828
46.0k
        RETURN_IF_ERROR(st);
829
46.0k
    }
830
45.9k
    return Base::close(state, exec_status);
831
46.0k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
810
12
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
811
12
    if (_closed) {
812
0
        return Status::OK();
813
0
    }
814
12
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
815
12
    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
12
    if (_writer) {
818
12
        Status st = _writer->get_writer_status();
819
12
        if (exec_status.ok()) {
820
12
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
821
12
                                                       : Status::Cancelled("force close"));
822
12
        } 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
12
        RETURN_IF_ERROR(st);
829
12
    }
830
12
    return Base::close(state, exec_status);
831
12
}
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