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 2019/02/23 22:12:00 UTC

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

     [ https://issues.apache.org/jira/browse/IMPALA-7847?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Paul Rogers resolved IMPALA-7847.
---------------------------------
    Resolution: Won't Fix

Upon reflection, while this seems like a good idea, the cost of making the change is not worth the benefit. Copy & paste of error messages appears to work well enough.

> 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
>            Priority: Trivial
>
> 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)