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: [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