Uploaded image for project: 'Tajo'
  1. Tajo
  2. TAJO-360

If there is no matched function, catalog causes NPE.

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.8.0
    • Component/s: Function/UDF
    • Labels:
      None

      Description

      If there is no matched function, catalog causes NullPointerException. This case should cause a proper exception like NoSuchFunctionException.

      java.lang.NullPointerException
      	at org.apache.tajo.catalog.FunctionDesc.<init>(FunctionDesc.java:56)
      	at org.apache.tajo.catalog.AbstractCatalogClient.getFunction(AbstractCatalogClient.java:330)
      	at org.apache.tajo.catalog.AbstractCatalogClient.getFunction(AbstractCatalogClient.java:303)
      	at org.apache.tajo.engine.planner.LogicalPlanner.createEvalTree(LogicalPlanner.java:1076)
      	at org.apache.tajo.engine.planner.LogicalPlanner.createTarget(LogicalPlanner.java:1170)
      	at org.apache.tajo.engine.planner.LogicalPlanner.annotateTargets(LogicalPlanner.java:1162)
      	at org.apache.tajo.engine.planner.LogicalPlanner.visitProjection(LogicalPlanner.java:647)
      	at org.apache.tajo.engine.planner.LogicalPlanner.visitProjection(LogicalPlanner.java:70)
      	at org.apache.tajo.engine.planner.BaseAlgebraVisitor.visitChild(BaseAlgebraVisitor.java:53)
      	at org.apache.tajo.engine.planner.LogicalPlanner.createPlan(LogicalPlanner.java:103)
      	at org.apache.tajo.engine.eval.ExprTestBase.getRawTargets(ExprTestBase.java:79)
      	at org.apache.tajo.engine.eval.ExprTestBase.testEval(ExprTestBase.java:123)
      	at org.apache.tajo.engine.eval.ExprTestBase.testSimpleEval(ExprTestBase.java:91)
      	at org.apache.tajo.engine.function.TestStringOperatorsAndFunctions.testOctetLength(TestStringOperatorsAndFunctions.java:299)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45)
      	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
      	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42)
      	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
      	at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:263)
      	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:68)
      	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:47)
      	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231)
      	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60)
      	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229)
      	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50)
      	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222)
      	at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
      	at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:30)
      	at org.junit.runners.ParentRunner.run(ParentRunner.java:300)
      	at org.junit.runner.JUnitCore.run(JUnitCore.java:157)
      	at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:77)
      	at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:195)
      	at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:63)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      	at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)
      
      2013-12-03 12:06:24,901 INFO  rpc.NettyServerBase (NettyServerBase.java:shutdown(120)) - Rpc (CatalogProtocol) listened on 127.0.0.1:46093) shutdown
      2013-12-03 12:06:24,901 INFO  catalog.CatalogServer (CatalogServer.java:stop(173)) - Catalog Server (127.0.0.1:46093) shutdown
      
      1. TAJO-360.patch
        14 kB
        Hyoungjun Kim

        Activity

        Hide
        charsyam DaeMyung Kang added a comment -

        I agree. NoSuchFunctionException is good.

        Show
        charsyam DaeMyung Kang added a comment - I agree. NoSuchFunctionException is good.
        Hide
        hjkim Hyoungjun Kim added a comment -

        Created a review request against branch master in reviewboard
        https://reviews.apache.org/r/17119/

        Show
        hjkim Hyoungjun Kim added a comment - Created a review request against branch master in reviewboard https://reviews.apache.org/r/17119/
        Hide
        hudson Hudson added a comment -

        SUCCESS: Integrated in Tajo-master-build #25 (See https://builds.apache.org/job/Tajo-master-build/25/)
        TAJO-360: If there is no matched function, catalog causes NPE. (hyoungjunkim via hyunsik) (hyunsik: https://git-wip-us.apache.org/repos/asf?p=incubator-tajo.git&a=commit&h=358dbace5b48cfbc139b46c96752a66b0f817908)

        • tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/engine/exception/UndefinedFunctionException.java
        • tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/engine/eval/TestSQLExpression.java
        • tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/engine/planner/ExprAnnotator.java
        • tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/engine/function/TestStringOperatorsAndFunctions.java
        • tajo-catalog/tajo-catalog-client/src/main/java/org/apache/tajo/catalog/AbstractCatalogClient.java
        • tajo-rpc/src/main/java/org/apache/tajo/rpc/ServerCallable.java
        • CHANGES.txt
        • tajo-catalog/tajo-catalog-server/src/test/java/org/apache/tajo/catalog/TestCatalog.java
        • tajo-catalog/tajo-catalog-server/src/main/java/org/apache/tajo/catalog/CatalogServer.java
        Show
        hudson Hudson added a comment - SUCCESS: Integrated in Tajo-master-build #25 (See https://builds.apache.org/job/Tajo-master-build/25/ ) TAJO-360 : If there is no matched function, catalog causes NPE. (hyoungjunkim via hyunsik) (hyunsik: https://git-wip-us.apache.org/repos/asf?p=incubator-tajo.git&a=commit&h=358dbace5b48cfbc139b46c96752a66b0f817908 ) tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/engine/exception/UndefinedFunctionException.java tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/engine/eval/TestSQLExpression.java tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/engine/planner/ExprAnnotator.java tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/engine/function/TestStringOperatorsAndFunctions.java tajo-catalog/tajo-catalog-client/src/main/java/org/apache/tajo/catalog/AbstractCatalogClient.java tajo-rpc/src/main/java/org/apache/tajo/rpc/ServerCallable.java CHANGES.txt tajo-catalog/tajo-catalog-server/src/test/java/org/apache/tajo/catalog/TestCatalog.java tajo-catalog/tajo-catalog-server/src/main/java/org/apache/tajo/catalog/CatalogServer.java
        Hide
        hyunsik Hyunsik Choi added a comment -

        committed it to master.

        Show
        hyunsik Hyunsik Choi added a comment - committed it to master.

          People

          • Assignee:
            hjkim Hyoungjun Kim
            Reporter:
            hyunsik Hyunsik Choi
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development