Skip to main content

vector_matching

Function vector_matching 

Source
fn vector_matching(binary: &BinaryExpr, op: BinaryOp) -> Result<BinaryMatching>
Expand description

The matching a vector–vector operation records.

Each part is read from the modifier the query wrote, and a modifier it did not write is the default PromQL applies: every label but __name__ matches (ignoring nothing), and the cardinality is one-to-one. Fill fields retain the parser’s left/right values, which name the sides as written: the kernel swaps them together with the operands under group_right.

ManyToMany is the cardinality of a set operator, which binary_operation compiles before asking for a matching, so reaching it means the two disagree; it is reported as a shape with no node rather than panicking on a path a query cannot take today.