Coverage Report

Created: 2026-03-24 14:21

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