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

NULL in CASE clause occurs Exception.

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.9.0
    • Component/s: None
    • Labels:
      None

      Description

      The following query which contains NULL type in CASE clause occurs Exception.

      select 
        case when l_returnflag != 'R' then l_orderkey else null end 
      from lineitem
      
      com.google.protobuf.ServiceException: org.apache.tajo.engine.planner.PlanningException: No matched operation for those types: type: INT4
      , type: NULL_TYPE
      
      	at org.apache.tajo.engine.planner.ExprAnnotator.assertEval(ExprAnnotator.java:76)
      	at org.apache.tajo.engine.planner.ExprAnnotator.getWidestType(ExprAnnotator.java:130)
      	at org.apache.tajo.engine.planner.ExprAnnotator.visitCaseWhen(ExprAnnotator.java:349)
      	at org.apache.tajo.engine.planner.ExprAnnotator.visitCaseWhen(ExprAnnotator.java:51)
      	at org.apache.tajo.engine.planner.BaseAlgebraVisitor.visit(BaseAlgebraVisitor.java:163)
      	at org.apache.tajo.engine.planner.ExprAnnotator.createEvalNode(ExprAnnotator.java:71)
      	at org.apache.tajo.engine.planner.LogicalPlanPreprocessor.visitProjection(LogicalPlanPreprocessor.java:204)
      	at org.apache.tajo.engine.planner.LogicalPlanPreprocessor.visitProjection(LogicalPlanPreprocessor.java:38)
      	at org.apache.tajo.engine.planner.BaseAlgebraVisitor.visit(BaseAlgebraVisitor.java:55)
      	at org.apache.tajo.engine.planner.LogicalPlanner.createPlan(LogicalPlanner.java:119)
      	at org.apache.tajo.engine.planner.LogicalPlanner.createPlan(LogicalPlanner.java:109)
      	at org.apache.tajo.master.GlobalEngine.createLogicalPlan(GlobalEngine.java:480)
      	at org.apache.tajo.master.GlobalEngine.executeQuery(GlobalEngine.java:148)
      

        Activity

        Hide
        hudson Hudson added a comment -

        SUCCESS: Integrated in Tajo-master-build #250 (See https://builds.apache.org/job/Tajo-master-build/250/)
        TAJO-880: NULL in CASE clause occurs Exception. (Hyoungjun Kim via hyunsik) (hyunsik: rev 4ec8f0dd44fb58279c00e896a1aebefc40bd8017)

        • tajo-core/src/test/java/org/apache/tajo/engine/query/TestCaseByCases.java
        • tajo-core/src/main/java/org/apache/tajo/engine/eval/CaseWhenEval.java
        • tajo-core/src/main/java/org/apache/tajo/engine/planner/ExprAnnotator.java
        • tajo-common/src/main/java/org/apache/tajo/datum/NullDatum.java
        • CHANGES
        Show
        hudson Hudson added a comment - SUCCESS: Integrated in Tajo-master-build #250 (See https://builds.apache.org/job/Tajo-master-build/250/ ) TAJO-880 : NULL in CASE clause occurs Exception. (Hyoungjun Kim via hyunsik) (hyunsik: rev 4ec8f0dd44fb58279c00e896a1aebefc40bd8017) tajo-core/src/test/java/org/apache/tajo/engine/query/TestCaseByCases.java tajo-core/src/main/java/org/apache/tajo/engine/eval/CaseWhenEval.java tajo-core/src/main/java/org/apache/tajo/engine/planner/ExprAnnotator.java tajo-common/src/main/java/org/apache/tajo/datum/NullDatum.java CHANGES
        Hide
        hyunsik Hyunsik Choi added a comment -

        committed.

        Show
        hyunsik Hyunsik Choi added a comment - committed.
        Hide
        githubbot ASF GitHub Bot added a comment -

        Github user asfgit closed the pull request at:

        https://github.com/apache/tajo/pull/40

        Show
        githubbot ASF GitHub Bot added a comment - Github user asfgit closed the pull request at: https://github.com/apache/tajo/pull/40
        Hide
        githubbot ASF GitHub Bot added a comment -

        Github user hyunsik commented on the pull request:

        https://github.com/apache/tajo/pull/40#issuecomment-46645743

        +1

        The patch looks good to me.

        Show
        githubbot ASF GitHub Bot added a comment - Github user hyunsik commented on the pull request: https://github.com/apache/tajo/pull/40#issuecomment-46645743 +1 The patch looks good to me.
        Hide
        hjkim Hyoungjun Kim added a comment -

        I had a mistake while requesting pull.
        Please review with the following request.
        https://github.com/apache/tajo/pull/40

        Show
        hjkim Hyoungjun Kim added a comment - I had a mistake while requesting pull. Please review with the following request. https://github.com/apache/tajo/pull/40
        Hide
        githubbot ASF GitHub Bot added a comment -

        Github user babokim closed the pull request at:

        https://github.com/apache/tajo/pull/41

        Show
        githubbot ASF GitHub Bot added a comment - Github user babokim closed the pull request at: https://github.com/apache/tajo/pull/41
        Hide
        githubbot ASF GitHub Bot added a comment -

        Github user babokim commented on the pull request:

        https://github.com/apache/tajo/pull/41#issuecomment-46516844

        I requested with a wrong issue number. This request is for TAJO-879. So I close this request.

        Show
        githubbot ASF GitHub Bot added a comment - Github user babokim commented on the pull request: https://github.com/apache/tajo/pull/41#issuecomment-46516844 I requested with a wrong issue number. This request is for TAJO-879 . So I close this request.
        Hide
        githubbot ASF GitHub Bot added a comment -

        GitHub user babokim opened a pull request:

        https://github.com/apache/tajo/pull/41

        TAJO-880: NULL in CASE clause occurs Exception.

        You can merge this pull request into a Git repository by running:

        $ git pull https://github.com/babokim/tajo TAJO-879

        Alternatively you can review and apply these changes as the patch at:

        https://github.com/apache/tajo/pull/41.patch

        To close this pull request, make a commit to your master/trunk branch
        with (at least) the following in the commit message:

        This closes #41


        commit c030fa7d2f4b9586c9768d797b44b963cea8448b
        Author: 김형준 <babokim@babokim-macbook-pro.local>
        Date: 2014-06-17T10:43:45Z

        TAJO-880: NULL in CASE clause occurs Exception.


        Show
        githubbot ASF GitHub Bot added a comment - GitHub user babokim opened a pull request: https://github.com/apache/tajo/pull/41 TAJO-880 : NULL in CASE clause occurs Exception. You can merge this pull request into a Git repository by running: $ git pull https://github.com/babokim/tajo TAJO-879 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/tajo/pull/41.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #41 commit c030fa7d2f4b9586c9768d797b44b963cea8448b Author: 김형준 <babokim@babokim-macbook-pro.local> Date: 2014-06-17T10:43:45Z TAJO-880 : NULL in CASE clause occurs Exception.
        Hide
        githubbot ASF GitHub Bot added a comment -

        GitHub user babokim opened a pull request:

        https://github.com/apache/tajo/pull/40

        TAJO-880: NULL in CASE clause occurs Exception.

        You can merge this pull request into a Git repository by running:

        $ git pull https://github.com/babokim/tajo TAJO-880

        Alternatively you can review and apply these changes as the patch at:

        https://github.com/apache/tajo/pull/40.patch

        To close this pull request, make a commit to your master/trunk branch
        with (at least) the following in the commit message:

        This closes #40


        commit b37ef0fe2899863ed55e6ca8d29f2944e17666a8
        Author: 김형준 <babokim@babokim-macbook-pro.local>
        Date: 2014-06-17T08:19:55Z

        TAJO-880: NULL in CASE clause occurs Exception.

        commit 247b1491aa0dc2703fc55e0439fa8723316fa2c7
        Author: 김형준 <babokim@babokim-macbook-pro.local>
        Date: 2014-06-17T08:21:20Z

        Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/tajo


        Show
        githubbot ASF GitHub Bot added a comment - GitHub user babokim opened a pull request: https://github.com/apache/tajo/pull/40 TAJO-880 : NULL in CASE clause occurs Exception. You can merge this pull request into a Git repository by running: $ git pull https://github.com/babokim/tajo TAJO-880 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/tajo/pull/40.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #40 commit b37ef0fe2899863ed55e6ca8d29f2944e17666a8 Author: 김형준 <babokim@babokim-macbook-pro.local> Date: 2014-06-17T08:19:55Z TAJO-880 : NULL in CASE clause occurs Exception. commit 247b1491aa0dc2703fc55e0439fa8723316fa2c7 Author: 김형준 <babokim@babokim-macbook-pro.local> Date: 2014-06-17T08:21:20Z Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/tajo

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development