gengliangwang commented on a change in pull request #32295:
URL: https://github.com/apache/spark/pull/32295#discussion_r618382235



##########
File path: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/datetimeExpressions.scala
##########
@@ -2060,7 +2060,7 @@ case class TruncTimestamp(
   group = "datetime_funcs",
   since = "1.5.0")
 case class DateDiff(endDate: Expression, startDate: Expression)
-  extends BinaryExpression with ImplicitCastInputTypes with NullIntolerant {
+  extends BinaryExpression with ExpectsInputTypes with NullIntolerant {

Review comment:
       As this breaks Hive compatibility, I am limiting the scope of this PR to 
SubtractDates
   
   ```
   org.apache.spark.sql.hive.execution.HiveCompatibilitySuite.udf9 | 0.5 sec | 1
   org.apache.spark.sql.hive.execution.HiveQuerySuite.Cast Timestamp to 
Timestamp in UDF
   ```
   




-- 
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]

Reply via email to