cloud-fan commented on a change in pull request #32714:
URL: https://github.com/apache/spark/pull/32714#discussion_r643038224
##########
File path: docs/sql-migration-guide.md
##########
@@ -91,6 +91,8 @@ license: |
- In Spark 3.2, `CREATE TABLE AS SELECT` with non-empty `LOCATION` will
throw `AnalysisException`. To restore the behavior before Spark 3.2, you can
set `spark.sql.legacy.allowNonEmptyLocationInCTAS` to `true`.
+ - In Spark 3.2, special datetime values such as `epoch`, `today`,
`yesterday`, `tomorrow`, and `now` are supported in typed literals only, for
instance, `select timestamp'now'`. In Spark 3.1 and 3.0, such special values
are supported in any casts of strings to dates/timestamps. To keep these
special values as dates/timestamps in Spark 3.1 and 3.0, you should replace
them manually, e.g. `if (c in ('now', 'today'), current_date(), cast(c as
date))`.
Review comment:
> if (c in ('now', 'today'), current_date(), cast(c as date))
What does it mean?
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]