You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "anew (via GitHub)" <gi...@apache.org> on 2026/06/26 23:39:14 UTC
[PR] [SPARK-57724][SQL] Add missing error class MISSING_CLAUSES_FOR_OPERATION [spark]
anew opened a new pull request, #56827:
URL: https://github.com/apache/spark/pull/56827
### What changes were proposed in this pull request?
SPARK-54405 (METRIC VIEW) introduced error handling that throws the `MISSING_CLAUSES_FOR_OPERATION` error class from `QueryParsingErrors.missingClausesForOperation`, but never registered it in `error-conditions.json`. Register the error condition so the error class resolves correctly through the error-handling framework.
### Why are the changes needed?
This error class was used but not declared.
### Does this PR introduce _any_ user-facing change?
No
### How was this patch tested?
No tests
Generated-by: Opus 4.8
--
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: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
Re: [PR] [SPARK-57724][SQL] Add missing error class MISSING_CLAUSES_FOR_OPERATION [spark]
Posted by "linhongliu-db (via GitHub)" <gi...@apache.org>.
linhongliu-db commented on code in PR #56827:
URL: https://github.com/apache/spark/pull/56827#discussion_r3484900682
##########
common/utils/src/main/resources/error/error-conditions.json:
##########
@@ -5542,6 +5542,12 @@
},
"sqlState" : "0A000"
},
+ "MISSING_CLAUSES_FOR_OPERATION" : {
Review Comment:
can you try sql/core/src/test/scala/org/apache/spark/sql/errors/QueryParsingErrorsSuite.scala and add
```
test("xxx") {
val query =
"""CREATE VIEW mv
|LANGUAGE YAML
|AS
|$$
|version: 0.1
|$$""".stripMargin
checkError(
exception = parseException(query),
condition = "MISSING_CLAUSES_FOR_OPERATION",
sqlState = "42601",
parameters = Map(
"clauses" -> "WITH METRICS",
"operation" -> "METRIC VIEW CREATION"),
context = ExpectedContext(
fragment = query,
start = 0,
stop = query.length - 1))
}
```
--
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: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
Re: [PR] [SPARK-57724][SQL] Add missing error class MISSING_CLAUSES_FOR_OPERATION [spark]
Posted by "anew (via GitHub)" <gi...@apache.org>.
anew commented on code in PR #56827:
URL: https://github.com/apache/spark/pull/56827#discussion_r3484864006
##########
common/utils/src/main/resources/error/error-conditions.json:
##########
@@ -5542,6 +5542,12 @@
},
"sqlState" : "0A000"
},
+ "MISSING_CLAUSES_FOR_OPERATION" : {
Review Comment:
I am not sure how to test this... can you point me to an example of a test for one of the other error classes?
--
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: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
Re: [PR] [SPARK-57724][SQL] Add missing error class MISSING_CLAUSES_FOR_OPERATION [spark]
Posted by "linhongliu-db (via GitHub)" <gi...@apache.org>.
linhongliu-db commented on code in PR #56827:
URL: https://github.com/apache/spark/pull/56827#discussion_r3484690471
##########
common/utils/src/main/resources/error/error-conditions.json:
##########
@@ -5542,6 +5542,12 @@
},
"sqlState" : "0A000"
},
+ "MISSING_CLAUSES_FOR_OPERATION" : {
Review Comment:
thank you for fixing. can you please add a test case for this?
--
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: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
Re: [PR] [SPARK-57724][SQL] Add missing error class MISSING_CLAUSES_FOR_OPERATION [spark]
Posted by "linhongliu-db (via GitHub)" <gi...@apache.org>.
linhongliu-db commented on PR #56827:
URL: https://github.com/apache/spark/pull/56827#issuecomment-4836668346
lgtm, thank you
--
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: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
Re: [PR] [SPARK-57724][SQL] Add missing error class MISSING_CLAUSES_FOR_OPERATION [spark]
Posted by "anew (via GitHub)" <gi...@apache.org>.
anew commented on PR #56827:
URL: https://github.com/apache/spark/pull/56827#issuecomment-4836236682
Thanks for the example! Added it as a test in QueryParsingErrorsSuite, along with a second test for the
missing-LANGUAGE branch so both code paths that throw MISSING_CLAUSES_FOR_OPERATION are covered. Both pass locally.
--
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: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
Re: [PR] [SPARK-57724][SQL] Add missing error class MISSING_CLAUSES_FOR_OPERATION [spark]
Posted by "szehon-ho (via GitHub)" <gi...@apache.org>.
szehon-ho commented on PR #56827:
URL: https://github.com/apache/spark/pull/56827#issuecomment-4814266291
@linhongliu-db
--
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: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org