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

Derive IS NOT NULL filter for the inputs of inner join

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.31.0
    • core

    Description

      We can infer IS NOT NULL predicate from join which implies some columns may not be null. For instance, 

       

      select * from a join b on a.id = b.id;
      

      we can infer a.id is not null/b.id is not null and push down them into the child node of the join. Then it becomes

      select * from (select* from a where id is null) t1 join (select * from b where id is not null) on t1.id = t2.id;
      

       

       

      Attachments

        Issue Links

          Activity

            People

              Chunwei Lei Chunwei Lei
              Chunwei Lei Chunwei Lei
              Votes:
              0 Vote for this issue
              Watchers:
              10 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 50m
                  4h 50m