drill-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jinfeng Ni (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (DRILL-3408) CTAS partition by columns[i] from cdv fails
Date Sat, 27 Jun 2015 00:13:05 GMT

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

Jinfeng Ni resolved DRILL-3408.
-------------------------------
    Resolution: Fixed

The error for your CTAS seems to be expected.

Partitioning columns could only be the columns in the created tables. Therefore, the column
name in partition by clause should be unqualified identifier; it would not accept t1.a, nor
t1.columns[1], nor a[b][c].

If you want to partition by columns[0], columns[1]

{code}
create table t1 ( c1, c2, c3) 
partition by (c1, c2)
as
select columns[0], columns[1], columns[2]
from csv_file;
{code}

> CTAS partition by columns[i] from cdv fails
> -------------------------------------------
>
>                 Key: DRILL-3408
>                 URL: https://issues.apache.org/jira/browse/DRILL-3408
>             Project: Apache Drill
>          Issue Type: Bug
>          Components: Query Planning & Optimization
>            Reporter: Sean Hsuan-Yi Chu
>            Assignee: Jinfeng Ni
>
> CTAS does not work when users try to partition by index on complex types.
> For example,
> create table `z` partition by columns[0] as select columns[0], columns[1], columns[2]
from `t.csv`;
> Will result into 
> Error: PARSE ERROR: Encountered "columns" at line 1, column 31.
> Query parser does not support it; We need to do it from here



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

Mime
View raw message