cloud-fan commented on a change in pull request #31150:
URL: https://github.com/apache/spark/pull/31150#discussion_r555728031
##########
File path:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/misc.scala
##########
@@ -66,11 +66,12 @@ case class PrintToStderr(child: Expression) extends
UnaryExpression {
""",
since = "3.1.0",
group = "misc_funcs")
-case class RaiseError(child: Expression) extends UnaryExpression with
ImplicitCastInputTypes {
+case class RaiseError private[spark] (child: Expression, returnType: DataType)
+ extends UnaryExpression with ImplicitCastInputTypes {
override def foldable: Boolean = false
override def nullable: Boolean = true
- override def dataType: DataType = NullType
+ override def dataType: DataType = returnType
Review comment:
nit: the constructor parameter can be `dataType` directly, then we don't
need this override.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]