dejankrak-db commented on code in PR #53271:
URL: https://github.com/apache/spark/pull/53271#discussion_r2578064565
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/parser/AstBuilder.scala:
##########
@@ -300,12 +300,15 @@ class AstBuilder extends DataTypeAstBuilder
parsingCtx)
} else {
// If there is no compound body, then there must be a statement or set
statement.
+ val labelText = parsingCtx.labelContext.enterLabeledScope(None, None)
val statement = Option(ctx.statement().asInstanceOf[ParserRuleContext])
.orElse(Option(ctx.setStatementInsideSqlScript().asInstanceOf[ParserRuleContext]))
.map { s =>
SingleStatement(parsedPlan = visit(s).asInstanceOf[LogicalPlan])
}
- CompoundBody(Seq(statement.get), None, isScope = false)
+ val compoundBody = CompoundBody(Seq(statement.get), Some(labelText),
isScope = false)
Review Comment:
Consider adding comment explaining the issue that we are addressing here.
--
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]