davidm-db commented on code in PR #47648:
URL: https://github.com/apache/spark/pull/47648#discussion_r1709066194
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/errors/QueryExecutionErrors.scala:
##########
@@ -2837,4 +2837,13 @@ private[sql] object QueryExecutionErrors extends
QueryErrorsBase with ExecutionE
"parameter" -> toSQLId("unit"),
"invalidValue" -> s"'$invalidValue'"))
}
+
+ def invalidBooleanStatementError(stmt: String): Throwable = {
Review Comment:
let's use `SqlScriptingErrors` class for this exception.
you can check this PR: https://github.com/apache/spark/pull/47553, where we
introduced `SqlScriptingErrors` and `SqlScriptingException` classes for more
cleaner messages (including the line info at the beginning etc).
these classes require `Origin` to be provided, but in this case `Origin`
already exists within `SingleStatementExec` so it should be quite simple.
--
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]