You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2021/01/12 12:28:22 UTC

[GitHub] [spark] yaooqinn commented on a change in pull request #31150: [SPARK-34086][SQL] RaiseError generates too much code and may fails codegen in length check for char varchar

yaooqinn commented on a change in pull request #31150:
URL: https://github.com/apache/spark/pull/31150#discussion_r555734239



##########
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:
       sgtm, updated




----------------------------------------------------------------
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org