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

Incorrect result with vectorization and SharedWorkOptimizer

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.0.0
    • 3.0.0
    • Vectorization
    • None

    Description

      We get incorrect result with vectorization and multi-output Select operator created by SharedWorkOptimizer. It can be reproduced in the following way.

      Correct
      select count(*) as h8_30_to_9
        from src
        join src1 on src.key = src1.key
        where src1.value = "val_278";
      OK
      2
      
      Correct
      select count(*) as h9_to_9_30
        from src
        join src1 on src.key = src1.key
        where src1.value = "val_255";
      OK
      2
      
      Incorrect
      select * from (
        select count(*) as h8_30_to_9
        from src
        join src1 on src.key = src1.key
        where src1.value = "val_278") s1
      join (
        select count(*) as h9_to_9_30
        from src
        join src1 on src.key = src1.key
        where src1.value = "val_255") s2;
      OK
      2	0
      

      Problem seems to be that some ds in the batch row need to be re-initialized after they have been forwarded to each output.

      Attachments

        1. HIVE-17073.01.patch
          21 kB
          jcamachorodriguez
        2. HIVE-17073.02.patch
          24 kB
          jcamachorodriguez
        3. HIVE-17073.03.patch
          24 kB
          jcamachorodriguez
        4. HIVE-17073.patch
          13 kB
          jcamachorodriguez

        Issue Links

          Activity

            People

              jcamacho Jesús Camacho Rodríguez
              jcamacho Jesús Camacho Rodríguez
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: