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

Planner failed to flip build/probe side of join

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Not A Bug
    • Impala 3.1.0
    • None
    • Frontend
    • None
    • ghx-label-4

    Description

      TPC-H query 8 was reviewed after applying the changes proposed for DRILL-8014. (See tpch-all.test.) The revised plan has better cardinality number, but contains this odd structure:

      11:HASH JOIN [INNER JOIN]
      |  hash predicates: o_custkey = c_custkey
      |  row-size=139B cardinality=39.66K
      |
      |--04:SCAN HDFS [tpch.customer]
      |     row-size=10B cardinality=150.00K
      |
      10:HASH JOIN [INNER JOIN]
      |  hash predicates: o_orderkey = l_orderkey
      |  row-size=129B cardinality=39.66K
      

      As I understand it, the planner should flip the left and right sides of an inner join if the right side (the 04 scan) has a larger cardinality than the left (join 10) side. That flip did not happen in this case, causing the join to build a hash table about 4 times larger than necessary.

      Perhaps there is some other constraint. Investigate to determine if the behavior is correct (and if so why), or the source of incorrect behavior.

      Attachments

        Activity

          People

            Unassigned Unassigned
            Paul.Rogers Paul Rogers
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: