Github user jihoonson commented on the pull request:
https://github.com/apache/tajo/pull/503#issuecomment-100163043
It seems that some cases are missed.
Here is a failure example.
```
default> create table test1 (col1 char);
OK
default> insert into test1 select 'a';
(1 rows, 0.23 sec, 319 B inserted)
default> select * from test1;
col1
-------------------------------
ERROR: java.lang.ArrayIndexOutOfBoundsException
java.sql.SQLException: java.lang.ArrayIndexOutOfBoundsException
at
org.apache.tajo.jdbc.TajoResultSetBase.next(TajoResultSetBase.java:786)
at
org.apache.tajo.cli.tsql.DefaultTajoCliOutputFormatter.printResult(DefaultTajoCliOutputFormatter.java:105)
at
org.apache.tajo.cli.tsql.TajoCli.localQueryCompleted(TajoCli.java:558)
at org.apache.tajo.cli.tsql.TajoCli.executeQuery(TajoCli.java:532)
at
org.apache.tajo.cli.tsql.TajoCli.executeParsedResults(TajoCli.java:447)
at org.apache.tajo.cli.tsql.TajoCli.runShell(TajoCli.java:419)
at org.apache.tajo.cli.tsql.TajoCli.main(TajoCli.java:692)
Caused by: java.io.IOException: java.lang.ArrayIndexOutOfBoundsException
at org.apache.tajo.jdbc.FetchResultSet.nextTuple(FetchResultSet.java:87)
at
org.apache.tajo.jdbc.TajoResultSetBase.next(TajoResultSetBase.java:780)
... 6 more
Caused by: com.google.protobuf.ServiceException:
java.lang.ArrayIndexOutOfBoundsException
at
org.apache.tajo.client.QueryClientImpl.fetchNextQueryResult(QueryClientImpl.java:370)
at
org.apache.tajo.client.TajoClientImpl.fetchNextQueryResult(TajoClientImpl.java:134)
at org.apache.tajo.jdbc.FetchResultSet.nextTuple(FetchResultSet.java:69)
... 7 more
```
This is the master log.
```
2015-05-08 18:02:04,216 ERROR
org.apache.tajo.master.TajoMasterClientService:
java.lang.ArrayIndexOutOfBoundsException
at java.lang.System.arraycopy(Native Method)
at
org.apache.tajo.storage.RowStoreUtil$RowStoreEncoder.toBytes(RowStoreUtil.java:203)
at
org.apache.tajo.master.exec.NonForwardQueryResultFileScanner.getNextRows(NonForwardQueryResultFileScanner.java:181)
at
org.apache.tajo.master.TajoMasterClientService$TajoMasterClientProtocolServiceHandler.getQueryResultData(TajoMasterClientService.java:551)
at
org.apache.tajo.ipc.TajoMasterClientProtocol$TajoMasterClientProtocolService$2.callBlockingMethod(TajoMasterClientProtocol.java:549)
at
org.apache.tajo.rpc.BlockingRpcServer$ServerHandler.channelRead0(BlockingRpcServer.java:100)
at
org.apache.tajo.rpc.BlockingRpcServer$ServerHandler.channelRead0(BlockingRpcServer.java:61)
at
io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:105)
at
io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:308)
at
io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:294)
at
io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:103)
at
io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:308)
at
io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:294)
at
io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:182)
at
io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:308)
at
io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:294)
at
io.netty.channel.ChannelInboundHandlerAdapter.channelRead(ChannelInboundHandlerAdapter.java:86)
at
org.apache.tajo.rpc.MonitorServerHandler.channelRead(MonitorServerHandler.java:70)
at
io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:308)
at
io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:294)
at
io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:846)
at
io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:130)
at
io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:511)
at
io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:468)
at
io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:382)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:354)
at
io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:116)
at java.lang.Thread.run(Thread.java:745)
```
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---