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

Improve SemiJoinRule to match Join's right input which is unique for Join keys

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.30.0
    • 1.32.0
    • core

    Description

      As disscussed inĀ CALCITE-5195, the following SQL cannot be transformed to semi join:

      select * 
      from emp
      where exists(select * from dept where emp.deptno = dept.deptno and emp.empno = dept.deptno)
      

      Currently SemiJoinRule requires that right child must be an Aggregate, however, sometimes it's not, e.g. in RelBuilder, if the group keys are unique, then we'll remove the Aggregate.

      Attachments

        Issue Links

          Activity

            People

              libenchao Benchao Li
              libenchao Benchao Li
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 4h 10m
                  4h 10m