MaxGekk commented on code in PR #38447:
URL: https://github.com/apache/spark/pull/38447#discussion_r1013953353
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/errors/QueryParsingErrors.scala:
##########
@@ -608,8 +608,12 @@ private[sql] object QueryParsingErrors extends
QueryErrorsBase {
}
def unclosedBracketedCommentError(command: String, position: Origin):
Throwable = {
- new ParseException(Some(command), "Unclosed bracketed comment", position,
position,
- Some("_LEGACY_ERROR_TEMP_0055"))
+ new ParseException(
+ Some(command),
+ "Found an unclosed bracketed comment. Please, append */ at the end of
the comment.",
+ position,
+ position,
+ Some("UNCLOSED_BRACKETED_COMMENT"))
Review Comment:
Could you replace this by:
```suggestion
new ParseException(
command = Some(command),
start = start,
stop = stop,
errorClass = "UNCLOSED_BRACKETED_COMMENT",
messageParameters = Map.empty)
```
and invoke via:
```scala
throw QueryParsingErrors.unclosedBracketedCommentError(
command = command,
start = Origin(Option(failedToken.getStartIndex)),
stop = Origin(Option(failedToken.getStopIndex)))
```
--
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]