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)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]