From a53d4471a7f5beecad4b303d8376ad856dd620b0 Mon Sep 17 00:00:00 2001 From: discord9 <55937128+discord9@users.noreply.github.com> Date: Mon, 12 Oct 2026 18:15:43 +0800 Subject: [PATCH] fix(promql): retain deterministic set matching labels Signed-off-by: discord9 <55937128+discord9@users.noreply.github.com> --- src/query/src/promql/planner/set_operator.rs | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/query/src/promql/planner/set_operator.rs b/src/query/src/promql/planner/set_operator.rs index 8bebafa66b6..111b19ccf23 100644 --- a/src/query/src/promql/planner/set_operator.rs +++ b/src/query/src/promql/planner/set_operator.rs @@ -737,13 +737,9 @@ impl PromPlanner { // The marked identity is not a label the default matching compares, and the whole set // operation keeps the left operand's columns and its identity. let left_tag_col_set = - Self::matching_tag_columns(&left_context, modifier, metric_name.as_deref()) - .into_iter() - .collect::>(); + Self::matching_tag_columns(&left_context, modifier, metric_name.as_deref()); let right_tag_col_set = - Self::matching_tag_columns(&right_context, modifier, metric_name.as_deref()) - .into_iter() - .collect::>(); + Self::matching_tag_columns(&right_context, modifier, metric_name.as_deref()); ensure!( left_tag_col_set == right_tag_col_set, CombineTableColumnMismatchSnafu {