Coverage Report

Created: 2026-05-14 03:26

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