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

Drill query fails when file name contains semicolon

    XMLWordPrintableJSON

Details

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

    Description

      Queries on the tables which contain semicolon in the name:

      select * from dfs.`/tmp/q:0`
      

      fails with error:

      org.apache.drill.common.exceptions.UserRemoteException: VALIDATION ERROR: java.net.URISyntaxException: Relative path in absolute URI: q:0
      
      SQL Query null
      
      [Error Id: 34fafee1-8fbe-4fe0-9fcb-ddcc926bb192 on user515050-pc:31010]
      
      (java.lang.IllegalArgumentException) java.net.URISyntaxException: Relative path in absolute URI: q:0
       org.apache.hadoop.fs.Path.initialize():205
       org.apache.hadoop.fs.Path.<init>():171
       org.apache.hadoop.fs.Path.<init>():93
       org.apache.hadoop.fs.Globber.glob():253
       org.apache.hadoop.fs.FileSystem.globStatus():1655
       org.apache.drill.exec.store.dfs.DrillFileSystem.globStatus():547
       org.apache.drill.exec.store.dfs.FileSelection.create():274
       org.apache.drill.exec.store.dfs.WorkspaceSchemaFactory$WorkspaceSchema.create():607
       org.apache.drill.exec.store.dfs.WorkspaceSchemaFactory$WorkspaceSchema.create():408
       org.apache.drill.exec.planner.sql.ExpandingConcurrentMap.getNewEntry():96
       org.apache.drill.exec.planner.sql.ExpandingConcurrentMap.get():90
       org.apache.drill.exec.store.dfs.WorkspaceSchemaFactory$WorkspaceSchema.getTable():561
       org.apache.drill.exec.store.dfs.FileSystemSchemaFactory$FileSystemSchema.getTable():132
       org.apache.calcite.jdbc.SimpleCalciteSchema.getImplicitTable():82
       org.apache.calcite.jdbc.CalciteSchema.getTable():257
       org.apache.calcite.sql.validate.SqlValidatorUtil.getTableEntryFrom():1022
       org.apache.calcite.sql.validate.SqlValidatorUtil.getTableEntry():979
       org.apache.calcite.prepare.CalciteCatalogReader.getTable():123
       org.apache.drill.exec.planner.sql.SqlConverter$DrillCalciteCatalogReader.getTable():650
       org.apache.drill.exec.planner.sql.SqlConverter$DrillValidator.validateFrom():260
       org.apache.calcite.sql.validate.SqlValidatorImpl.validateSelect():3219
       org.apache.calcite.sql.validate.SelectNamespace.validateImpl():60
       org.apache.calcite.sql.validate.AbstractNamespace.validate():84
       org.apache.calcite.sql.validate.SqlValidatorImpl.validateNamespace():947
       org.apache.calcite.sql.validate.SqlValidatorImpl.validateQuery():928
       org.apache.calcite.sql.SqlSelect.validate():226
       org.apache.calcite.sql.validate.SqlValidatorImpl.validateScopedExpression():903
       org.apache.calcite.sql.validate.SqlValidatorImpl.validate():613
       org.apache.drill.exec.planner.sql.SqlConverter.validate():190
       org.apache.drill.exec.planner.sql.handlers.DefaultSqlHandler.validateNode():644
       org.apache.drill.exec.planner.sql.handlers.DefaultSqlHandler.validateAndConvert():204
       org.apache.drill.exec.planner.sql.handlers.DefaultSqlHandler.getPlan():176
       org.apache.drill.exec.planner.sql.DrillSqlWorker.getQueryPlan():145
       org.apache.drill.exec.planner.sql.DrillSqlWorker.getPlan():83
       org.apache.drill.exec.work.foreman.Foreman.runSQL():567
       org.apache.drill.exec.work.foreman.Foreman.run():266
       java.util.concurrent.ThreadPoolExecutor.runWorker():1149
       java.util.concurrent.ThreadPoolExecutor$Worker.run():624
       java.lang.Thread.run():748
       Caused By (java.net.URISyntaxException) Relative path in absolute URI: q:0
       java.net.URI.checkPath():1823
       java.net.URI.<init>():745
       org.apache.hadoop.fs.Path.initialize():202
       org.apache.hadoop.fs.Path.<init>():171
       org.apache.hadoop.fs.Path.<init>():93
       org.apache.hadoop.fs.Globber.glob():253
       org.apache.hadoop.fs.FileSystem.globStatus():1655
       org.apache.drill.exec.store.dfs.DrillFileSystem.globStatus():547
       org.apache.drill.exec.store.dfs.FileSelection.create():274
       org.apache.drill.exec.store.dfs.WorkspaceSchemaFactory$WorkspaceSchema.create():607
       org.apache.drill.exec.store.dfs.WorkspaceSchemaFactory$WorkspaceSchema.create():408
       org.apache.drill.exec.planner.sql.ExpandingConcurrentMap.getNewEntry():96
       org.apache.drill.exec.planner.sql.ExpandingConcurrentMap.get():90
       org.apache.drill.exec.store.dfs.WorkspaceSchemaFactory$WorkspaceSchema.getTable():561
       org.apache.drill.exec.store.dfs.FileSystemSchemaFactory$FileSystemSchema.getTable():132
       org.apache.calcite.jdbc.SimpleCalciteSchema.getImplicitTable():82
       org.apache.calcite.jdbc.CalciteSchema.getTable():257
       org.apache.calcite.sql.validate.SqlValidatorUtil.getTableEntryFrom():1022
       org.apache.calcite.sql.validate.SqlValidatorUtil.getTableEntry():979
       org.apache.calcite.prepare.CalciteCatalogReader.getTable():123
       org.apache.drill.exec.planner.sql.SqlConverter$DrillCalciteCatalogReader.getTable():650
       org.apache.drill.exec.planner.sql.SqlConverter$DrillValidator.validateFrom():260
       org.apache.calcite.sql.validate.SqlValidatorImpl.validateSelect():3219
       org.apache.calcite.sql.validate.SelectNamespace.validateImpl():60
       org.apache.calcite.sql.validate.AbstractNamespace.validate():84
       org.apache.calcite.sql.validate.SqlValidatorImpl.validateNamespace():947
       org.apache.calcite.sql.validate.SqlValidatorImpl.validateQuery():928
       org.apache.calcite.sql.SqlSelect.validate():226
       org.apache.calcite.sql.validate.SqlValidatorImpl.validateScopedExpression():903
       org.apache.calcite.sql.validate.SqlValidatorImpl.validate():613
       org.apache.drill.exec.planner.sql.SqlConverter.validate():190
       org.apache.drill.exec.planner.sql.handlers.DefaultSqlHandler.validateNode():644
       org.apache.drill.exec.planner.sql.handlers.DefaultSqlHandler.validateAndConvert():204
       org.apache.drill.exec.planner.sql.handlers.DefaultSqlHandler.getPlan():176
       org.apache.drill.exec.planner.sql.DrillSqlWorker.getQueryPlan():145
       org.apache.drill.exec.planner.sql.DrillSqlWorker.getPlan():83
       org.apache.drill.exec.work.foreman.Foreman.runSQL():567
       org.apache.drill.exec.work.foreman.Foreman.run():266
       java.util.concurrent.ThreadPoolExecutor.runWorker():1149
       java.util.concurrent.ThreadPoolExecutor$Worker.run():624
       java.lang.Thread.run():748
      
      at org.apache.drill.exec.rpc.user.QueryResultHandler.resultArrived(QueryResultHandler.java:123) ~[classes/:na]
       at org.apache.drill.exec.rpc.user.UserClient.handle(UserClient.java:422) ~[classes/:na]
       at org.apache.drill.exec.rpc.user.UserClient.handle(UserClient.java:96) ~[classes/:na]
       at org.apache.drill.exec.rpc.RpcBus$InboundHandler.decode(RpcBus.java:274) ~[classes/:na]
       at org.apache.drill.exec.rpc.RpcBus$InboundHandler.decode(RpcBus.java:244) ~[classes/:na]
       at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:88) ~[netty-codec-4.0.48.Final.jar:4.0.48.Final]
       at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:356) ~[netty-transport-4.0.48.Final.jar:4.0.48.Final]
       at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:342) ~[netty-transport-4.0.48.Final.jar:4.0.48.Final]
       at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:335) ~[netty-transport-4.0.48.Final.jar:4.0.48.Final]
       at io.netty.handler.timeout.IdleStateHandler.channelRead(IdleStateHandler.java:287) ~[netty-handler-4.0.48.Final.jar:4.0.48.Final]
       at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:356) ~[netty-transport-4.0.48.Final.jar:4.0.48.Final]
       at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:342) ~[netty-transport-4.0.48.Final.jar:4.0.48.Final]
       at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:335) ~[netty-transport-4.0.48.Final.jar:4.0.48.Final]
       at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:102) ~[netty-codec-4.0.48.Final.jar:4.0.48.Final]
       at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:356) ~[netty-transport-4.0.48.Final.jar:4.0.48.Final]
       at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:342) ~[netty-transport-4.0.48.Final.jar:4.0.48.Final]
       at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:335) ~[netty-transport-4.0.48.Final.jar:4.0.48.Final]
       at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:312) ~[netty-codec-4.0.48.Final.jar:4.0.48.Final]
       at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:286) ~[netty-codec-4.0.48.Final.jar:4.0.48.Final]
       at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:356) ~[netty-transport-4.0.48.Final.jar:4.0.48.Final]
       at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:342) ~[netty-transport-4.0.48.Final.jar:4.0.48.Final]
       at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:335) ~[netty-transport-4.0.48.Final.jar:4.0.48.Final]
       at io.netty.channel.ChannelInboundHandlerAdapter.channelRead(ChannelInboundHandlerAdapter.java:86) ~[netty-transport-4.0.48.Final.jar:4.0.48.Final]
       at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:356) ~[netty-transport-4.0.48.Final.jar:4.0.48.Final]
       at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:342) ~[netty-transport-4.0.48.Final.jar:4.0.48.Final]
       at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:335) ~[netty-transport-4.0.48.Final.jar:4.0.48.Final]
       at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1294) ~[netty-transport-4.0.48.Final.jar:4.0.48.Final]
       at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:356) ~[netty-transport-4.0.48.Final.jar:4.0.48.Final]
       at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:342) ~[netty-transport-4.0.48.Final.jar:4.0.48.Final]
       at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:911) ~[netty-transport-4.0.48.Final.jar:4.0.48.Final]
       at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:131) ~[netty-transport-4.0.48.Final.jar:4.0.48.Final]
       at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:645) ~[netty-transport-4.0.48.Final.jar:4.0.48.Final]
       at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:580) ~[netty-transport-4.0.48.Final.jar:4.0.48.Final]
       at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:497) ~[netty-transport-4.0.48.Final.jar:4.0.48.Final]
       at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:459) ~[netty-transport-4.0.48.Final.jar:4.0.48.Final]
       at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:131) ~[netty-common-4.0.48.Final.jar:4.0.48.Final]
       at java.lang.Thread.run(Thread.java:748) ~[na:1.8.0_171]
      

      More critical problem is that if a folder has contains which name contains a semicolon, and the workspace which corresponds to the folder is chosen, each query fails.

      A way to reproduce the issue:
      1. Create file with semicolon in the name and put it to /tmp/ folder.
      2. Execute:

      use dfs.tmp
      

      3. Run any query, for example

      select * from sys.version;
      

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              volodymyr Vova Vysotskyi
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated: