Skip to content

Commit

Permalink
Document differences between join operator and SQL join (#5645)
Browse files Browse the repository at this point in the history
Signed-off-by: Ben Sherman <[email protected]>
Co-authored-by: Chris Hakkaart <[email protected]>
  • Loading branch information
bentsherman and christopher-hakkaart authored Jan 7, 2025
1 parent 465c0d5 commit 3643c54
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion docs/reference/operator.md
Original file line number Diff line number Diff line change
Expand Up @@ -718,7 +718,7 @@ See also: {ref}`channel-empty` channel factory

The `join` operator emits the inner product of two source channels using a matching key.

To be more precise, the operator transforms a sequence of tuples like *(K, V1, V2, ..)* and *(K, W1, W1, ..)* into a sequence of tuples like *(K, V1, V2, .., W1, W2, ..)*. It is equivalent to an *inner join* in SQL, or an *outer join* when `remainder` is `true`.
To be more precise, the operator transforms a sequence of tuples like *(K, V1, V2, ..)* and *(K, W1, W1, ..)* into a sequence of tuples like *(K, V1, V2, .., W1, W2, ..)*.

For example:

Expand All @@ -742,6 +742,10 @@ By default, unmatched items are discarded. The `remainder` option can be used to
:language: console
```

:::{note}
The `join` operator is similar to an SQL *inner join*, or an SQL *outer join* when `remainder` is `true`. The only difference is that `join` does not support duplicate keys, whereas an SQL join produces the cross-product of duplicate keys. The `combine` operator with the `by` option is equivalent to an SQL join.
:::

Available options:

`by`
Expand Down

0 comments on commit 3643c54

Please sign in to comment.