srielau commented on code in PR #37840:
URL: https://github.com/apache/spark/pull/37840#discussion_r968609421
##########
core/src/main/resources/error/error-classes.json:
##########
@@ -327,6 +327,78 @@
],
"sqlState" : "42000"
},
+ "INVALID_SUBQUERY_EXPRESSION" : {
+ "message" : [
+ "Invalid subquery:"
+ ],
+ "subClass" : {
+ "ACCESSING_OUTER_QUERY_COLUMN_IS_NOT_ALLOWED" : {
+ "message" : [
+ "Accessing outer query column is not allowed in this location<plan>"
+ ]
+ },
+ "AGGREGATE_FUNCTION_MIXED_OUTER_LOCAL_REFERENCES" : {
+ "message" : [
+ "Found an aggregate function in a correlated predicate that has both
outer and local references, which is not supported: <function>"
+ ]
+ },
+ "CORRELATED_COLUMN_IS_NOT_ALLOWED_IN_PREDICATE" : {
+ "message" : [
+ "Correlated column is not allowed in predicate<plan>"
+ ]
+ },
+ "CORRELATED_SCALAR_SUBQUERIES_ONLY_IN_CERTAIN_PLACES" : {
+ "message" : [
+ "Correlated scalar subqueries can only be used in filters,
aggregations, projections, and UPDATE/MERGE/DELETE commands<plan>"
+ ]
+ },
+ "IN_EXISTS_SUBQUERIES_ONLY_CERTAIN_PLACES" : {
+ "message" : [
+ "IN/EXISTS predicate subqueries can only be used in filters, joins,
aggregations, window functions, projections, and UPDATE/MERGE/DELETE
commands<plan>"
+ ]
+ },
+ "LATERAL_JOIN_CONDITION_NON_DETERMINISTIC" : {
+ "message" : [
+ "Lateral join condition cannot be non-deterministic: <condition>"
+ ]
+ },
+ "MUST_AGGREGATE_CORRELATED_SCALAR_SUBQUERY" : {
+ "message" : [
+ "Correlated scalar subqueries in the GROUP BY clause must also be in
the aggregate expressions<plan>"
+ ]
+ },
+ "MUST_AGGREGATE_CORRELATED_SCALAR_SUBQUERY_OUTPUT" : {
+ "message" : [
+ "The output of a correlated scalar subquery must be aggregated"
+ ]
+ },
+ "NON_CORRELATED_COLUMNS_IN_GROUP_BY" : {
+ "message" : [
+ "A GROUP BY clause in a scalar correlated subquery cannot contain
non-correlated columns: <value>"
+ ]
+ },
+ "NON_DETERMINISTIC_LATERAL_SUBQUERIES" : {
+ "message" : [
+ "Non-deterministic lateral subqueries are not supported when joining
with outer relations that produce more than one row<plan>"
+ ]
+ },
+ "OUTER_ATTRIBUTE_NOT_FOUND" : {
+ "message" : [
+ "Outer attribute not found: <value>"
+ ]
+ },
+ "OUTER_REFERENCES_ONLY_ALLOWED_IN_WHERE_HAVING" : {
+ "message" : [
+ "Expressions referencing the outer query are not supported outside
of WHERE/HAVING clauses<plan>"
+ ]
+ },
+ "SCALAR_SUBQUERY_RETURN_MORE_THAN_ONE_OUTPUT_COLUMN" : {
Review Comment:
Hmm, this one is different. It's a proper semantic error and should have it'
own error class IMHO.
Most/all of the others are product limitations.
--
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]