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

LEFT ANTI JOIN produces wrong result when PHJ build spills

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Blocker
    • Resolution: Fixed
    • Impala 2.11.0, Impala 3.0, Impala 2.12.0, Impala 3.1.0, Impala 3.2.0, Impala 3.3.0, Impala 3.4.0
    • Impala 4.0.0, Impala 3.4.1
    • Backend

    Description

      Using the attached data set, below query produced non-zero result when setting a small mem_limt. The expected result should be 0 because we are simply ANTI JOIN the same table.

      set mem_limit=100m;
      select id from wide_test.wide L1 where not exists (
      select 1 from wide_test.wide L2 where L1.id = L2.id
      and L1.col2 = L2.col2
      and L1.col3 = L2.col3
      and L1.col4 = L2.col4
      and L1.col5 = L2.col5
      and L1.col6 = L2.col6
      and L1.col7 = L2.col7
      and L1.col8 = L2.col8
      and L1.col9 = L2.col9
      and L1.col10 = L2.col10
      and L1.col11 = L2.col11
      and L1.col12 = L2.col12
      and L1.col13 = L2.col13
      and L1.col14 = L2.col14
      and L1.col15 = L2.col15
      and L1.col16 = L2.col16
      and L1.col17 = L2.col17
      and L1.col18 = L2.col18
      and L1.col19 = L2.col19
      and L1.col20 = L2.col20
      and L1.col21 = L2.col21
      and L1.col22 = L2.col22
      and L1.col23 = L2.col23
      ) order by id;

       

      With a larger mem_limit (or do not set mem_limit), above query return 0 which is correct.

      Attachments

        1. wide.csv.gz
          284 kB
          Xiaomin Zhang

        Issue Links

          Activity

            People

              tarmstrong Tim Armstrong
              ximz Xiaomin Zhang
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: