Match
match is RQL's multi-way branch. It is an expression: it selects one arm, evaluates it, and produces that value - in a let binding, in a map projection, anywhere an expression fits. Where if/else answers a yes/no question, match replaces a ladder of them.
Value match
The first form compares one value against literal arms. else is the catch-all; with it, the expression always produces a value:
Searched match
The second form has no scrutinee - each arm is a full boolean condition. This is the shape for ranges and anything else that is not a simple equality:
Arms are checked top to bottom and the first true one wins, so order them from most specific to least. A broad condition listed first silently shadows everything below it:
Classifying rows
Both forms work per row inside a pipeline - reference columns directly in the arms. This is the workhorse for bucketing and labeling:
Match inside map and extend is covered from the pipeline side in Transforms: Match.
match and none
Value-match arms compare by equality, and equality against none never matches - not even a literal none arm. The arm below is dead code; the row with the missing score falls through to else and you never see "missing":
To branch on missingness, use a searched match with an is::none arm - it always returns a definite true or false, which also makes this the idiom for substituting defaults:
match when there are three or more outcomes, or when the arms are a value's known cases.