Daniel Barclay (Drill) created DRILL-3885:
---------------------------------------------

             Summary: Column alias "`f.c`" rejected if number of regions is > 1 
in HBase unit tests
                 Key: DRILL-3885
                 URL: https://issues.apache.org/jira/browse/DRILL-3885
             Project: Apache Drill
          Issue Type: Bug
            Reporter: Daniel Barclay (Drill)


Drill rejects the column alias {{`f.c`}}, because of its period character, in 
this query:

{noformat}
SELECT
  row_key, convert_from(tableName.f.c, 'UTF8') `f.c`
FROM
  hbase.`TestTable3` tableName
WHERE
  row_key LIKE '08%0' OR row_key LIKE '%70'
{noformat}

in unit test {{TestHBaseFilterPushDown.testFilterPushDownRowKeyLike}} if the 
number of regions used in {{HBaseTestsSuite}} is set to something greater than 
one.

One problem seems to be that the validation check is inconsistent, happening 
only if the data structure containing that alias get serialized and 
deserialized.

The rejection of that alias seems like a problem (at least from the SQL level), 
although it seems that it might be reasonable given some nearby code, 
suggesting that maybe names/expressions/something aren't encoded enough to 
handle name segments with periods. 

The exception stack trace is:
{noformat}
org.apache.drill.exec.rpc.RpcException: 
org.apache.drill.common.exceptions.UserRemoteException: SYSTEM ERROR: 
UnsupportedOperationException: Field references must be singular names.

Fragment 1:1

[Error Id: 34475f52-6f22-43be-9011-c31a84469781 on dev-linux2:31010]
        at 
org.apache.drill.exec.rpc.RpcException.mapException(RpcException.java:60)
        at 
org.apache.drill.exec.client.DrillClient$ListHoldingResultsListener.getResults(DrillClient.java:386)
        at 
org.apache.drill.exec.client.DrillClient.runQuery(DrillClient.java:291)
        at 
org.apache.drill.BaseTestQuery.testRunAndReturn(BaseTestQuery.java:292)
        at 
org.apache.drill.BaseTestQuery.testSqlWithResults(BaseTestQuery.java:279)
        at 
org.apache.drill.hbase.BaseHBaseTest.runHBaseSQLlWithResults(BaseHBaseTest.java:86)
        at 
org.apache.drill.hbase.BaseHBaseTest.runHBaseSQLVerifyCount(BaseHBaseTest.java:90)
        at 
org.apache.drill.hbase.TestHBaseFilterPushDown.testFilterPushDownRowKeyLike(TestHBaseFilterPushDown.java:466)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at java.lang.reflect.Method.invoke(Method.java:606)
Caused by: org.apache.drill.common.exceptions.UserRemoteException: SYSTEM 
ERROR: UnsupportedOperationException: Field references must be singular names.

Fragment 1:1

[Error Id: 34475f52-6f22-43be-9011-c31a84469781 on dev-linux2:31010]
        at 
org.apache.drill.exec.rpc.user.QueryResultHandler.resultArrived(QueryResultHandler.java:118)
        at 
org.apache.drill.exec.rpc.user.UserClient.handleReponse(UserClient.java:110)
        at 
org.apache.drill.exec.rpc.BasicClientWithConnection.handle(BasicClientWithConnection.java:47)
        at 
org.apache.drill.exec.rpc.BasicClientWithConnection.handle(BasicClientWithConnection.java:1)
        at org.apache.drill.exec.rpc.RpcBus.handle(RpcBus.java:61)
        at 
org.apache.drill.exec.rpc.RpcBus$InboundHandler.decode(RpcBus.java:233)
        at org.apache.drill.exec.rpc.RpcBus$InboundHandler.decode(RpcBus.java:1)
        at 
io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:89)
        at 
io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:339)
        at 
io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:324)
        at 
io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:103)
        at 
io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:339)
        at 
io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:324)
        at 
io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:242)
        at 
io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:339)
        at 
io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:324)
        at 
io.netty.channel.ChannelInboundHandlerAdapter.channelRead(ChannelInboundHandlerAdapter.java:86)
        at 
io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:339)
        at 
io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:324)
        at 
io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:847)
        at 
io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:131)
        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:111)
        at java.lang.Thread.run(Thread.java:745)
{noformat}




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to