cloud-fan commented on code in PR #49427:
URL: https://github.com/apache/spark/pull/49427#discussion_r1919606680


##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/plans/logical/SqlScriptingLogicalPlans.scala:
##########
@@ -298,3 +305,45 @@ case class ForStatement(
       ForStatement(query, variableName, body, label)
   }
 }
+
+/**
+ * Logical operator for an error condition.
+ * @param conditionName Name of the error condition.
+ * @param sqlState SQLSTATE or Error Code.
+ */
+case class ErrorCondition(
+    conditionName: String,
+    sqlState: String) extends CompoundPlanStatement {
+  override def output: Seq[Attribute] = Seq.empty
+
+  override def children: Seq[LogicalPlan] = Seq.empty
+
+  override protected def withNewChildrenInternal(
+      newChildren: IndexedSeq[LogicalPlan]): LogicalPlan = this.copy()
+}
+
+object HandlerType extends Enumeration {
+  type HandlerType = Value
+  val EXIT, CONTINUE = Value
+}
+
+/**
+ * Logical operator for an error condition.
+ * @param conditions Name of the error condition variable for which the 
handler is built.

Review Comment:
   looking at the parser rule, it seems not always the condition name, but can 
be SQLSTATE directly, or `SQLEXCEPTION`, or `NOT FOUND`, right?



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