tangrizzly commented on code in PR #53941:
URL: https://github.com/apache/spark/pull/53941#discussion_r2729852517
##########
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/parser/ErrorParserSuite.scala:
##########
@@ -61,10 +61,12 @@ class ErrorParserSuite extends AnalysisTest {
exception = parseException("USE test-test"),
condition = "INVALID_IDENTIFIER",
parameters = Map("ident" -> "test-test"))
+ // SPARK-55155: SET CATALOG now supports expressions and the Parser will
not
+ // treat test-test as error identifier.
checkError(
exception = parseException("SET CATALOG test-test"),
- condition = "INVALID_IDENTIFIER",
- parameters = Map("ident" -> "test-test"))
+ condition = "INVALID_SQL_SYNTAX.UNSUPPORTED_SQL_STATEMENT",
+ parameters = Map("sqlText" -> "SET CATALOG test-test"))
Review Comment:
`test-test` in `SET CATALOG test-test` now is treated as a subtract
expression, instead of an invalid identifier
##########
sql/api/src/main/scala/org/apache/spark/sql/errors/QueryParsingErrors.scala:
##########
@@ -723,13 +723,6 @@ private[sql] object QueryParsingErrors extends
DataTypeErrorsBase {
ctx)
}
- def invalidNameForSetCatalog(name: Seq[String], ctx: ParserRuleContext):
Throwable = {
Review Comment:
Moved to QueryCompilationErrors as we throw the exception in runtime now.
The error class remains unchanged.
--
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]