You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@tajo.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2014/06/17 12:36:01 UTC

[jira] [Commented] (TAJO-880) NULL in CASE clause occurs Exception.

    [ https://issues.apache.org/jira/browse/TAJO-880?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14033638#comment-14033638 ] 

ASF GitHub Bot commented on TAJO-880:
-------------------------------------

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: 김형준 <ba...@babokim-macbook-pro.local>
Date:   2014-06-17T08:19:55Z

    TAJO-880: NULL in CASE clause occurs Exception.

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

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

----


> NULL in CASE clause occurs Exception. 
> --------------------------------------
>
>                 Key: TAJO-880
>                 URL: https://issues.apache.org/jira/browse/TAJO-880
>             Project: Tajo
>          Issue Type: Bug
>            Reporter: Hyoungjun Kim
>            Assignee: Hyoungjun Kim
>            Priority: Minor
>
> The following query which contains NULL type in CASE clause occurs Exception.
> {code:sql}
> select 
>   case when l_returnflag != 'R' then l_orderkey else null end 
> from lineitem
> {code}
> {noformat}
> 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)
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.2#6252)