Daniel Barclay (Drill) created DRILL-3859:
---------------------------------------------
Summary: Delimited identifier `*` breaks in aliases list--causes
AssertionError saying "INTEGER"
Key: DRILL-3859
URL: https://issues.apache.org/jira/browse/DRILL-3859
Project: Apache Drill
Issue Type: Bug
Reporter: Daniel Barclay (Drill)
When a delimited identifier whose body consists of a single asterisk
("{{`*`}}") is used in a subquery aliases list and the containing query's
select list refers to a non-existent column, Drill throws an assertion error
(and its message says only "INTEGER").
For example, see the third query and its error message in the following:
{noformat}
0: jdbc:drill:zk=local> SELECT * FROM (VALUES (0, 0)) AS T(A, `*`);
+----+----+
| A | * |
+----+----+
| 0 | 0 |
+----+----+
1 row selected (0.143 seconds)
0: jdbc:drill:zk=local> SELECT a FROM (VALUES (0, 0)) AS T(A, `*`);
+----+
| a |
+----+
| 0 |
+----+
1 row selected (0.127 seconds)
0: jdbc:drill:zk=local> SELECT b FROM (VALUES (0, 0)) AS T(A, `*`);
Error: SYSTEM ERROR: AssertionError: INTEGER
[Error Id: 859d3ef9-b1e7-497b-b366-b64b2b592b69 on dev-linux2:31010]
(state=,code=0)
0: jdbc:drill:zk=local>
{noformat}
It's not clear that the problem is in the SQL parser area (because another bug
with {{`*`}} that _acts_ the same as a hypothetical parser problem strongly
seems to be downstream of the parser).
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)