dtenedor commented on code in PR #37840:
URL: https://github.com/apache/spark/pull/37840#discussion_r967340825
##########
core/src/main/resources/error/error-classes.json:
##########
@@ -327,6 +327,83 @@
],
"sqlState" : "42000"
},
+ "INVALID_SUBQUERY_EXPRESSION" : {
+ "message" : [
+ "Invalid subquery expression"
+ ],
+ "subClass" : {
+ "ACCESSING_OUTER_QUERY_COLUMN_IS_NOT_ALLOWED" : {
+ "message" : [
+ "Accessing outer query column is not allowed in this location"
+ ]
+ },
+ "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 <predicate>"
+ ]
+ },
+
"CORRELATED_SCALAR_SUBQUERIES_IN_GROUP_BY_MUST_BE_IN_AGGREGATE_EXPRESSIONS" : {
+ "message" : [
+ "Correlated scalar subqueries in the GROUP BY clause must also be in
the aggregate expressions"
+ ]
+ },
+ "CORRELATED_SCALAR_SUBQUERIES_ONLY_IN_FILTER_AGGREGATE_PROJECT" : {
+ "message" : [
+ "Correlated scalar subqueries can only be used in filters,
aggregations, projections, and UPDATE/MERGE/DELETE commands"
+ ]
+ },
+
"EXPRESSIONS_REFERENCING_OUTER_QUERY_COLUMN_ONLY_ALLOWED_IN_WHERE_HAVING" : {
+ "message" : [
+ "Expressions referencing the outer query are not supported outside
of WHERE/HAVING clauses"
+ ]
+ },
+ "IN_EXISTS_SUBQUERIES_ONLY_IN_FILTER_AGGREGATE_PROJECT" : {
+ "message" : [
+ "IN/EXISTS predicate subqueries can only be used in filters, joins,
aggregations, window functions, projections, and UPDATE/MERGE/DELETE commands"
+ ]
+ },
+ "LATERAL_JOIN_CONDITION_NON_DETERMINISTIC" : {
+ "message" : [
+ "Lateral join condition cannot be non-deterministic: <condition>"
+ ]
+ },
+ "MORE_THAN_ONE_OUTPUT_COLUMN" : {
+ "message" : [
+ "Scalar subquery must return only one column, but got <number>"
+ ]
+ },
+ "MUST_AGGREGATE_CORRELATED_SUBQUERY" : {
+ "message" : [
+ "Correlated scalar subqueries must be aggregated"
+ ]
+ },
+ "MUST_AGGREGATE_CORRELATED_SUBQUERY_OUTPUT" : {
Review Comment:
Good idea. Let's think about it. For now I renamed it to
`MUST_AGGREGATE_CORRELATED_SCALAR_SUBQUERY_OUTPUT` to keep consistent with your
other suggestion.
--
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]