| Function | Support | Notes |
|---|---|---|
ADD_MONTHS | Supported | |
CURDATE | Supported | |
CURRENT_DATE | Supported | |
CURRENT_TIMESTAMP | Supported | |
CURRENT_TIMEZONE | Supported | |
DATE_ADD | Supported | |
DATE_SUB | Supported | |
DAY | Supported | |
DAYNAME | Supported | |
DAYOFMONTH | Supported | |
DAYOFWEEK | Supported | |
DAYOFYEAR | Supported | |
FROM_UTC_TIMESTAMP | Supported | |
HOUR | Supported | |
LOCALTIMESTAMP | Supported | |
MAKE_DATE | Supported | |
MINUTE | Supported | |
MONTH | Supported | |
MONTHNAME | Supported | |
NOW | Supported | |
QUARTER | Supported | |
SECOND | Supported | |
TIMESTAMP_SECONDS | Supported | |
TO_DATE | Supported | |
TO_TIMESTAMP | Supported | |
TO_UTC_TIMESTAMP | Supported | |
WEEKDAY | Supported | |
WEEKOFYEAR | Supported | |
YEAR | Supported | |
DATE_DIFF | With limitations | String arguments are not supported; pass DATE values. |
DATE_FORMAT | With limitations | The pattern must be a constant. Some pattern fields, such as the time zone names z and VV, are not supported. |
DATE_PART | With limitations | Returns NUMERIC(38, 9), where Spark returns NUMERIC(8, 6). |
DATE_TRUNC | With limitations | A string timestamp raises an error; pass a TIMESTAMP or DATE, as in date_trunc('YEAR', TIMESTAMP'2015-03-05 09:32:05'). |
DATEDIFF | With limitations | Returns BIGINT, where Spark returns INTEGER. |
DATEPART | With limitations | Returns NUMERIC(38, 9), where Spark returns NUMERIC(8, 6). |
EXTRACT | With limitations | Returns NUMERIC(38, 9), where Spark returns NUMERIC(8, 6). |
FROM_UNIXTIME | With limitations | Some argument forms are not supported. |
MAKE_DT_INTERVAL | With limitations | make_dt_interval(1, 12, 30, 01.001001) returns '1 day 12:30:01.001001', where Spark returns '1 12:30:01.001001 DAY TO SECOND'. |
MAKE_INTERVAL | With limitations | The interval renders in Firebolt’s format, such as 1 mon 1 day 00:01:40.000001, not Spark’s. |
MAKE_TIMESTAMP | With limitations | make_timestamp(DATE'2014-12-28') is not supported. |
MAKE_TIMESTAMP_LTZ | With limitations | make_timestamp_ltz(DATE'2014-12-28', TIME'6:30:45.887') is not supported. |
MAKE_TIMESTAMP_NTZ | With limitations | make_timestamp_ntz(DATE'2014-12-28', TIME'6:30:45.887') is not supported. |
MAKE_YM_INTERVAL | With limitations | make_ym_interval(1, 2) returns '1 year 2 mons', where Spark returns '1-2 YEAR TO MONTH'. |
TRUNC | With limitations | A string date raises an error; pass a DATE, as in trunc(DATE'2019-08-04', 'MM'). |
CONVERT_TIMEZONE, CURRENT_TIME, DATE_FROM_UNIX_DATE, DATEADD, LAST_DAY, MAKE_TIME, MONTHS_BETWEEN, NEXT_DAY, SESSION_WINDOW, TIME_DIFF, TIME_TRUNC, TIMESTAMP_MICROS, TIMESTAMP_MILLIS, TO_TIME, TO_TIMESTAMP_LTZ, TO_TIMESTAMP_NTZ, TO_UNIX_TIMESTAMP, TRY_MAKE_INTERVAL, TRY_MAKE_TIMESTAMP, TRY_MAKE_TIMESTAMP_LTZ, TRY_MAKE_TIMESTAMP_NTZ, TRY_TO_DATE, TRY_TO_TIME, TRY_TO_TIMESTAMP, UNIX_DATE, UNIX_MICROS, UNIX_MILLIS, UNIX_SECONDS, UNIX_TIMESTAMP, WINDOW, WINDOW_TIME | Not supported |
Functions
Date and timestamp functions
Spark date and timestamp functions supported in SparkSQL and Databricks compatibility modes.
Preview
Spark date and timestamp functions in SparkSQL and Databricks compatibility modes. Both modes share these functions. Support is one of: Supported, With limitations, or Not supported. Supported means every example in the Spark reference returns what Spark returns; a note under With limitations quotes a call that differs.