kiszk commented on a change in pull request #27627: [WIP][SPARK-28067][SQL] Fix 
incorrect results for decimal aggregate sum by returning null on decimal 
overflow
URL: https://github.com/apache/spark/pull/27627#discussion_r383013891
 
 

 ##########
 File path: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/decimalExpressions.scala
 ##########
 @@ -132,3 +132,32 @@ case class CheckOverflow(
 
   override def sql: String = child.sql
 }
+
+case class HasOverflow(
+    child: Expression,
+    inputType: DecimalType) extends UnaryExpression {
+
+  override def dataType: DataType = BooleanType
+
+  override def nullable: Boolean = true
 
 Review comment:
   Can we override `nullable` with `false` as `doGenCode()` does?

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


With regards,
Apache Git Services

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

Reply via email to