cloud-fan commented on a change in pull request #26763: [SPARK-30125][SQL] Remove PostgreSQL dialect URL: https://github.com/apache/spark/pull/26763#discussion_r354298981
########## File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/TypeCoercion.scala ########## @@ -860,14 +853,12 @@ object TypeCoercion { case Add(l @ DateType(), r @ IntegerType()) => DateAdd(l, r) case Add(l @ IntegerType(), r @ DateType()) => DateAdd(r, l) case Subtract(l @ DateType(), r @ IntegerType()) => DateSub(l, r) - case Subtract(l @ DateType(), r @ DateType()) => - if (SQLConf.get.usePostgreSQLDialect) DateDiff(l, r) else SubtractDates(l, r) - case Subtract(l @ TimestampType(), r @ TimestampType()) => - SubtractTimestamps(l, r) + case Subtract(l @ DateType(), r @ DateType()) => DateDiff(l, r) Review comment: This is not a simple revert. We want to create `SubtractDates` by default, and we need to create a legacy config since the pgsql dialect is gone. ---------------------------------------------------------------- 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 With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org