You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@drill.apache.org by "Abhishek Girish (JIRA)" <ji...@apache.org> on 2015/09/13 06:07:45 UTC

[jira] [Created] (DRILL-3772) DROP TABLE fails for directories with PSV files

Abhishek Girish created DRILL-3772:
--------------------------------------

             Summary: DROP TABLE fails for directories with PSV files
                 Key: DRILL-3772
                 URL: https://issues.apache.org/jira/browse/DRILL-3772
             Project: Apache Drill
          Issue Type: Bug
          Components: Query Planning & Optimization
    Affects Versions: 1.2.0
            Reporter: Abhishek Girish
            Assignee: Jinfeng Ni


I created a simple PSV file with one row. Copied it twice into a directory. Put it on hadoop. Drop table failed, complaining that the directory contains non homogeneous files. 

{code}
# cp a.psv b.psv
# cp a.psv b.psv t1

# hadoop fs -put t1 /tmp/t2

0: jdbc:drill:schema=dfs> select * from dfs.tmp.t2;

+--------------+
|   columns    |
+--------------+
| ["2|3|4|5"]  |
| ["2|3|4|5"]  |
+--------------+
2 rows selected (1.338 seconds)
0: jdbc:drill:schema=dfs> drop table dfs.tmp.t2;

Error: VALIDATION ERROR: Table contains different file formats.
Drop Table is only supported for directories that contain homogeneous file formats consumable by Drill
[Error Id: 19763856-1a23-4438-a7f1-18f6dc280b0b on atsqa6c86.qa.lab:31010] (state=,code=0)
{code}

Works with CSV files:
{code}
# mv a.psv a.csv
# mv b.psv b.csv
# hadoop fs -put t1 /tmp/t3
[root@atsqa6c85 ~]# /opt/drill/bin/sqlline -u jdbc:drill:schema=dfs;zk=10.10.104.85:5181
apache drill 1.0.0
"got drill?"
0: jdbc:drill:schema=dfs> use dfs.tmp;
+-------+--------------------------------------+
|  ok   |               summary                |
+-------+--------------------------------------+
| true  | Default schema changed to [dfs.tmp]  |
+-------+--------------------------------------+
1 row selected (2.211 seconds)
0: jdbc:drill:schema=dfs> drop table t3;
+-------+---------------------+
|  ok   |       summary       |
+-------+---------------------+
| true  | Table [t3] dropped  |
+-------+---------------------+
1 row selected (0.56 seconds)

{code}



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