cloud-fan commented on a change in pull request #28626:
URL: https://github.com/apache/spark/pull/28626#discussion_r431696816
##########
File path:
sql/core/src/test/scala/org/apache/spark/sql/expressions/ExpressionInfoSuite.scala
##########
@@ -156,4 +157,38 @@ class ExpressionInfoSuite extends SparkFunSuite with
SharedSparkSession {
}
}
}
+
+ test("Check whether SQL expressions should extend NullIntolerant") {
+ // Only check expressions extended from these expressions because these
expressions are
+ // NullIntolerant by default.
+ val exprTypesToCheck = Seq(classOf[UnaryExpression],
classOf[BinaryExpression],
+ classOf[TernaryExpression], classOf[QuaternaryExpression],
classOf[SeptenaryExpression])
+
+ // Do not check these expressions, because these expressions extend
NullIntolerant
+ // and override the eval function.
+ val ignoreSet = Set(classOf[IntegralDivide], classOf[Divide],
classOf[Remainder], classOf[Pmod])
Review comment:
can we let `DivModLike` implement `nullSafeEval` instead?
----------------------------------------------------------------
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]