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

Arina Ielchiieva resolved DRILL-5024.
-------------------------------------
    Resolution: Fixed

> CTAS with LIMIT 0 query in SELECT stmt does not create parquet file
> -------------------------------------------------------------------
>
>                 Key: DRILL-5024
>                 URL: https://issues.apache.org/jira/browse/DRILL-5024
>             Project: Apache Drill
>          Issue Type: Bug
>          Components: Execution - Flow
>    Affects Versions: 1.8.0
>            Reporter: Khurram Faraaz
>            Priority: Major
>             Fix For: 1.17.0
>
>
> Note that CTAS was successful
> {noformat}
> 0: jdbc:drill:schema=dfs.tmp> create table regtbl_w0rows as select * from 
> typeall_l LIMIT 0;
> +-----------+----------------------------+
> | Fragment  | Number of records written  |
> +-----------+----------------------------+
> | 0_0       | 0                          |
> +-----------+----------------------------+
> 1 row selected (0.51 seconds)
> {noformat}
> But a SELECT on CTAS created file fails.
> {noformat}
> 0: jdbc:drill:schema=dfs.tmp> select * from regtbl_w0rows;
> Error: VALIDATION ERROR: From line 1, column 15 to line 1, column 27: Table 
> 'regtbl_w0rows' not found
> SQL Query null
> [Error Id: 0569cf98-3800-43ee-b635-aa101b016d46 on centos-01.qa.lab:31010] 
> (state=,code=0)
> {noformat}
> DROP on the CTAS created table also fails
> {noformat}
> 0: jdbc:drill:schema=dfs.tmp> drop table regtbl_w0rows;
> Error: VALIDATION ERROR: Table [regtbl_w0rows] not found
> [Error Id: fb0b1ea8-f76d-42e2-b69c-4beae2798bdf on centos-01.qa.lab:31010] 
> (state=,code=0)
> 0: jdbc:drill:schema=dfs.tmp>
> {noformat}
> Verified that CTAS did not create a physical file in dfs.tmp schema
> {noformat}
> [test@cent01 bin]# hadoop fs -ls /tmp/regtbl_w0rows
> ls: `/tmp/regtbl_w0rows': No such file or directory
> {noformat}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to