Coverage Report

Created: 2026-10-20 11:17

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