tajo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Keuntae Park (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (TAJO-434) java.lang.NullPointerException for invalid column name
Date Thu, 19 Dec 2013 08:02:08 GMT

     [ https://issues.apache.org/jira/browse/TAJO-434?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Keuntae Park updated TAJO-434:
------------------------------

    Description: 
When a table t1 has fields a and b,
invalid column name should return following error message

{noformat}
tajo> select a, b1 from t1;
Some targets cannot be evaluated in the query block "@ROOT"
{noformat}

But, following case results in java.lang.NullPointerException
(Note that invalid column name is 'b1')

{noformat}
tajo> select sum(cast(a as int8)), b1 from t1;
java.lang.NullPointerException
	at org.apache.tajo.engine.planner.LogicalPlan.resolveColumn(LogicalPlan.java:192)
	at org.apache.tajo.engine.planner.LogicalPlanner.createFieldEval(LogicalPlanner.java:1261)
	at org.apache.tajo.engine.planner.LogicalPlanner.createEvalTree(LogicalPlanner.java:1158)
	at org.apache.tajo.engine.planner.LogicalPlanner.createEvalTree(LogicalPlanner.java:1078)
	at org.apache.tajo.engine.planner.LogicalPlanner.createTarget(LogicalPlanner.java:1322)
	at org.apache.tajo.engine.planner.LogicalPlan$QueryBlock.fillTarget(LogicalPlan.java:692)
	at org.apache.tajo.engine.planner.LogicalPlan$QueryBlock.fillTargets(LogicalPlan.java:718)
	at org.apache.tajo.engine.planner.LogicalPlan$QueryBlock.checkAndResolveTargets(LogicalPlan.java:734)
	at org.apache.tajo.engine.planner.LogicalPlanner.insertGroupbyNodeIfUnresolved(LogicalPlanner.java:715)
	at org.apache.tajo.engine.planner.LogicalPlanner.visitProjection(LogicalPlanner.java:665)
	at org.apache.tajo.engine.planner.LogicalPlanner.visitProjection(LogicalPlanner.java:73)
	at org.apache.tajo.engine.planner.BaseAlgebraVisitor.visitChild(BaseAlgebraVisitor.java:53)
	at org.apache.tajo.engine.planner.LogicalPlanner.createPlan(LogicalPlanner.java:106)
	at org.apache.tajo.master.GlobalEngine.createLogicalPlan(GlobalEngine.java:225)
	at org.apache.tajo.master.GlobalEngine.executeQuery(GlobalEngine.java:138)
	at org.apache.tajo.master.TajoMasterClientService$TajoMasterClientProtocolServiceHandler.submitQuery(TajoMasterClientService.java:135)
	at org.apache.tajo.ipc.TajoMasterClientProtocol$TajoMasterClientProtocolService$2.callBlockingMethod(TajoMasterClientProtocol.java:215)
	at org.apache.tajo.rpc.BlockingRpcServer$ServerHandler.messageReceived(BlockingRpcServer.java:91)
	at org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:80)
	at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:545)
	at org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:754)
	at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:302)
	at org.jboss.netty.handler.codec.oneone.OneToOneDecoder.handleUpstream(OneToOneDecoder.java:76)
	at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:545)
	at org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:754)
	at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:302)
	at org.jboss.netty.handler.codec.frame.FrameDecoder.unfoldAndFireMessageReceived(FrameDecoder.java:317)
	at org.jboss.netty.handler.codec.frame.FrameDecoder.callDecode(FrameDecoder.java:299)
	at org.jboss.netty.handler.codec.frame.FrameDecoder.messageReceived(FrameDecoder.java:216)
	at org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:80)
	at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:545)
	at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:540)
	at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:274)
	at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:261)
	at org.jboss.netty.channel.socket.nio.NioWorker.read(NioWorker.java:349)
	at org.jboss.netty.channel.socket.nio.NioWorker.processSelectedKeys(NioWorker.java:280)
	at org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:200)
	at org.jboss.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108)
	at org.jboss.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:44)
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
	at java.lang.Thread.run(Thread.java:662)
{noformat}


  was:
When a table t1 has fields a, b,
invalid column name should return following error message

{noformat}
tajo> select a, b1 from t1;
Some targets cannot be evaluated in the query block "@ROOT"
{noformat}

But, following case results in java.lang.NullPointerException

{noformat}
tajo> select sum(cast(a as int8)), b1 from t1;
java.lang.NullPointerException
	at org.apache.tajo.engine.planner.LogicalPlan.resolveColumn(LogicalPlan.java:192)
	at org.apache.tajo.engine.planner.LogicalPlanner.createFieldEval(LogicalPlanner.java:1261)
	at org.apache.tajo.engine.planner.LogicalPlanner.createEvalTree(LogicalPlanner.java:1158)
	at org.apache.tajo.engine.planner.LogicalPlanner.createEvalTree(LogicalPlanner.java:1078)
	at org.apache.tajo.engine.planner.LogicalPlanner.createTarget(LogicalPlanner.java:1322)
	at org.apache.tajo.engine.planner.LogicalPlan$QueryBlock.fillTarget(LogicalPlan.java:692)
	at org.apache.tajo.engine.planner.LogicalPlan$QueryBlock.fillTargets(LogicalPlan.java:718)
	at org.apache.tajo.engine.planner.LogicalPlan$QueryBlock.checkAndResolveTargets(LogicalPlan.java:734)
	at org.apache.tajo.engine.planner.LogicalPlanner.insertGroupbyNodeIfUnresolved(LogicalPlanner.java:715)
	at org.apache.tajo.engine.planner.LogicalPlanner.visitProjection(LogicalPlanner.java:665)
	at org.apache.tajo.engine.planner.LogicalPlanner.visitProjection(LogicalPlanner.java:73)
	at org.apache.tajo.engine.planner.BaseAlgebraVisitor.visitChild(BaseAlgebraVisitor.java:53)
	at org.apache.tajo.engine.planner.LogicalPlanner.createPlan(LogicalPlanner.java:106)
	at org.apache.tajo.master.GlobalEngine.createLogicalPlan(GlobalEngine.java:225)
	at org.apache.tajo.master.GlobalEngine.executeQuery(GlobalEngine.java:138)
	at org.apache.tajo.master.TajoMasterClientService$TajoMasterClientProtocolServiceHandler.submitQuery(TajoMasterClientService.java:135)
	at org.apache.tajo.ipc.TajoMasterClientProtocol$TajoMasterClientProtocolService$2.callBlockingMethod(TajoMasterClientProtocol.java:215)
	at org.apache.tajo.rpc.BlockingRpcServer$ServerHandler.messageReceived(BlockingRpcServer.java:91)
	at org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:80)
	at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:545)
	at org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:754)
	at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:302)
	at org.jboss.netty.handler.codec.oneone.OneToOneDecoder.handleUpstream(OneToOneDecoder.java:76)
	at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:545)
	at org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:754)
	at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:302)
	at org.jboss.netty.handler.codec.frame.FrameDecoder.unfoldAndFireMessageReceived(FrameDecoder.java:317)
	at org.jboss.netty.handler.codec.frame.FrameDecoder.callDecode(FrameDecoder.java:299)
	at org.jboss.netty.handler.codec.frame.FrameDecoder.messageReceived(FrameDecoder.java:216)
	at org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:80)
	at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:545)
	at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:540)
	at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:274)
	at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:261)
	at org.jboss.netty.channel.socket.nio.NioWorker.read(NioWorker.java:349)
	at org.jboss.netty.channel.socket.nio.NioWorker.processSelectedKeys(NioWorker.java:280)
	at org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:200)
	at org.jboss.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108)
	at org.jboss.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:44)
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
	at java.lang.Thread.run(Thread.java:662)
{noformat}


> java.lang.NullPointerException for invalid column name
> ------------------------------------------------------
>
>                 Key: TAJO-434
>                 URL: https://issues.apache.org/jira/browse/TAJO-434
>             Project: Tajo
>          Issue Type: Bug
>            Reporter: Keuntae Park
>
> When a table t1 has fields a and b,
> invalid column name should return following error message
> {noformat}
> tajo> select a, b1 from t1;
> Some targets cannot be evaluated in the query block "@ROOT"
> {noformat}
> But, following case results in java.lang.NullPointerException
> (Note that invalid column name is 'b1')
> {noformat}
> tajo> select sum(cast(a as int8)), b1 from t1;
> java.lang.NullPointerException
> 	at org.apache.tajo.engine.planner.LogicalPlan.resolveColumn(LogicalPlan.java:192)
> 	at org.apache.tajo.engine.planner.LogicalPlanner.createFieldEval(LogicalPlanner.java:1261)
> 	at org.apache.tajo.engine.planner.LogicalPlanner.createEvalTree(LogicalPlanner.java:1158)
> 	at org.apache.tajo.engine.planner.LogicalPlanner.createEvalTree(LogicalPlanner.java:1078)
> 	at org.apache.tajo.engine.planner.LogicalPlanner.createTarget(LogicalPlanner.java:1322)
> 	at org.apache.tajo.engine.planner.LogicalPlan$QueryBlock.fillTarget(LogicalPlan.java:692)
> 	at org.apache.tajo.engine.planner.LogicalPlan$QueryBlock.fillTargets(LogicalPlan.java:718)
> 	at org.apache.tajo.engine.planner.LogicalPlan$QueryBlock.checkAndResolveTargets(LogicalPlan.java:734)
> 	at org.apache.tajo.engine.planner.LogicalPlanner.insertGroupbyNodeIfUnresolved(LogicalPlanner.java:715)
> 	at org.apache.tajo.engine.planner.LogicalPlanner.visitProjection(LogicalPlanner.java:665)
> 	at org.apache.tajo.engine.planner.LogicalPlanner.visitProjection(LogicalPlanner.java:73)
> 	at org.apache.tajo.engine.planner.BaseAlgebraVisitor.visitChild(BaseAlgebraVisitor.java:53)
> 	at org.apache.tajo.engine.planner.LogicalPlanner.createPlan(LogicalPlanner.java:106)
> 	at org.apache.tajo.master.GlobalEngine.createLogicalPlan(GlobalEngine.java:225)
> 	at org.apache.tajo.master.GlobalEngine.executeQuery(GlobalEngine.java:138)
> 	at org.apache.tajo.master.TajoMasterClientService$TajoMasterClientProtocolServiceHandler.submitQuery(TajoMasterClientService.java:135)
> 	at org.apache.tajo.ipc.TajoMasterClientProtocol$TajoMasterClientProtocolService$2.callBlockingMethod(TajoMasterClientProtocol.java:215)
> 	at org.apache.tajo.rpc.BlockingRpcServer$ServerHandler.messageReceived(BlockingRpcServer.java:91)
> 	at org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:80)
> 	at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:545)
> 	at org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:754)
> 	at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:302)
> 	at org.jboss.netty.handler.codec.oneone.OneToOneDecoder.handleUpstream(OneToOneDecoder.java:76)
> 	at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:545)
> 	at org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:754)
> 	at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:302)
> 	at org.jboss.netty.handler.codec.frame.FrameDecoder.unfoldAndFireMessageReceived(FrameDecoder.java:317)
> 	at org.jboss.netty.handler.codec.frame.FrameDecoder.callDecode(FrameDecoder.java:299)
> 	at org.jboss.netty.handler.codec.frame.FrameDecoder.messageReceived(FrameDecoder.java:216)
> 	at org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:80)
> 	at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:545)
> 	at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:540)
> 	at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:274)
> 	at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:261)
> 	at org.jboss.netty.channel.socket.nio.NioWorker.read(NioWorker.java:349)
> 	at org.jboss.netty.channel.socket.nio.NioWorker.processSelectedKeys(NioWorker.java:280)
> 	at org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:200)
> 	at org.jboss.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108)
> 	at org.jboss.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:44)
> 	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
> 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
> 	at java.lang.Thread.run(Thread.java:662)
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.1.4#6159)

Mime
View raw message