miland-db commented on code in PR #47146: URL: https://github.com/apache/spark/pull/47146#discussion_r1672199809
########## sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/parser/SqlScriptingLogicalOperators.scala: ########## @@ -52,4 +52,6 @@ case class SingleStatement(parsedPlan: LogicalPlan) * Logical operator for a compound body. Contains all statements within the compound body. * @param collection Collection of statements within the compound body. */ -case class CompoundBody(collection: Seq[CompoundPlanStatement]) extends CompoundPlanStatement +case class CompoundBody( + collection: Seq[CompoundPlanStatement], + label: Option[String]) extends CompoundPlanStatement Review Comment: In this [comment](https://github.com/apache/spark/pull/47146#discussion_r1670245557) I gave 2 examples when it can be `None`. We can also add UUID there, but I don't think it makes sense to do it because surrounding loop will have label which is logically correct, and if user adds `BEGIN` and `END` block then the label will be appointed to that block automatically because it will pass through `visitBeginEndCompoundBlock(ctx: BeginEndCompoundBlockContext)`. -- 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: reviews-unsubscr...@spark.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org