You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@drill.apache.org by "Rahul Challapalli (JIRA)" <ji...@apache.org> on 2015/04/14 02:51:12 UTC

[jira] [Updated] (DRILL-2777) CTAS, order by and flatten of repeated list result in ExpandConversionRule error

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

Rahul Challapalli updated DRILL-2777:
-------------------------------------
    Description: 
git.commit.id.abbrev=f066786

The below query results in an error :
{code}
create table dfs.ctas_flatten.`test` as select uid, flatten(lst_lst) lst, flatten(lst_lst[0]) from `data1.json` order by flatten(lst_lst[0]);
Query failed: IndexOutOfBoundsException: index (2) must be less than size (2)

Error: exception while executing query: Failure while executing query. (state=,code=0)
{code}

The logs indicate an assertion error :
{code}
 Caused by: java.lang.AssertionError: Internal error: Error while applying rule ExpandConversionRule, args [rel#1757858:AbstractConverter.PHYSICAL.SINGLETON([]).[2](child=rel#1757856:Subset#8.PHYSICAL.ANY([]).[2],convention=PHYSICAL,DrillDistributionTraitDef=SINGLETON([]),sort=[2])]
{code}

The query itself does not have any issues. Also the below variants work :
{code}
1. No flatten of repeated list in the select clause
create table dfs.ctas_flatten.`test` as select uid, flatten(lst_lst[0]) from `data1.json` order by flatten(lst_lst[0]);
2. Removing the flatten from the order by. (Ordering by a scalar has no issues) 
create table dfs.ctas_flatten.`test` as select uid, flatten(lst_lst) lst, flatten(lst_lst[0]) from `data1.json`;
{code}

Attached the data set and the complete error log file

  was:
git.commit.id.abbrev=f066786



        Summary: CTAS, order by and flatten of repeated list result in ExpandConversionRule error  (was: CTAS, order by and flatten of repeated list result in IOOBException)

> CTAS, order by and flatten of repeated list result in ExpandConversionRule error
> --------------------------------------------------------------------------------
>
>                 Key: DRILL-2777
>                 URL: https://issues.apache.org/jira/browse/DRILL-2777
>             Project: Apache Drill
>          Issue Type: Bug
>          Components: Query Planning & Optimization
>            Reporter: Rahul Challapalli
>            Assignee: Jinfeng Ni
>
> git.commit.id.abbrev=f066786
> The below query results in an error :
> {code}
> create table dfs.ctas_flatten.`test` as select uid, flatten(lst_lst) lst, flatten(lst_lst[0]) from `data1.json` order by flatten(lst_lst[0]);
> Query failed: IndexOutOfBoundsException: index (2) must be less than size (2)
> Error: exception while executing query: Failure while executing query. (state=,code=0)
> {code}
> The logs indicate an assertion error :
> {code}
>  Caused by: java.lang.AssertionError: Internal error: Error while applying rule ExpandConversionRule, args [rel#1757858:AbstractConverter.PHYSICAL.SINGLETON([]).[2](child=rel#1757856:Subset#8.PHYSICAL.ANY([]).[2],convention=PHYSICAL,DrillDistributionTraitDef=SINGLETON([]),sort=[2])]
> {code}
> The query itself does not have any issues. Also the below variants work :
> {code}
> 1. No flatten of repeated list in the select clause
> create table dfs.ctas_flatten.`test` as select uid, flatten(lst_lst[0]) from `data1.json` order by flatten(lst_lst[0]);
> 2. Removing the flatten from the order by. (Ordering by a scalar has no issues) 
> create table dfs.ctas_flatten.`test` as select uid, flatten(lst_lst) lst, flatten(lst_lst[0]) from `data1.json`;
> {code}
> Attached the data set and the complete error log file



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