Uploaded image for project: 'Phoenix'
  1. Phoenix
  2. PHOENIX-5416

Fix Array2IT testArrayRefToLiteral

    XMLWordPrintableJSON

Details

    • Test
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 4.15.0, 5.1.0, 4.14.3
    • 4.15.0, 5.1.0, 4.14.3
    • None
    • None

    Description

      Array2IT.testArrayRefToLiteral fails with an NPE

      java.lang.NullPointerException
       at org.apache.phoenix.schema.types.PArrayDataTypeDecoder.positionAtArrayElement(PArrayDataTypeDecoder.java:124)
       at org.apache.phoenix.schema.types.PArrayDataTypeDecoder.positionAtArrayElement(PArrayDataTypeDecoder.java:45)
       at org.apache.phoenix.expression.function.ArrayIndexFunction.evaluate(ArrayIndexFunction.java:64)
       at org.apache.phoenix.util.ExpressionUtil.getConstantExpression(ExpressionUtil.java:72)
       at org.apache.phoenix.compile.ExpressionCompiler.visitLeave(ExpressionCompiler.java:348)
       at org.apache.phoenix.compile.ProjectionCompiler$SelectClauseVisitor.visitLeave(ProjectionCompiler.java:717)
       at org.apache.phoenix.compile.ExpressionCompiler.visitLeave(ExpressionCompiler.java:1)
       at org.apache.phoenix.parse.FunctionParseNode.accept(FunctionParseNode.java:87)
       at org.apache.phoenix.compile.ProjectionCompiler.compile(ProjectionCompiler.java:425)
       at org.apache.phoenix.compile.QueryCompiler.compileSingleFlatQuery(QueryCompiler.java:637)
       at org.apache.phoenix.compile.QueryCompiler.compileSingleQuery(QueryCompiler.java:574)
       at org.apache.phoenix.compile.QueryCompiler.compileSelect(QueryCompiler.java:203)
       at org.apache.phoenix.compile.QueryCompiler.compile(QueryCompiler.java:157)
       at org.apache.phoenix.jdbc.PhoenixStatement$ExecutableSelectStatement.compilePlan(PhoenixStatement.java:497)
       at org.apache.phoenix.jdbc.PhoenixStatement$ExecutableSelectStatement.compilePlan(PhoenixStatement.java:1)
       at org.apache.phoenix.jdbc.PhoenixStatement$2.call(PhoenixStatement.java:303)
       at org.apache.phoenix.jdbc.PhoenixStatement$2.call(PhoenixStatement.java:1)
       at org.apache.phoenix.call.CallRunner.run(CallRunner.java:53)
       at org.apache.phoenix.jdbc.PhoenixStatement.executeQuery(PhoenixStatement.java:291)
       at org.apache.phoenix.jdbc.PhoenixStatement.executeQuery(PhoenixStatement.java:284)
       at org.apache.phoenix.jdbc.PhoenixPreparedStatement.executeQuery(PhoenixPreparedStatement.java:193)
       at org.apache.phoenix.end2end.Array2IT.testArrayRefToLiteral(Array2IT.java:682)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
       at java.lang.reflect.Method.invoke(Method.java:498)
       at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
       at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
       at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
       at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
       at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
       at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
       at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
       at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
       at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
       at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
       at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
       at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
       at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
       at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
       at org.junit.rules.ExternalResource$1.evaluate(ExternalResource.java:48)
       at org.junit.rules.RunRules.evaluate(RunRules.java:20)
       at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
       at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:89)
       at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:41)
       at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:541)
       at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:763)
       at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:463)
       at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:209)
      

      Attachments

        1. PHOENIX-5416-master.patch
          6 kB
          Chinmay Kulkarni
        2. PHOENIX-5416-master-v2.patch
          5 kB
          Chinmay Kulkarni
        3. PHOENIX-5416-master-v3.patch
          5 kB
          Chinmay Kulkarni
        4. PHOENIX-5416-master-v4.patch
          5 kB
          Chinmay Kulkarni

        Issue Links

          Activity

            People

              ckulkarni Chinmay Kulkarni
              tdsilva Thomas D'Silva
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 3h 10m
                  3h 10m