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)
      

        Attachments

          Activity

            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: