You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@drill.apache.org by "Victoria Markman (JIRA)" <ji...@apache.org> on 2015/02/25 19:53:04 UTC
[jira] [Resolved] (DRILL-2202) Star is no expanded correctly during
group by over named subquery
[ https://issues.apache.org/jira/browse/DRILL-2202?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Victoria Markman resolved DRILL-2202.
-------------------------------------
Resolution: Fixed
Fix Version/s: (was: 1.0.0)
0.8.0
> Star is no expanded correctly during group by over named subquery
> -----------------------------------------------------------------
>
> Key: DRILL-2202
> URL: https://issues.apache.org/jira/browse/DRILL-2202
> Project: Apache Drill
> Issue Type: Bug
> Components: Query Planning & Optimization
> Affects Versions: 0.8.0
> Reporter: Victoria Markman
> Assignee: Sean Hsuan-Yi Chu
> Fix For: 0.8.0
>
> Attachments: drillbit.log
>
>
> I gave subquery name and named all the columns.
> Group by condition is the same as expanded star ...
> Should work.
> {code}
> 0: jdbc:drill:schema=dfs> select * from ( select a1, b1, c1 from t1 ) as dt(x1, x2, x3) group by dt.x1, dt.x2, dt.x3;
> Query failed: AssertionError: Internal error: invariant violated: conversion result not null
> Error: exception while executing query: Failure while executing query. (state=,code=0)
> {code}
> Workaround: replace star with column names manually:
> {code}
> 0: jdbc:drill:schema=dfs> select dt.x1, dt.x2, dt.x3 from ( select a1, b1, c1 from t1 ) as dt(x1, x2, x3) group by dt.x1, dt.x2, dt.x3;
> +------------+------------+------------+
> | x1 | x2 | x3 |
> +------------+------------+------------+
> | 1 | aaaaa | 2015-01-01 |
> | 2 | bbbbb | 2015-01-02 |
> | 3 | ccccc | 2015-01-03 |
> | 4 | null | 2015-01-04 |
> | 5 | eeeee | 2015-01-05 |
> | 6 | fffff | 2015-01-06 |
> | 7 | ggggg | 2015-01-07 |
> | null | hhhhh | 2015-01-08 |
> | 9 | iiiii | null |
> | 10 | jjjjj | 2015-01-10 |
> +------------+------------+------------+
> 10 rows selected (0.16 seconds)
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)