cloud-fan commented on code in PR #53530:
URL: https://github.com/apache/spark/pull/53530#discussion_r2691224558


##########
sql/api/src/main/scala/org/apache/spark/sql/errors/QueryParsingErrors.scala:
##########
@@ -852,4 +852,21 @@ private[sql] object QueryParsingErrors extends 
DataTypeErrorsBase {
       messageParameters = Map("parameterMarker" -> ctx.getText),
       ctx = ctx)
   }
+
+  /**
+   * Throws an exception when a cursor reference has more than one qualifier.
+   * Valid: cursor or label.cursor
+   * Invalid: a.b.cursor
+   *
+   * @param cursorName
+   *   The fully qualified cursor name with multiple qualifiers
+   * @throws ParseException
+   *   Always throws this exception
+   */
+  def cursorInvalidQualifierError(cursorName: String): Nothing = {
+    throw new ParseException(

Review Comment:
   nit: this is anti-pattern. Looking at most methods in this file, the method 
should return `Throwable` and the caller side should do `throw 
cursorInvalidQualifierError(...)`



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