Coverage Report

Created: 2026-10-26 21:38

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