You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@impala.apache.org by "Paul Rogers (JIRA)" <ji...@apache.org> on 2018/11/13 19:56:00 UTC

[jira] [Created] (IMPALA-7847) Standardize expression error message in analyzer to ease testing

Paul Rogers created IMPALA-7847:
-----------------------------------

             Summary: Standardize expression error message in analyzer to ease testing
                 Key: IMPALA-7847
                 URL: https://issues.apache.org/jira/browse/IMPALA-7847
             Project: IMPALA
          Issue Type: Improvement
          Components: Frontend
    Affects Versions: Impala 3.0
            Reporter: Paul Rogers
            Assignee: Paul Rogers


The analyzer checks expressions in all clauses to exclude unsupported features such as subqueries, aggregates or analytic expressions. When found, the [analyzer emits an error message|https://github.com/apache/impala/blob/master/fe/src/main/java/org/apache/impala/analysis/SelectStmt.java]. At present, these message are wonderfully inconsistent, which makes testing tedious:

{quote}
"aggregate function not allowed in WHERE clause"

"WHERE clause must not contain analytic expressions: " + e.toSql()

"HAVING clause must not contain analytic expressions: "
                 + analyticExpr.toSql()

"Subqueries are not supported in the ORDER BY clause."
{quote}

The proposal is to standardize the messages as follows:

{quote}
<feature> are not supported in <context>: <expr>
{quote}

Where <feature> is "Subqueries", "Analytic expressions" and "Aggregate functions", <context> is "SELECT list", "WHERE clause", "ORDER BY clause", "HAVING clause" and "GROUP BY clause", and the expression is the before-rewrite version of the expression in question.

The result will be that tests are a bit easier to write since we need not track down the specific odd wording for each error case.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)