java.lang.Object
com.darkcollective.relix.processor.exec.QualifiedRow
All Implemented Interfaces:
Row

public final class QualifiedRow extends Object implements Row
A read-only positional view over a left row concatenated with a right row, used to evaluate a join condition with correct handling of qualified attribute references.

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):

  1. If the bare column name exists in exactly one input, that side is used (the qualifier, if any, is irrelevant).
  2. If it exists in both inputs, the qualifier selects the side: a qualifier that names a relation on exactly one side wins.
  3. 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

  • Method Details

    • schema

      public Schema schema()
      Description copied from interface: Row
      Returns the schema that describes this row's columns.
      Specified by:
      schema in interface Row
      Returns:
      the row's schema; never null
    • get

      public Value get(String columnName)
      Description copied from interface: Row
      Returns the value in the named column (case-insensitive).
      Specified by:
      get in interface Row
      Parameters:
      columnName - the column name to look up
      Returns:
      the value; never null (absent values use NullValue.INSTANCE)
    • get

      public Value get(int index)
      Description copied from interface: Row
      Returns the value at the given zero-based column index.
      Specified by:
      get in interface Row
      Parameters:
      index - zero-based column index
      Returns:
      the value; never null
    • width

      public int width()
      Description copied from interface: Row
      Returns the number of columns in this row.
      Specified by:
      width in interface Row
      Returns:
      column count; always ≥ 1