You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@drill.apache.org by "Victoria Markman (JIRA)" <ji...@apache.org> on 2015/02/10 20:33:13 UTC
[jira] [Created] (DRILL-2202) Star is no expanded correctly during
group by over named subquery
Victoria Markman created DRILL-2202:
---------------------------------------
Summary: 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: Jinfeng Ni
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)