Beam SQL extensions: Joins
Supported JOIN types in Beam SQL:
INNER,LEFT OUTER,RIGHT OUTER- Only equijoins (where join condition is an equality check) are supported
Unsupported JOIN types in Beam SQL:
CROSS JOINis not supported (full cartesian product with noONclause)FULL OUTER JOINis not supported (combination ofLEFT OUTERandRIGHT OUTERjoins)
The scenarios of join can be categorized into 3 cases:
- Bounded input
JOINbounded input - Unbounded input
JOINunbounded input - Unbounded input
JOINbounded input
Bounded JOIN Bounded
Standard join implementation is used. All elements from one input are matched with all elements from another input. Due to the fact that both inputs are bounded, no windowing or triggering is involved.
Unbounded JOIN Unbounded
Standard join implementation is used. All elements from one input are matched with all elements from another input.
Windowing and Triggering
The following properties must be satisfied when joining unbounded inputs:
- Inputs must have compatible windows, otherwise
IllegalArgumentExceptionwill be thrown. - Triggers on each input should only fire once per window. Currently this
means that the only supported trigger in this case is
DefaultTriggerwith zero allowed lateness. Using any other trigger will result inUnsupportedOperationExceptionthrown.
This means that inputs are joined per-window. That is, when the trigger fires (only once), then join is performed on all elements in the current window in both inputs. This allows to reason about what kind of output is going to be produced.
Note: similarly to GroupByKeys JOIN will update triggers using
Trigger.continuationTrigger(). Other aspects of the inputs’ windowing
strategies remain unchanged.
Unbounded JOIN Bounded
For this type of JOIN bounded input is treated as a side-input by the
implementation. This means that window/trigger is inherited from upstreams.

