Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions docs/sql-migration-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,20 @@ license: |
</tr>
</table>

- Since Spark 3.0, special values are supported in conversion from strings to dates and timestamps. Those values are simply notational shorthands that will be converted to ordinary date or timestamp values when read. The following string values are supported for dates:
- `epoch [zoneId]` - 1970-01-01
- `today [zoneId]` - the current date in the time zone specified by `spark.sql.session.timeZone`.
- `yesterday [zoneId]` - the current date - 1
- `tomorrow [zoneId]` - the current date + 1
- `now` - the date of running the current query. It has the same notion as today.
For example `SELECT date 'tomorrow' - date 'yesterday';` should output `2`. Here are special timestamp values:
- `epoch [zoneId]` - 1970-01-01 00:00:00+00 (Unix system time zero)
- `today [zoneId]` - midnight today.
Copy link
Member

@dongjoon-hyun dongjoon-hyun Sep 27, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shall we remove the . at the end? For line 206 and 209, it might be natural. This line might be better be consistent with the following lines (213/214).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I removed all dots because some items don't form complete sentences, and others must not as well for consistency .

- `yesterday [zoneId]` - midnight yesterday
- `tomorrow [zoneId]` - midnight tomorrow
- `now` - current query start time.
For example `SELECT timestamp 'tomorrow';`.

## Upgrading from Spark SQL 2.4 to 2.4.1

- The value of `spark.executor.heartbeatInterval`, when specified without units like "30" rather than "30s", was
Expand Down