mihailoale-db commented on code in PR #57081:
URL: https://github.com/apache/spark/pull/57081#discussion_r3545334954


##########
common/utils/src/main/resources/error/error-conditions.json:
##########
@@ -8142,8 +8142,8 @@
   },
   "UNSUPPORTED_EXPR_FOR_OPERATOR" : {
     "message" : [
-      "A query operator contains one or more unsupported expressions.",
-      "Consider to rewrite it to avoid window functions, aggregate functions, 
and generator functions in the WHERE clause.",
+      "The query operator <operator> contains one or more unsupported 
expressions.",

Review Comment:
   I partially agree. Although it would be better to have operations instead of 
operators but it's already like that all over the place in Spark:
   - `SELECT * FROM VALUES (1, 10, 20) AS t(id, a, b) UNPIVOT (val FOR name IN 
(a, b)) ORDER BY t.a` throw 
`[MISSING_ATTRIBUTES.RESOLVED_ATTRIBUTE_MISSING_FROM_INPUT] Resolved 
attribute(s) "a" missing from "id", "name", "val" in operator Sort`
   - `SELECT * FROM VALUES(1) GROUP BY *` throw 
`[INVALID_USAGE_OF_STAR_OR_REGEX] Invalid usage of '*' in Aggregate`
   - etc
   Also it would require more work since we would have to map operators to 
operations which seem like a unnecessary overhead since we already have same 
stuff in other exceptions. I would leave it as it is for now if you agree.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to