cloud-fan commented on code in PR #53390:
URL: https://github.com/apache/spark/pull/53390#discussion_r2666982146
##########
sql/api/src/main/scala/org/apache/spark/sql/errors/QueryParsingErrors.scala:
##########
@@ -821,6 +821,15 @@ private[sql] object QueryParsingErrors extends
DataTypeErrorsBase {
ctx)
}
+ def emptyInPredicateError(ctx: ParserRuleContext): Throwable = {
+ new ParseException(
+ errorClass = "INVALID_SQL_SYNTAX.EMPTY_IN_PREDICATE",
+ messageParameters = Map(
+ "alternative" -> ("Consider using 'WHERE FALSE' if you need an
always-false condition, " +
+ "or provide at least one value in the IN list.")),
Review Comment:
why pass the alternative as an error parameter, instead of just put it in
the error message template?
--
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]