asterixdb-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael J. Carey (Jira)" <j...@apache.org>
Subject [jira] [Created] (ASTERIXDB-2740) GROUP BY error message still way too obscure
Date Wed, 03 Jun 2020 05:57:00 GMT
Michael J. Carey created ASTERIXDB-2740:
-------------------------------------------

             Summary: GROUP BY error message still way too obscure
                 Key: ASTERIXDB-2740
                 URL: https://issues.apache.org/jira/browse/ASTERIXDB-2740
             Project: Apache AsterixDB
          Issue Type: Bug
          Components: *DB - AsterixDB, SQL - Translator SQL++
    Affects Versions: 0.9.4.1
            Reporter: Michael J. Carey
            Assignee: Dmitry Lychagin
             Fix For: 0.9.4.2


This kind of query:
SELECT mds.DataverseName, COUNT(*) AS cnt, mds.DatasetName
FROM Metadata.`Dataset` mds
GROUP BY mds.DataverseName;

Returns this error:
ASX1073: Cannot resolve alias reference for undefined identifier mds (in line 1, at column
44) [CompilationException]

This is a big "HUH???" for users (despite being technically accurate).  This has been the
most popular error so far.

MySQL, not known for good error messages, would have said:
Error Code: 1055. Expression #2 of SELECT list is not in GROUP BY clause and contains nonaggregated
column 'mds.DatasetName' which is not functionally dependent on columns in GROUP BY clause;
this is incompatible with sql_mode=only_full_group_by	0.00031 sec

Can we do something similar that better guides the user to the crux of the problem?



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Mime
View raw message