Support inner and left outer joins

XMLWordPrintableJSON

    • 8
    • None
    • Needed
    • Hide

      Complexity: Complex (support flip plus a large supported/unsupported matrix and examples)

      Feature Compatibility: mark JOINS as Partially Supported. Supported: INNER and LEFT OUTER joins with a single-field equijoin ON condition, JOIN FETCH, and chained joins (each becomes a $lookup + $unwind; LEFT joins use preserveNullAndEmptyArrays). Add a join example to Interact with Data. Unsupported (native-query workaround), per-query throws: RIGHT (161), FULL (162), CROSS (163), compound ON / composite key (164), non-equijoin ON (165), non-column ON expression (166), LATERAL/subquery join (167), root-entity join syntax & ON with association navigation (168), both-sides-same-table ON (170), LATERAL UNNEST over a @Struct array (111). Mapping-level throws: TABLE_PER_CLASS and JOINED inheritance (69), @SecondaryTable (181), @JoinFormula (182).

      Show
      Complexity: Complex (support flip plus a large supported/unsupported matrix and examples) Feature Compatibility: mark JOINS as Partially Supported . Supported: INNER and LEFT OUTER joins with a single-field equijoin ON condition, JOIN FETCH , and chained joins (each becomes a $lookup + $unwind ; LEFT joins use preserveNullAndEmptyArrays ). Add a join example to Interact with Data. Unsupported (native-query workaround), per-query throws: RIGHT (161), FULL (162), CROSS (163), compound ON / composite key (164), non-equijoin ON (165), non-column ON expression (166), LATERAL/subquery join (167), root-entity join syntax & ON with association navigation (168), both-sides-same-table ON (170), LATERAL UNNEST over a @Struct array (111). Mapping-level throws: TABLE_PER_CLASS and JOINED inheritance (69), @SecondaryTable (181), @JoinFormula (182).
    • None
    • None
    • None
    • None
    • None
    • None

      Add JOIN support to the MQL translator. Supported join shapes:

      • INNER JOIN with a single-field equijoin ON condition
      • LEFT OUTER JOIN with a single-field equijoin ON condition
      • JOIN FETCH (transparent — produces the same SQL AST as a plain JOIN)
      • Chained joins (A→B→C)

      Implementation: Each join translates to a $lookup + $unwind stage pair prepended to the aggregation pipeline. Joined-table columns are referenced as dotted paths (e.g., o1_0.total) in all downstream stages.

      Out of scope (throws FeatureNotSupportedException with a Jira ticket reference): RIGHT OUTER JOIN, FULL OUTER JOIN, CROSS JOIN, compound equijoin ON conditions (composite PKs), non-equijoin ON conditions, non-column ON expressions, LATERAL UNNEST joins, and subquery joins. Follow-up tickets are filed for each.

            Assignee:
            Jeffrey Yemin
            Reporter:
            Ajay Tandon
            Slav Babanin
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: