davidm-db commented on code in PR #47462:
URL: https://github.com/apache/spark/pull/47462#discussion_r1688150646


##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/parser/SqlScriptingLogicalOperators.scala:
##########
@@ -58,3 +58,28 @@ case class SingleStatement(parsedPlan: LogicalPlan)
 case class CompoundBody(
     collection: Seq[CompoundPlanStatement],
     label: Option[String]) extends CompoundPlanStatement
+
+/**
+ * Logical operator for IF ELSE statement.
+ * @param conditions Collection of conditions. First condition corresponds to 
IF clause,
+ *                   while others (if any) correspond to following ELSE IF 
clauses.
+ * @param bodies Collection of bodies.
+ */
+case class IfElseStatement(
+    conditions: Seq[SingleStatement],
+    bodies: Seq[CompoundBody]) extends CompoundPlanStatement
+
+/**
+ * Logical operator for while statement.
+ * @param condition Any expression evaluating to a Boolean.
+ *                  While the condition is evaluated true compound body is 
executed.
+ * @param body Compound body is a collection of statements that is executed if 
condition is true.
+ * @param label An optional label for the loop which is unique amongst all 
labels for statements
+ *              within which the LOOP statement is contained.
+ *              If an end label is specified it must match the beginning label.
+ *              The label can be used to LEAVE or ITERATE the loop.
+ */
+case class WhileStatement(
+                           condition: SingleStatement,

Review Comment:
   nit: indentation of the parameters.



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