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/04/23 09:18:46 UTC

[GitHub] [spark] HyukjinKwon commented on a change in pull request #32295: [WIP][SPARK-35189][SQL] Disallow implicit casting inputs of `SubtractDates`

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



##########
File path: docs/sql-migration-guide.md
##########
@@ -83,6 +83,8 @@ license: |
 
   - In Spark 3.2, the unit-to-unit interval literals like `INTERVAL '1-1' YEAR TO MONTH` are converted to ANSI interval types: `YearMonthIntervalType` or `DayTimeIntervalType`. In Spark 3.1 and earlier, such interval literals are converted to `CalendarIntervalType`. To restore the behavior before Spark 3.2, you can set `spark.sql.legacy.interval.enabled` to `true`.
 
+  - In Spark 3.2, `String_Column - Date_Column` will cause an analysis exception instead of implicitly converting the first column as Date Type. This is to make it consistent with the behavior of `String_Column - Timestamp_Column`. 

Review comment:
       ```suggestion
     - In Spark 3.2, the subtraction of string and date columns is disallowed. In Spark 3.1 and earlier, the first string column was implicitly casted to date type, which is inconsistent with the subtraction of string and timestamp columns.
   ```




-- 
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:
users@infra.apache.org



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