This is an automated email from the ASF dual-hosted git repository.
gabriellee pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push:
new fa5dd61563f [feature](pipelineX) operator id use negative numbers
(#25529)
fa5dd61563f is described below
commit fa5dd61563feda9b0f3b9a8a9640ea6325b04282
Author: Mryange <[email protected]>
AuthorDate: Thu Oct 19 19:27:44 2023 +0800
[feature](pipelineX) operator id use negative numbers (#25529)
---
be/src/pipeline/pipeline_x/pipeline_x_fragment_context.h | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/be/src/pipeline/pipeline_x/pipeline_x_fragment_context.h
b/be/src/pipeline/pipeline_x/pipeline_x_fragment_context.h
index ab59178aea8..3219b3d1070 100644
--- a/be/src/pipeline/pipeline_x/pipeline_x_fragment_context.h
+++ b/be/src/pipeline/pipeline_x/pipeline_x_fragment_context.h
@@ -111,7 +111,7 @@ public:
}
}
- int next_operator_id() { return _operator_id++; }
+ int next_operator_id() { return --_operator_id; }
private:
void _close_action() override;
@@ -172,9 +172,10 @@ private:
// TODO: Unify `_union_child_pipelines`, `_set_child_pipelines`,
`_build_side_pipelines`.
std::map<int, std::vector<PipelinePtr>> _union_child_pipelines;
std::map<int, std::vector<PipelinePtr>> _set_child_pipelines;
- // The number of operators is generally greater than the number of plan
nodes,
- // so we need additional ID and cannot rely solely on plan node ID.
- int _operator_id = {1000000};
+ // We can guarantee that a plan node ID can correspond to an operator ID,
+ // but some operators do not have a corresponding plan node ID.
+ // We set these IDs as negative numbers, which are not visible to the user.
+ int _operator_id = -1;
};
} // namespace pipeline
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]