davidm-db commented on code in PR #47462:
URL: https://github.com/apache/spark/pull/47462#discussion_r1706738546
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/parser/AstBuilder.scala:
##########
@@ -195,12 +196,33 @@ class AstBuilder extends DataTypeAstBuilder
case _ =>
}
- val labelText = beginLabelCtx.
+ beginLabelCtx.
map(_.multipartIdentifier().getText).getOrElse(java.util.UUID.randomUUID.toString).
toLowerCase(Locale.ROOT)
+ }
+
+
+
+ override def visitBeginEndCompoundBlock(ctx: BeginEndCompoundBlockContext):
CompoundBody = {
+ val labelText = generateLabelText(Option(ctx.beginLabel()),
Option(ctx.endLabel()))
+
visitCompoundBodyImpl(ctx.compoundBody(), Some(labelText), allowVarDeclare
= true)
}
+ override def visitWhileStatement(ctx: WhileStatementContext): WhileStatement
= {
Review Comment:
nit: let's keep the same order of statements as in `SqlBaseParser.g4`, i.e.
move while statement after if else
--
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]