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

INSERT INTO without FROM throws ClassCastException.

    Details

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

      Description

      The following query throws ClassCastException in the TajoMaster.

      default> create table temp_table (id int, name text)  using csv with ('csvfile.delimiter'='|');
      default> insert overwrite into temp_table select 123::int4 as id, 'abc' as name;
      ERROR: org.apache.tajo.engine.planner.logical.EvalExprNode cannot be cast to org.apache.tajo.engine.planner.logical.ProjectionNode
      

      TajoMaster's log

      java.lang.ClassCastException: org.apache.tajo.engine.planner.logical.EvalExprNode cannot be cast to org.apache.tajo.engine.planner.logical.ProjectionNode
              at org.apache.tajo.engine.planner.LogicalPlanner.buildProjectedInsert(LogicalPlanner.java:1237)
              at org.apache.tajo.engine.planner.LogicalPlanner.buildInsertIntoTablePlan(LogicalPlanner.java:1224)
              at org.apache.tajo.engine.planner.LogicalPlanner.visitInsert(LogicalPlanner.java:1140)
              at org.apache.tajo.engine.planner.LogicalPlanner.visitInsert(LogicalPlanner.java:58)
              at org.apache.tajo.engine.planner.BaseAlgebraVisitor.visit(BaseAlgebraVisitor.java:123)
              at org.apache.tajo.engine.planner.LogicalPlanner.createPlan(LogicalPlanner.java:121)
              at org.apache.tajo.engine.planner.LogicalPlanner.createPlan(LogicalPlanner.java:108)
              at org.apache.tajo.master.GlobalEngine.createLogicalPlan(GlobalEngine.java:341)
              at org.apache.tajo.master.GlobalEngine.executeQuery(GlobalEngine.java:144)
              at org.apache.tajo.master.TajoMasterClientService$TajoMasterClientProtocolServiceHandler.submitQuery(TajoMasterClientService.java:260)
              at org.apache.tajo.ipc.TajoMasterClientProtocol$TajoMasterClientProtocolService$2.callBlockingMethod(TajoMasterClientProtocol.java:495)
              at org.apache.tajo.rpc.BlockingRpcServer$ServerHandler.messageReceived(BlockingRpcServer.java:103)
              at org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:70)
              at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564)
              at org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:791)
              at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:296)
              at org.jboss.netty.handler.codec.oneone.OneToOneDecoder.handleUpstream(OneToOneDecoder.java:70)
      

        Attachments

        1. TAJO-803.patch
          28 kB
          Hyoungjun Kim
        2. TAJO-803_2.patch
          29 kB
          Hyunsik Choi

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: