[
https://issues.apache.org/jira/browse/DRILL-2293?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15901078#comment-15901078
]
Khurram Faraaz commented on DRILL-2293:
---------------------------------------
Tested this on latest Drill 1.10.0 apache mater, commit ID 3dfb4972
The failure reported initially in this JIRA seems to have been Fixed or is not
reproducible.
{noformat}
0: jdbc:drill:schema=dfs.tmp> create table rep_map as select d.map from
`drill_2293.json` d;
+-----------+----------------------------+
| Fragment | Number of records written |
+-----------+----------------------------+
| 0_0 | 1 |
+-----------+----------------------------+
1 row selected (0.853 seconds)
0: jdbc:drill:schema=dfs.tmp> select * from rep_map;
+-----+
| map |
+-----+
|
{"rm":[{"mapid":"m1","mapvalue":{"col1":1,"col2":[0,1,2,3,4,5]},"rptd":[{"a":"foo"},{"b":"boo"}]},{"mapid":"m2","mapvalue":{"col1":0,"col2":[]},"rptd":[{"a":"bar"},{"c":1},{"d":4.5}]}]}
|
+-----+
1 row selected (0.522 seconds)
{noformat}
Same JSON data file was used in test, and the CTAS also created the parquet
file.
{noformat}
[root@centos-01 ~]# hadoop fs -ls /tmp/rep_map
Found 1 items
-rw-r--r-- 3 root root 1188 2017-03-08 10:46 /tmp/rep_map/0_0_0.parquet
[root@centos-01 ~]# cat drill_2293.json
{
"id" : 1,
"map":{"rm": [
{"mapid":"m1","mapvalue":{"col1":1,"col2":[0,1,2,3,4,5]},"rptd": [{ "a":
"foo"},{"b":"boo"}]},
{"mapid":"m2","mapvalue":{"col1":0,"col2":[]},"rptd": [{ "a":
"bar"},{"c":1},{"d":4.5}]}
]}
}
{noformat}
> CTAS does not clean up when it fails
> ------------------------------------
>
> Key: DRILL-2293
> URL: https://issues.apache.org/jira/browse/DRILL-2293
> Project: Apache Drill
> Issue Type: Bug
> Components: Storage - Parquet
> Reporter: Rahul Challapalli
> Fix For: Future
>
>
> git.commit.id.abbrev=6676f2d
> Data Set :
> {code}
> {
> "id" : 1,
> "map":{"rm": [
> {"mapid":"m1","mapvalue":{"col1":1,"col2":[0,1,2,3,4,5]},"rptd": [{ "a":
> "foo"},{"b":"boo"}]},
> {"mapid":"m2","mapvalue":{"col1":0,"col2":[]},"rptd": [{ "a":
> "bar"},{"c":1},{"d":4.5}]}
> ]}
> }
> {code}
> The below query fails :
> {code}
> create table rep_map as select d.map from `temp.json` d;
> Query failed: Query stopped., index: -4, length: 4 (expected: range(0,
> 16384)) [ d76e3f74-7e2c-406f-a7fd-5efc68227e75 on qa-node190.qa.lab:31010 ]
> {code}
> However drill created a folder 'rep_map' and the folder contained a broken
> parquet file.
> {code}
> create table rep_map as select d.map from `temp.json` d;
> +------------+------------+
> | ok | summary |
> +------------+------------+
> | false | Table 'rep_map' already exists. |
> {code}
> Drill should clean up properly in case of a failure.
> I raised a different issue for the actual failure.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)