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

Tez: union all followed by group by followed by another union all gives error

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 0.14.0
    • Fix Version/s: 1.1.0
    • Component/s: Tez
    • Labels:
      None

      Description

      Here is the way to produce it:

      in Hive q test setting (with src table)

      set hive.execution.engine=tez;

      select key from
      (
      select key from src
      union all
      select key from src
      ) tab group by key
      union all
      select key from src;

      will give you

      ERROR
      2014-12-09 11:38:48,316 ERROR ql.Driver (SessionState.java:printError(834)) - FAILED: IndexOutOfBoundsException Index: -1, Size: 1
      java.lang.IndexOutOfBoundsException: Index: -1, Size: 1
      at java.util.LinkedList.checkElementIndex(LinkedList.java:553)
      at java.util.LinkedList.get(LinkedList.java:474)
      at org.apache.hadoop.hive.ql.parse.GenTezWork.process(GenTezWork.java:354)
      at org.apache.hadoop.hive.ql.lib.DefaultRuleDispatcher.dispatch(DefaultRuleDispatcher.java:90)
      at org.apache.hadoop.hive.ql.lib.DefaultGraphWalker.dispatchAndReturn(DefaultGraphWalker.java:94)
      at org.apache.hadoop.hive.ql.parse.GenTezWorkWalker.walk(GenTezWorkWalker.java:87)
      at org.apache.hadoop.hive.ql.parse.GenTezWorkWalker.walk(GenTezWorkWalker.java:103)
      at org.apache.hadoop.hive.ql.parse.GenTezWorkWalker.walk(GenTezWorkWalker.java:103)
      at org.apache.hadoop.hive.ql.parse.GenTezWorkWalker.walk(GenTezWorkWalker.java:103)
      at org.apache.hadoop.hive.ql.parse.GenTezWorkWalker.walk(GenTezWorkWalker.java:103)
      at org.apache.hadoop.hive.ql.parse.GenTezWorkWalker.startWalking(GenTezWorkWalker.java:69)
      at org.apache.hadoop.hive.ql.parse.TezCompiler.generateTaskTree(TezCompiler.java:368)
      at org.apache.hadoop.hive.ql.parse.TaskCompiler.compile(TaskCompiler.java:202)
      at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.analyzeInternal(SemanticAnalyzer.java:10202)
      at org.apache.hadoop.hive.ql.parse.BaseSemanticAnalyzer.analyze(BaseSemanticAnalyzer.java:221)
      at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:420)
      at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:306)
      at org.apache.hadoop.hive.ql.Driver.compileInternal(Driver.java:1108)
      at org.apache.hadoop.hive.ql.Driver.runInternal(Driver.java:1170)
      at org.apache.hadoop.hive.ql.Driver.run(Driver.java:1045)
      at org.apache.hadoop.hive.ql.Driver.run(Driver.java:1035)
      at org.apache.hadoop.hive.cli.CliDriver.processLocalCmd(CliDriver.java:199)
      at org.apache.hadoop.hive.cli.CliDriver.processCmd(CliDriver.java:151)
      at org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:362)
      at org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:297)
      at org.apache.hadoop.hive.ql.QTestUtil.executeClient(QTestUtil.java:834)
      at org.apache.hadoop.hive.cli.TestMiniTezCliDriver.runTest(TestMiniTezCliDriver.java:136)
      at org.apache.hadoop.hive.cli.TestMiniTezCliDriver.testCliDriver_uniontez(TestMiniTezCliDriver.java:120)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

      btw: there is not problem when it is run with MR

      1. HIVE-9055.1.patch
        3 kB
        Vikram Dixit K
      2. HIVE-9055.2.patch
        3 kB
        Vikram Dixit K
      3. HIVE-9055.3.patch
        9 kB
        Vikram Dixit K

        Issue Links

          Activity

          Hide
          pxiong Pengcheng Xiong added a comment -

          as per Laljo John Pullokkaran's request, assign it to Vikram Dixit K

          Show
          pxiong Pengcheng Xiong added a comment - as per Laljo John Pullokkaran 's request, assign it to Vikram Dixit K
          Hide
          pxiong Pengcheng Xiong added a comment -

          union distinct will not also fail on tez in this situation.

          Show
          pxiong Pengcheng Xiong added a comment - union distinct will not also fail on tez in this situation.
          Hide
          hiveqa Hive QA added a comment -

          Overall: -1 at least one tests failed

          Here are the results of testing the latest attachment:
          https://issues.apache.org/jira/secure/attachment/12686735/HIVE-9055.1.patch

          ERROR: -1 due to 1 failed/errored test(s), 6701 tests executed
          Failed tests:

          org.apache.hadoop.hive.cli.TestMiniTezCliDriver.testCliDriver_optimize_nullscan
          

          Test results: http://ec2-174-129-184-35.compute-1.amazonaws.com/jenkins/job/PreCommit-HIVE-TRUNK-Build/2050/testReport
          Console output: http://ec2-174-129-184-35.compute-1.amazonaws.com/jenkins/job/PreCommit-HIVE-TRUNK-Build/2050/console
          Test logs: http://ec2-174-129-184-35.compute-1.amazonaws.com/logs/PreCommit-HIVE-TRUNK-Build-2050/

          Messages:

          Executing org.apache.hive.ptest.execution.PrepPhase
          Executing org.apache.hive.ptest.execution.ExecutionPhase
          Executing org.apache.hive.ptest.execution.ReportingPhase
          Tests exited with: TestsFailedException: 1 tests failed
          

          This message is automatically generated.

          ATTACHMENT ID: 12686735 - PreCommit-HIVE-TRUNK-Build

          Show
          hiveqa Hive QA added a comment - Overall : -1 at least one tests failed Here are the results of testing the latest attachment: https://issues.apache.org/jira/secure/attachment/12686735/HIVE-9055.1.patch ERROR: -1 due to 1 failed/errored test(s), 6701 tests executed Failed tests: org.apache.hadoop.hive.cli.TestMiniTezCliDriver.testCliDriver_optimize_nullscan Test results: http://ec2-174-129-184-35.compute-1.amazonaws.com/jenkins/job/PreCommit-HIVE-TRUNK-Build/2050/testReport Console output: http://ec2-174-129-184-35.compute-1.amazonaws.com/jenkins/job/PreCommit-HIVE-TRUNK-Build/2050/console Test logs: http://ec2-174-129-184-35.compute-1.amazonaws.com/logs/PreCommit-HIVE-TRUNK-Build-2050/ Messages: Executing org.apache.hive.ptest.execution.PrepPhase Executing org.apache.hive.ptest.execution.ExecutionPhase Executing org.apache.hive.ptest.execution.ReportingPhase Tests exited with: TestsFailedException: 1 tests failed This message is automatically generated. ATTACHMENT ID: 12686735 - PreCommit-HIVE-TRUNK-Build
          Hide
          pxiong Pengcheng Xiong added a comment -

          Laljo John Pullokkaran, could you please help check in the patch so that I can test union distinct on Tez? This one blocks any union distinct to run on Tez. Thanks!

          Show
          pxiong Pengcheng Xiong added a comment - Laljo John Pullokkaran , could you please help check in the patch so that I can test union distinct on Tez? This one blocks any union distinct to run on Tez. Thanks!
          Hide
          prasanth_j Prasanth Jayachandran added a comment -

          LGTM, +1

          Show
          prasanth_j Prasanth Jayachandran added a comment - LGTM, +1
          Hide
          hiveqa Hive QA added a comment -

          Overall: -1 at least one tests failed

          Here are the results of testing the latest attachment:
          https://issues.apache.org/jira/secure/attachment/12687329/HIVE-9055.3.patch

          ERROR: -1 due to 1 failed/errored test(s), 6704 tests executed
          Failed tests:

          org.apache.hadoop.hive.cli.TestMiniTezCliDriver.testCliDriver_optimize_nullscan
          

          Test results: http://ec2-174-129-184-35.compute-1.amazonaws.com/jenkins/job/PreCommit-HIVE-TRUNK-Build/2084/testReport
          Console output: http://ec2-174-129-184-35.compute-1.amazonaws.com/jenkins/job/PreCommit-HIVE-TRUNK-Build/2084/console
          Test logs: http://ec2-174-129-184-35.compute-1.amazonaws.com/logs/PreCommit-HIVE-TRUNK-Build-2084/

          Messages:

          Executing org.apache.hive.ptest.execution.PrepPhase
          Executing org.apache.hive.ptest.execution.ExecutionPhase
          Executing org.apache.hive.ptest.execution.ReportingPhase
          Tests exited with: TestsFailedException: 1 tests failed
          

          This message is automatically generated.

          ATTACHMENT ID: 12687329 - PreCommit-HIVE-TRUNK-Build

          Show
          hiveqa Hive QA added a comment - Overall : -1 at least one tests failed Here are the results of testing the latest attachment: https://issues.apache.org/jira/secure/attachment/12687329/HIVE-9055.3.patch ERROR: -1 due to 1 failed/errored test(s), 6704 tests executed Failed tests: org.apache.hadoop.hive.cli.TestMiniTezCliDriver.testCliDriver_optimize_nullscan Test results: http://ec2-174-129-184-35.compute-1.amazonaws.com/jenkins/job/PreCommit-HIVE-TRUNK-Build/2084/testReport Console output: http://ec2-174-129-184-35.compute-1.amazonaws.com/jenkins/job/PreCommit-HIVE-TRUNK-Build/2084/console Test logs: http://ec2-174-129-184-35.compute-1.amazonaws.com/logs/PreCommit-HIVE-TRUNK-Build-2084/ Messages: Executing org.apache.hive.ptest.execution.PrepPhase Executing org.apache.hive.ptest.execution.ExecutionPhase Executing org.apache.hive.ptest.execution.ReportingPhase Tests exited with: TestsFailedException: 1 tests failed This message is automatically generated. ATTACHMENT ID: 12687329 - PreCommit-HIVE-TRUNK-Build
          Hide
          ashutoshc Ashutosh Chauhan added a comment -

          Has this patch been committed ? Seems like yes (from svn history). This looks like broke optimize_nullscan.q on Tez as evident from testReport in previous comment by Hive QA. Also, see : HIVE-9131 for full stack trace.

          Show
          ashutoshc Ashutosh Chauhan added a comment - Has this patch been committed ? Seems like yes (from svn history). This looks like broke optimize_nullscan.q on Tez as evident from testReport in previous comment by Hive QA. Also, see : HIVE-9131 for full stack trace.

            People

            • Assignee:
              vikram.dixit Vikram Dixit K
              Reporter:
              pxiong Pengcheng Xiong
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development