You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2021/08/09 16:33:22 UTC
[GitHub] [spark] AngersZhuuuu commented on a change in pull request #33661: [SPARK-36431][SQL] Support TypeCoercion of ANSI intervals with different fields
AngersZhuuuu commented on a change in pull request #33661:
URL: https://github.com/apache/spark/pull/33661#discussion_r685347771
##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/AnsiTypeCoercion.scala
##########
@@ -120,6 +121,15 @@ object AnsiTypeCoercion extends TypeCoercionBase {
case (_: TimestampType, _: DateType) | (_: DateType, _: TimestampType) =>
Some(TimestampType)
+ case (t1: DayTimeIntervalType, t2: DayTimeIntervalType) =>
+ Some(DayTimeIntervalType(
+ IntervalUtils.minAnsiIntervalField(t1.startField, t2.startField),
Review comment:
> just `t1.startField.min(t2.startField)`?
There is such a convenient API。。。Updated
--
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.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org