Class QualifiedRow
- All Implemented Interfaces:
Row
When the two join inputs share a column name (e.g. both sides expose
k), the flat concatenated schema must rename one of them, which loses
the association between the predicate's qualifier and the intended side. A
plain ArrayRow can only resolve such
a name to its first positional match, so A.k = B.k would compare
A.k against itself. This view instead resolves an ambiguous bare name
by its qualifier: B.k is routed to the right input when B is a
relation reachable on the right side (and not the left), and vice versa.
Resolution rules for get(String):
- If the bare column name exists in exactly one input, that side is used (the qualifier, if any, is irrelevant).
- If it exists in both inputs, the qualifier selects the side: a qualifier that names a relation on exactly one side wins.
- If still ambiguous (no qualifier, or a qualifier present on both/neither side), the left input is used — preserving the historical behaviour.
Ahead of all three sits one further case: a qualifier that names no relation under either input, but does name a nested column under exactly one. That is a struct path rather than a qualified reference, and it is routed to the side whose schema resolves it. The ordering is what keeps the two apart — a qualifier that really is a relation in scope never reaches this step, so every case the rules above describe behaves exactly as it did.
Output rows are not built from this view; operators continue to emit
flat ArrayRows so downstream value-equality (distinct, set operations)
is unaffected. This view exists only for the lifetime of a single condition
evaluation.
Public so the provenance evaluator can reuse it for the same qualifier-aware theta-join condition evaluation.
-
Constructor Details
-
QualifiedRow
-
-
Method Details
-
schema
Description copied from interface:RowReturns the schema that describes this row's columns. -
get
Description copied from interface:RowReturns the value in the named column (case-insensitive).- Specified by:
getin interfaceRow- Parameters:
columnName- the column name to look up- Returns:
- the value; never
null(absent values useNullValue.INSTANCE)
-
get
Description copied from interface:RowReturns the value at the given zero-based column index. -
width
public int width()Description copied from interface:RowReturns the number of columns in this row.
-