Uploaded image for project: 'Calcite'
  1. Calcite
  2. CALCITE-330

Add a rule that converts join-on-aggregate to semi-join

    XMLWordPrintableJSON

    Details

    • Type: New Feature
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      Once CALCITE-328 is completed and Join has a flag eliminateRightDuplicates, we need a rule to populate that flag from SQL queries.

      Transformers that deal with 'IN subquery' (both correlated and uncorrelated) should set this flag. (In particular check TPC-DS Q95.)

      Also queries written '... JOIN (SELECT DISTINCT ...)'.

      Also handle queries whose right input is known to be already unique, e.g.

      SELECT emp.name
      FROM emp JOIN dept USING (deptno)
      WHERE dept.location = 'San Francisco'
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                julianhyde Julian Hyde
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated: