Browse Source

Clarify binary operator output label sets (#5512)

* Clarify binary operator output label sets

Signed-off-by: Julius Volz <julius.volz@gmail.com>

* Clarify binary op output labels further

Signed-off-by: Julius Volz <julius.volz@gmail.com>
pull/5520/head
Julius Volz 6 years ago committed by GitHub
parent
commit
f04b1b5559
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 11
      docs/querying/operators.md

11
docs/querying/operators.md

@ -35,9 +35,10 @@ the original vector is multiplied by 2.
**Between two instant vectors**, a binary arithmetic operator is applied to
each entry in the left-hand side vector and its [matching element](#vector-matching)
in the right-hand vector. The result is propagated into the result vector and the metric
name is dropped. Entries for which no matching entry in the right-hand vector can be
found are not part of the result.
in the right-hand vector. The result is propagated into the result vector with the
grouping labels becoming the output label set. The metric name is dropped. Entries
for which no matching entry in the right-hand vector can be found are not part of
the result.
### Comparison binary operators
@ -69,10 +70,10 @@ modifier is provided, vector elements that would be dropped instead have the val
applied to matching entries. Vector elements for which the expression is not
true or which do not find a match on the other side of the expression get
dropped from the result, while the others are propagated into a result vector
with their original (left-hand side) metric names and label values.
with the grouping labels becoming the output label set.
If the `bool` modifier is provided, vector elements that would have been
dropped instead have the value `0` and vector elements that would be kept have
the value `1` with the left-hand side label values.
the value `1`, with the grouping labels again becoming the output label set.
### Logical/set binary operators

Loading…
Cancel
Save