cloud-fan commented on a change in pull request #32849:
URL: https://github.com/apache/spark/pull/32849#discussion_r649837322



##########
File path: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/datetimeExpressions.scala
##########
@@ -2550,7 +2550,7 @@ case class SubtractTimestamps(
 
   override def inputTypes: Seq[AbstractDataType] = Seq(TimestampType, 
TimestampType)
   override def dataType: DataType =
-    if (legacyInterval) CalendarIntervalType else DayTimeIntervalType
+    if (legacyInterval) CalendarIntervalType else DayTimeIntervalType()

Review comment:
       TODO: return interval second?

##########
File path: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/datetimeExpressions.scala
##########
@@ -2550,7 +2550,7 @@ case class SubtractTimestamps(
 
   override def inputTypes: Seq[AbstractDataType] = Seq(TimestampType, 
TimestampType)
   override def dataType: DataType =
-    if (legacyInterval) CalendarIntervalType else DayTimeIntervalType
+    if (legacyInterval) CalendarIntervalType else DayTimeIntervalType()

Review comment:
       because interval second is the most precise one here. 




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



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

Reply via email to