Uploaded image for project: 'Apache Drill'
  1. Apache Drill
  2. DRILL-3885

Column alias "`f.c`" rejected if number of regions is > 1 in HBase unit tests

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • None
    • None

    Description

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

      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'
      

      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:

      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)
      

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              dsbos Daniel Barclay
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated: