You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@drill.apache.org by lapro1 <la...@gmail.com> on 2014/11/22 15:50:26 UTC

Create table with auto increment column

Hi,
I tried to create a table with auto increment column in drill, as I could
do it in hive before, but it dropped exception. I think I didn't write it
in adequate syntax.

This was the query:
create table hive_hosts_with_rank(hostname, id) as select columns[0],
rank() over (order by columns[1]) from dfs.`/tmp/hosts/0_0_0.csv`;

I got the exception:
------------+------------+
|     ok     |  summary   |
+------------+------------+
| false      | Error: Node [rel#5528:Subset#11.PHYSICAL.SINGLETON([]).[]]
coul |
+------------+------------+
1 row selected (0.956 seconds)


Does anybody know, how can I create a column like it,

Thanks the answer in advance,
Laszlo

Re: Create table with auto increment column

Posted by Hao Zhu <hz...@maprtech.com>.
Seems window functions are not in Drill yet.
https://issues.apache.org/jira/browse/DRILL-1454

Thanks,
Hao

On Sat, Nov 22, 2014 at 6:50 AM, lapro1 <la...@gmail.com> wrote:

> Hi,
> I tried to create a table with auto increment column in drill, as I could
> do it in hive before, but it dropped exception. I think I didn't write it
> in adequate syntax.
>
> This was the query:
> create table hive_hosts_with_rank(hostname, id) as select columns[0],
> rank() over (order by columns[1]) from dfs.`/tmp/hosts/0_0_0.csv`;
>
> I got the exception:
> ------------+------------+
> |     ok     |  summary   |
> +------------+------------+
> | false      | Error: Node [rel#5528:Subset#11.PHYSICAL.SINGLETON([]).[]]
> coul |
> +------------+------------+
> 1 row selected (0.956 seconds)
>
>
> Does anybody know, how can I create a column like it,
>
> Thanks the answer in advance,
> Laszlo
>

Re: Create table with auto increment column

Posted by Hao Zhu <hz...@maprtech.com>.
Seems window functions are not in Drill yet.
https://issues.apache.org/jira/browse/DRILL-1454

Thanks,
Hao

On Sat, Nov 22, 2014 at 6:50 AM, lapro1 <la...@gmail.com> wrote:

> Hi,
> I tried to create a table with auto increment column in drill, as I could
> do it in hive before, but it dropped exception. I think I didn't write it
> in adequate syntax.
>
> This was the query:
> create table hive_hosts_with_rank(hostname, id) as select columns[0],
> rank() over (order by columns[1]) from dfs.`/tmp/hosts/0_0_0.csv`;
>
> I got the exception:
> ------------+------------+
> |     ok     |  summary   |
> +------------+------------+
> | false      | Error: Node [rel#5528:Subset#11.PHYSICAL.SINGLETON([]).[]]
> coul |
> +------------+------------+
> 1 row selected (0.956 seconds)
>
>
> Does anybody know, how can I create a column like it,
>
> Thanks the answer in advance,
> Laszlo
>