cloud-fan commented on code in PR #46665:
URL: https://github.com/apache/spark/pull/46665#discussion_r1631774980
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/parser/AbstractSqlParser.scala:
##########
@@ -91,6 +91,19 @@ abstract class AbstractSqlParser extends AbstractParser with
ParserInterface {
}
}
+ /** Creates [[CompoundBody]] for a given SQL script string. */
+ override def parseScript(sqlScriptText: String): CompoundBody =
parse(sqlScriptText) { parser =>
+ val ctx = parser.compoundOrSingleStatement()
+ withErrorHandling(ctx, Some(sqlScriptText)) {
+ astBuilder.visitCompoundOrSingleStatement(ctx) match {
+ case body: CompoundBody => body
+ case _ =>
Review Comment:
Will "single statement" hit this branch and fail?
--
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]