[
https://issues.apache.org/jira/browse/DRILL-4009?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14986221#comment-14986221
]
Victoria Markman commented on DRILL-4009:
-----------------------------------------
No limit is necessary, just wrap it in subquery:
{code}
0: jdbc:drill:schema=dfs> select * from ( select concat(b1, '***') from t1
group by concat(b1, '***') ) as foo ;
Error: SYSTEM ERROR: AssertionError: Internal error: Type 'RecordType(ANY $f0)'
has no field 'EXPR$0'
[Error Id: a276465d-87fa-4b94-899d-4003b6917bc7 on atsqa4-133.qa.lab:31010]
(state=,code=0)
{code}
> Assert in a query with concat function in a group by and limit in outer query
> -----------------------------------------------------------------------------
>
> Key: DRILL-4009
> URL: https://issues.apache.org/jira/browse/DRILL-4009
> Project: Apache Drill
> Issue Type: Bug
> Components: Query Planning & Optimization
> Affects Versions: 1.2.0
> Reporter: Victoria Markman
>
> {code}
> 0: jdbc:drill:schema=dfs> select * from ( select concat(b1, '***') from t1
> group by concat(b1, '***') ) limit 10;
> Error: SYSTEM ERROR: AssertionError: Internal error: Type 'RecordType(ANY
> $f0)' has no field 'EXPR$0'
> [Error Id: 3366119e-baec-4aa1-b4fe-a58947bba088 on atsqa4-133.qa.lab:31010]
> (state=,code=0)
> {code}
> Works:
> {code}
> 0: jdbc:drill:schema=dfs> select concat(b1, '***') from t1 group by
> concat(b1, '***') limit 10;
> +-----------+
> | EXPR$0 |
> +-----------+
> | *** |
> | aaaaa*** |
> | bbbbb*** |
> | ccccc*** |
> | eeeee*** |
> | fffff*** |
> | ggggg*** |
> | hhhhh*** |
> | iiiii*** |
> | jjjjj*** |
> +-----------+
> 10 rows selected (0.672 seconds)
> {code}
> Drill version:
> {code}
> #Sat Oct 31 01:10:06 UTC 2015
> git.commit.id.abbrev=e4b94a7
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)