[ 
https://issues.apache.org/jira/browse/DRILL-2775?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16711501#comment-16711501
 ] 

Vitalii Diravka edited comment on DRILL-2775 at 12/6/18 4:30 PM:
-----------------------------------------------------------------

Both cases from this Jira description are no longer the issues. They were 
resolved in scope of DRILL-5546 and DRILL-4185. 
{code:java}
0: jdbc:drill:zk=local> use dfs.tmp;
+-------+--------------------------------------+
|  ok   |               summary                |
+-------+--------------------------------------+
| true  | Default schema changed to [dfs.tmp]  |
+-------+--------------------------------------+
1 row selected (0.099 seconds)
0: jdbc:drill:zk=local> select * from `emptyfolder`;
+--+
|  |
+--+
+--+
No rows selected (1.75 seconds)
0: jdbc:drill:zk=local> create table `emptyfolder` as select * from 
cp.`employee.json` limit 2;
Error: VALIDATION ERROR: A table or view with given name [emptyfolder] already 
exists in schema [dfs.tmp]
0: jdbc:drill:zk=local> select * from dfs.`/tmp/empty.json`;
+--+
|  |
+--+
+--+
No rows selected (0.105 seconds)
0: jdbc:drill:zk=local> create table `emptyfolder` as select * from 
dfs.`/tmp/empty.json`;
Error: VALIDATION ERROR: A table or view with given name [emptyfolder] already 
exists in schema [dfs.tmp]
{code}
See full description about queering empty directories: 
[https://drill.apache.org/docs/data-sources-and-file-formats-introduction/#schemaless-tables]

 


was (Author: vitalii):
Both cases from this Jira description are no longer the issues. They were 
resolved in scope of DRILL-4185. 
{code:java}
0: jdbc:drill:zk=local> use dfs.tmp;
+-------+--------------------------------------+
|  ok   |               summary                |
+-------+--------------------------------------+
| true  | Default schema changed to [dfs.tmp]  |
+-------+--------------------------------------+
1 row selected (0.099 seconds)
0: jdbc:drill:zk=local> select * from `emptyfolder`;
+--+
|  |
+--+
+--+
No rows selected (1.75 seconds)
0: jdbc:drill:zk=local> create table `emptyfolder` as select * from 
cp.`employee.json` limit 2;
Error: VALIDATION ERROR: A table or view with given name [emptyfolder] already 
exists in schema [dfs.tmp]
0: jdbc:drill:zk=local> select * from dfs.`/tmp/empty.json`;
+--+
|  |
+--+
+--+
No rows selected (0.105 seconds)
0: jdbc:drill:zk=local> create table `emptyfolder` as select * from 
dfs.`/tmp/empty.json`;
Error: VALIDATION ERROR: A table or view with given name [emptyfolder] already 
exists in schema [dfs.tmp]
{code}
See full description about queering empty directories: 
[https://drill.apache.org/docs/data-sources-and-file-formats-introduction/#schemaless-tables|https://drill.apache.org/docs/data-sources-and-file-formats-introduction/#schemaless-tables]

 

> message error not clear when doing a select or ctas on empty folder
> -------------------------------------------------------------------
>
>                 Key: DRILL-2775
>                 URL: https://issues.apache.org/jira/browse/DRILL-2775
>             Project: Apache Drill
>          Issue Type: Bug
>          Components: Metadata
>    Affects Versions: 1.4.0
>            Reporter: Rahul Challapalli
>            Assignee: Vitalii Diravka
>            Priority: Minor
>             Fix For: 1.13.0
>
>
> if you have an empty folder "emptyfolder", you get a cryptic error message 
> when you try to query the folder or CTAS a table that has the same name of 
> the empty folder:
> {noformat}
> 0: jdbc:drill:zk=local> select * from emptyfolder;
> Error: PARSE ERROR: Index: 0, Size: 0
> [Error Id: ef86154b-8219-4b48-84bf-cb318f7d4ae4 on abdel-11.qa.lab:31010] 
> (state=,code=0)
> {noformat}
> {noformat}
> 0: jdbc:drill:zk=local> create table emptyfolder as select * from `test.json`;
> Error: SYSTEM ERROR: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
> [Error Id: 1c3965f4-1566-4df6-9bb6-a91211771976 on abdel-11.qa.lab:31010] 
> (state=,code=0)
> {noformat}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to