The output columns of a valid join, in the spec's order: the left keys, the right keys, the other left columns in left schema order, then the other right columns in right schema order, each name once.

The side a join type keeps unmatched rows of keeps its nullability; the other side's columns become nullable. A positionally identical key is one column, at its left key's position:

  • INNER and LEFT_OUTER: the left column;
  • RIGHT_OUTER: the right column, since the left one is NULL for unmatched rows;
  • FULL_OUTER: coalesce(left, right), of their common type, and nullable if either key is: a NULL key never matches, so its row comes out unmatched.
  • Parameters

    • leftSchema: Schema
    • rightSchema: Schema
    • leftColumns: readonly string[]
    • rightColumns: readonly string[]
    • joinType: JoinType

    Returns SchemaColumn[]