MaxGekk commented on a change in pull request #27435:
[SPARK-26618][SQL][FOLLOWUP] Describe the behavior change of typed
`TIMESTAMP`/`DATE` literals
URL: https://github.com/apache/spark/pull/27435#discussion_r374320995
##########
File path: docs/sql-migration-guide.md
##########
@@ -77,7 +77,7 @@ license: |
- Formatting of `TIMESTAMP` and `DATE` literals.
- - Creating of typed `TIMESTAMP` and `DATE` literals from strings. Since
Spark 3.0, string conversion to typed `TIMESTAMP`/`DATE` literals is performed
via casting to `TIMESTAMP`/`DATE` values. For example, `TIMESTAMP '2019-12-23
12:59:30'` is semantically equal to `CAST('2019-12-23 12:59:30' AS TIMESTAMP)`.
In Spark version 2.4 and earlier, the `java.sql.Timestamp.valueOf()` and
`java.sql.Date.valueOf()` functions are used for the same purpose.
+ - Creating of typed `TIMESTAMP` and `DATE` literals from strings. Since
Spark 3.0, string conversion to typed `TIMESTAMP`/`DATE` literals is performed
via casting to `TIMESTAMP`/`DATE` values. For example, `TIMESTAMP '2019-12-23
12:59:30'` is semantically equal to `CAST('2019-12-23 12:59:30' AS TIMESTAMP)`.
When the input string does not contain information about time zone, the time
zone from the SQL config `spark.sql.session.timeZone` is used in that case. In
Spark version 2.4 and earlier, the `java.sql.Timestamp.valueOf()` and
`java.sql.Date.valueOf()` functions are used for the same purpose, and the
conversion is based on JVM system time zone. The different sources of the
default time zone may change the behavior of typed `TIMESTAMP` and `DATE`
literals.
Review comment:
I removed the part.
----------------------------------------------------------------
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]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]