[
https://issues.apache.org/jira/browse/DRILL-3813?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Vitalii Diravka resolved DRILL-3813.
------------------------------------
Resolution: Done
Assignee: Vitalii Diravka
It was solved 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)
{code}
Starting form Drill 1.13 the empty directory is a Drill schemaless table, see
more:
[https://drill.apache.org/docs/data-sources-and-file-formats-introduction/#schemaless-tables]
> table from directory subtree having no descendent files fails with index error
> ------------------------------------------------------------------------------
>
> Key: DRILL-3813
> URL: https://issues.apache.org/jira/browse/DRILL-3813
> Project: Apache Drill
> Issue Type: Bug
> Components: SQL Parser, Storage - Other
> Reporter: Daniel Barclay
> Assignee: Vitalii Diravka
> Priority: Major
> Fix For: 1.13.0
>
>
> Trying to use as a table a directory subtree that has no descendent files
> (but zero or more descendent directories) yields what seems to be a partially
> handled index out-of-bounds condition.
> For example, with {{/tmp/empty_directory}} being an empty directory:
> {noformat}
> 0: jdbc:drill:zk=local> SELECT * FROM `dfs`.`tmp`.`empty_directory`;
> Error: VALIDATION ERROR: Index: 0, Size: 0
> [Error Id: 747425c9-5350-4813-9f0d-ecf580e15101 on dev-linux2:31010]
> (state=,code=0)
> 0: jdbc:drill:zk=local>
> {noformat}
> Also, with {{/tmp/no_child_files_subtree}} having two child directories and a
> grandchild directory, but not descendent files:
> {noformat}
> 0: jdbc:drill:zk=local> SELECT * FROM `dfs`.`tmp`.`no_child_files_subtree`;
> Error: VALIDATION ERROR: Index: 0, Size: 0
> [Error Id: abc90424-8434-4403-b44b-0ba69ef43151 on dev-linux2:31010]
> (state=,code=0)
> 0: jdbc:drill:zk=local>
> {noformat}
> A directory subtree having no files was expected to be taken as a table with
> no rows (and a null schema).
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)