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

Jacques Nadeau updated DRILL-1380:
----------------------------------
    Fix Version/s: Future

> CSV file queries raise an exception when no data is returned
> ------------------------------------------------------------
>
>                 Key: DRILL-1380
>                 URL: https://issues.apache.org/jira/browse/DRILL-1380
>             Project: Apache Drill
>          Issue Type: Bug
>    Affects Versions: 0.5.0
>         Environment: Mac OS X
> java version "1.7.0_67"
> Java(TM) SE Runtime Environment (build 1.7.0_67-b01)
> Java HotSpot(TM) 64-Bit Server VM (build 24.65-b04, mixed mode)
>            Reporter: Keys Botzum
>            Priority: Minor
>             Fix For: Future
>
>
> CSV file queried:
> cat ~/Downloads/t.csv 
> /output/foo/20131101,0,1,fooffx_20131101,0,2,0,6,,
> /output/foo/20131102,0,1,fooffx_20131102,0,2,0,6,,
> /output/foo/20131104,0,1,fooffx_20131104,0,2,0,6,,
> /output/foo/20131105,0,1,fooffx_20131105,0,2,0,6,,
> /output/foo/20131106,0,1,fooffx_20131106,0,2,0,6,,
> /output/foo/20131107,0,1,fooffx_20131107,0,2,0,6,,
> /output/foo/20131108,0,1,fooffx_20131108,0,2,0,6,,
> /output/foo/20131109,0,1,fooffx_20131109,0,2,0,6,,
> /output/foo/20131110,0,1,fooffx_20131110,0,2,0,6,,
> this works:
> 0: jdbc:drill:zk=local> SELECT * FROM dfs.`/Users/kbotzum/Downloads/t.csv` 
> where columns[1] < 2;
> +------------+
> |  columns   |
> +------------+
> | ["/output/foo/20131101","0","1","fooffx_20131101","0","2","0","6",""] |
> | ["/output/foo/20131102","0","1","fooffx_20131102","0","2","0","6",""] |
> | ["/output/foo/20131104","0","1","fooffx_20131104","0","2","0","6",""] |
> | ["/output/foo/20131105","0","1","fooffx_20131105","0","2","0","6",""] |
> | ["/output/foo/20131106","0","1","fooffx_20131106","0","2","0","6",""] |
> | ["/output/foo/20131107","0","1","fooffx_20131107","0","2","0","6",""] |
> | ["/output/foo/20131108","0","1","fooffx_20131108","0","2","0","6",""] |
> | ["/output/foo/20131109","0","1","fooffx_20131109","0","2","0","6",""] |
> | ["/output/foo/20131110","0","1","fooffx_20131110","0","2","0","6",""] |
> +------------+
> 9 rows selected (0.196 seconds)
> This doesn't: 
> 0: jdbc:drill:zk=local> SELECT * FROM dfs.`/Users/kbotzum/Downloads/t.csv` 
> where columns[1] > 2;
> Error: exception while executing query: DrillBuf(ridx: 0, widx: 0, cap: 0/0, 
> unwrapped: DrillBuf(ridx: 0, widx: 0, cap: 0/0, unwrapped: 
> EmptyByteBufLE)).slice(0, 4) (state=,code=0)
> Obviously it returns no values since the query matches nothing, but the 
> exception shouldn't occur. Here is what I hope is a relevant snippet from the 
> sqlline log:
> 2014-09-08 10:24:19,548 [9ff5a0c6-fb2a-4e66-a3d0-a29bb5fc248b:frag:0:0] DEBUG 
> o.a.drill.exec.ops.OperatorContext - Closing context for 
> org.apache.drill.exec.store.dfs.easy.EasySubScan
> 2014-09-08 10:24:19,549 [UserServer-1] DEBUG 
> o.a.d.e.w.fragment.FragmentExecutor - Cancelled Fragment query_id {
>   part1: -6920448475907076506
>   part2: -6642630660714650485
> }
> major_fragment_id: 0
> minor_fragment_id: 0
> 2014-09-08 10:24:19,550 [9ff5a0c6-fb2a-4e66-a3d0-a29bb5fc248b:frag:0:0] WARN  
> o.a.d.e.p.impl.SendingAccountor - Failure while waiting for send complete.
> java.lang.InterruptedException: null
>       at 
> java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireSharedInterruptibly(AbstractQueuedSynchronizer.java:1301)
>  ~[na:1.7.0_67]
>       at java.util.concurrent.Semaphore.acquire(Semaphore.java:472) 
> ~[na:1.7.0_67]
>       at 
> org.apache.drill.exec.physical.impl.SendingAccountor.waitForSendComplete(SendingAccountor.java:44)
>  ~[drill-java-exec-0.5.0-incubating-rebuffed.jar:0.5.0-incubating]
>       at 
> org.apache.drill.exec.physical.impl.ScreenCreator$ScreenRoot.stop(ScreenCreator.java:187)
>  [drill-java-exec-0.5.0-incubating-rebuffed.jar:0.5.0-incubating]
>       at 
> org.apache.drill.exec.work.fragment.FragmentExecutor.closeOutResources(FragmentExecutor.java:132)
>  [drill-java-exec-0.5.0-incubating-rebuffed.jar:0.5.0-incubating]
>       at 
> org.apache.drill.exec.work.fragment.FragmentExecutor.run(FragmentExecutor.java:109)
>  [drill-java-exec-0.5.0-incubating-rebuffed.jar:0.5.0-incubating]
>       at 
> org.apache.drill.exec.work.WorkManager$RunnableWrapper.run(WorkManager.java:250)
>  [drill-java-exec-0.5.0-incubating-rebuffed.jar:0.5.0-incubating]
>       at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
>  [na:1.7.0_67]
>       at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
>  [na:1.7.0_67]
>       at java.lang.Thread.run(Thread.java:745) [na:1.7.0_67]



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

Reply via email to