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


##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/plans/logical/SqlScriptingLogicalPlans.scala:
##########
@@ -405,3 +406,25 @@ case class ExceptionHandler(
       handlerType)
   }
 }
+
+/**
+ * Logical operator for Signal Statement.
+ * @param isBuiltinError Flag indicating if the error is a builtin error.
+ * @param errorCondition Name of the error condition/SQL State for error that 
will be thrown.
+ * @param sqlState SQL State for error that will be thrown.
+ * @param message Error message (either string or variable name).
+ * @param messageArguments Arguments to fill builtin error message 
placeholders.
+ */
+case class SignalStatement(
+    var isBuiltinError: Boolean = false,
+    errorCondition: Option[String] = None,
+    var sqlState: Option[String] = None,

Review Comment:
   it's fine to keep both `errorCondition` and `sqlState` as `Options` in the 
logical plan (due to the resolution in the visitors), but since we need to have 
both filled in, I would remove the `Options` from the exec node and add 
`assert` in the interpreter's `bulidExecutionPlan`



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