maropu commented on a change in pull request #29790:
URL: https://github.com/apache/spark/pull/29790#discussion_r490646094
##########
File path:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/mathExpressions.scala
##########
@@ -400,7 +403,10 @@ case class Expm1(child: Expression) extends
UnaryMathExpression(StrictMath.expm1
""",
since = "1.4.0")
case class Floor(child: Expression) extends UnaryMathExpression(math.floor,
"FLOOR") {
- override def dataType: DataType = child.dataType match {
+
+ private lazy val childDataType = child.dataType
Review comment:
This looks a pretty common code pattern, so could we move this into base
classes, e.g., lazy val in `UnaryExpression`?
----------------------------------------------------------------
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]