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:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to