Uploaded image for project: 'IMPALA'
  1. IMPALA
  2. IMPALA-3987

Short-circuit evaluation of hash joins with empty build side

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • Impala 2.7.0
    • None
    • Backend

    Description

      Many join types never return any rows if the build side is empty. In these cases we still process the whole probe input instead of short-circuiting the evaluation.

      E.g. the following query unnecessarily scans the whole of lineitem.

      select * 
      from tpch_20_parquet.lineitem
        inner join tpch_20_parquet.orders on l_orderkey = o_orderkey
      where o_comment = 'no matches for this comment';
      

      This also affects subqueries, e.g. IN() that are rewritten to joins.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              tarmstrong Tim Armstrong
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated: