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

Add IS_NOT_NULL predicate on not-nullable equi-join keys

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Duplicate
    • 1.13.0
    • None
    • None
    • None

    Description

      In equi-joins, if the join keys are not-nullable according to join type, we can assign a IS_NOT_NULL predicate to reduce input. For example, query:

      select * from src1 join src2 on src1.id = src2.id
      

      can be rewrite to

      select * from 
      (select * from src1 where src1.id is not null) src1
      join 
      (select * from src2 where src2.id is not null) src2
      on src1.id = src2.id
      

      Attachments

        Issue Links

          Activity

            People

              julianhyde Julian Hyde
              tedxu Ted Xu
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: