drill-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jason Altekruse (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (DRILL-1608) Unable to use flatten without limit
Date Tue, 25 Nov 2014 23:32:13 GMT

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

Jason Altekruse resolved DRILL-1608.
------------------------------------
    Resolution: Fixed

> Unable to use flatten without limit 
> ------------------------------------
>
>                 Key: DRILL-1608
>                 URL: https://issues.apache.org/jira/browse/DRILL-1608
>             Project: Apache Drill
>          Issue Type: Bug
>            Reporter: Neeraja
>            Assignee: Jason Altekruse
>             Fix For: 0.7.0
>
>
> Unable to use flatten without limit.
> 0: jdbc:drill:zk=local> select flatten(children) as f from dfs.`/Users/nrentachintala/Downloads/drillreleases/apache-drill-0.7.0-incubating-SNAPSHOT/sample-data/test.json`;
> +------------+------------+
> |     f      |     f      |
> +------------+------------+
> java.lang.RuntimeException: java.sql.SQLException: invalid column ordinal: 2
> 	at sqlline.SqlLine$IncrementalRows.hasNext(SqlLine.java:2514)
> 	at sqlline.SqlLine$TableOutputFormat.print(SqlLine.java:2148)
> 	at sqlline.SqlLine.print(SqlLine.java:1809)
> 	at sqlline.SqlLine$Commands.execute(SqlLine.java:3766)
> 	at sqlline.SqlLine$Commands.sql(SqlLine.java:3663)
> 	at sqlline.SqlLine.dispatch(SqlLine.java:889)
> 	at sqlline.SqlLine.begin(SqlLine.java:763)
> 	at sqlline.SqlLine.start(SqlLine.java:498)
> 	at sqlline.SqlLine.main(SqlLine.java:460)
> Applying explicit limit works fine as well as including it as part of a subquery works
fine.
> 0: jdbc:drill:zk=local> select flatten(children) as f from dfs.`/Users/nrentachintala/Downloads/drillreleases/apache-drill-0.7.0-incubating-SNAPSHOT/sample-data/test.json`
limit 6;
> +------------+
> |     f      |
> +------------+
> | {"name":"Jane","gender":"Female","age":"6"} |
> | {"name":"John","gender":"Male","age":"15"} |
> | {"name":"Earl","gender":"Male","age":"10"} |
> | {"name":"Sam","gender":"Male","age":"6"} |
> | {"name":"Kit","gender":"Male","age":"8"} |
> +------------+
> 0: jdbc:drill:zk=local> select c.f.name, c.f.gender,c.f.age from 
> . . . . . . . . . . . > (select flatten(children) as f from dfs.`/Users/nrentachintala/Downloads/drillreleases/apache-drill-0.7.0-incubating-SNAPSHOT/sample-data/test.json`)
c;
> +------------+------------+------------+
> |   EXPR$0   |   EXPR$1   |   EXPR$2   |
> +------------+------------+------------+
> | Jane       | Female     | 6          |
> | John       | Male       | 15         |
> | Earl       | Male       | 10         |
> | Sam        | Male       | 6          |
> | Kit        | Male       | 8          |
> +------------+------------+------------+



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

Mime
View raw message