Coverage Report

Created: 2026-08-02 21:00

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