panbingkun commented on code in PR #47672:
URL: https://github.com/apache/spark/pull/47672#discussion_r1716779170
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/parser/SqlScriptingLogicalOperators.scala:
##########
@@ -89,3 +89,18 @@ case class WhileStatement(
condition: SingleStatement,
body: CompoundBody,
label: Option[String]) extends CompoundPlanStatement
+
+/**
+ * Logical operator for CASE statement.
+ * @param conditions Collection of conditions which correspond to WHEN clauses.
+ * @param conditionalBodies Collection of bodies that have a corresponding
condition,
+ * in WHEN branches.
+ * @param elseBody Body that is executed if none of the conditions are met,
+ * i.e. ELSE branch.
+ */
+case class SearchedCaseStatement(
+ conditions: Seq[SingleStatement],
+ conditionalBodies: Seq[CompoundBody],
+ elseBody: Option[CompoundBody]) extends CompoundPlanStatement {
+ assert(conditions.length == conditionalBodies.length)
+}
Review Comment:
Maybe our file should end with a blank line.
--
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]