Michael J. Carey created ASTERIXDB-3023: -------------------------------------------
Summary: Confusing error message for post-GROUP BY field use mistakes Key: ASTERIXDB-3023 URL: https://issues.apache.org/jira/browse/ASTERIXDB-3023 Project: Apache AsterixDB Issue Type: Bug Components: COMP - Compiler, SQL - Translator SQL++ Affects Versions: 0.9.7 Reporter: Michael J. Carey Assignee: Dmitry Lychagin Fix For: 0.9.7 The following query is illegal because of a non-GROUP BY field reference - but the error message is very confusing to a SQL user (hopefully the reason why is self-explanatory, since two other non-flagged uses of "c" are accepted prior to column 46): USE DonCData; SELECT c.custid, c.name, COUNT(*) AS ordcnt, c.oops FROM customers c JOIN orders o ON c.custid = o.custid GROUP BY c.custid, c.name; ERROR: Code: 1 "ASX1073: Cannot resolve alias reference for undefined identifier c (in line 2, at column 46)" -- This message was sent by Atlassian Jira (v8.20.1#820001)