Uploaded image for project: 'Hive'
  1. Hive
  2. HIVE-11517

Vectorized auto_smb_mapjoin_14.q produces different results

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • None
    • 1.0.2, 1.2.2, 1.3.0, 2.0.0
    • None
    • None

    Description

      Converted Q file to use ORC and turned on vectorization.

      The query:

      select count(*) from (
        select a.key as key, a.value as val1, b.value as val2 from tbl1 a join tbl2 b on a.key = b.key
      ) subq1
      

      produces 10 instead of 22.

      The query:

      select src1.key, src1.cnt1, src2.cnt1 from
      (
        select key, count(*) as cnt1 from 
        (
          select a.key as key, a.value as val1, b.value as val2 from tbl1 a join tbl2 b on a.key = b.key
        ) subq1 group by key
      ) src1
      join
      (
        select key, count(*) as cnt1 from 
        (
          select a.key as key, a.value as val1, b.value as val2 from tbl1 a join tbl2 b on a.key = b.key
        ) subq2 group by key
      ) src2
      

      produces:

      0	3	3
      2	1	1
      4	1	1
      5	3	3
      8	1	1
      9	1	1
      

      instead of:

      0	9	9
      2	1	1
      4	1	1
      5	9	9
      8	1	1
      9	1	1
      

      Attachments

        1. HIVE-11517.01.patch
          210 kB
          Matt McCline
        2. HIVE-11517.02.patch
          148 kB
          Matt McCline

        Issue Links

          Activity

            People

              mmccline Matt McCline
              mmccline Matt McCline
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: