Repository: prometheus/prometheus (language: go)

Issue:
Can not explain "up and up"
### What did you do?

Tried the Explain feature with Up and Up

### What did you expect to see?

up and up explained

### What did you see instead? Under which circumstances?

![up](https://github.com/user-attachments/assets/cfea8ac4-7442-42a1-b69a-6e3dab43b384)


### System information

_No response_

### Prometheus version

```text
main
```


### Prometheus configuration file

_No response_

### Alertmanager version

_No response_

### Alertmanager configuration file

_No response_

### Logs

_No response_


Discussion / hints:

Fix patch:
diff --git a/web/ui/mantine-ui/src/promql/binOp.ts b/web/ui/mantine-ui/src/promql/binOp.ts
index 17b52ac1ec8..525f543ad08 100644
--- a/web/ui/mantine-ui/src/promql/binOp.ts
+++ b/web/ui/mantine-ui/src/promql/binOp.ts
@@ -8,7 +8,7 @@ import {
   vectorMatchCardinality,
   VectorMatching,
 } from "./ast";
-import { isComparisonOperator } from "./utils";
+import { isComparisonOperator, isSetOperator } from "./utils";
 
 // We use a special (otherwise invalid) sample value to indicate that
 // a sample has been filtered away by a comparison operator.
@@ -340,6 +340,11 @@ export const computeVectorVectorBinOp = (
 
   // Annotate the match groups with errors (if any) and populate the results.
   Object.values(groups).forEach((mg) => {
+    // Do not populate results for set operators.
+    if (isSetOperator(op)) {
+        return;
+    }
+
     if (matching.card === vectorMatchCardinality.oneToOne) {
       if (mg.lhs.length > 1 && mg.rhs.length > 1) {
         mg.error = { type: MatchErrorType.multipleMatchesOnBothSides };


Test patch: