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

[jira] [Resolved] (DRILL-3408) CTAS partition by columns[i] from cdv fails

     [ 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)