File tree Expand file tree Collapse file tree
docs/source/user-guide/latest/compatibility/expressions Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -25,3 +25,19 @@ under the License.
2525- ** TruncTimestamp (date_trunc)** : Produces incorrect results when used with non-UTC timezones. Compatible when
2626 timezone is UTC.
2727 [ #2649 ] ( https://github.com/apache/datafusion-comet/issues/2649 )
28+
29+ ## Date and Time Functions
30+
31+ Comet's native implementation of date and time functions may produce different results than Spark for dates
32+ far in the future (approximately beyond year 2100). This is because Comet uses the chrono-tz library for
33+ timezone calculations, which has limited support for Daylight Saving Time (DST) rules beyond the IANA
34+ time zone database's explicit transitions.
35+
36+ For dates within a reasonable range (approximately 1970-2100), Comet's date and time functions are compatible
37+ with Spark. For dates beyond this range, functions that involve timezone-aware calculations (such as
38+ ` date_trunc ` with timezone-aware timestamps) may produce results with incorrect DST offsets.
39+
40+ If you need to process dates far in the future with accurate timezone handling, consider:
41+
42+ - Using timezone-naive types (` timestamp_ntz ` ) when timezone conversion is not required
43+ - Falling back to Spark for these specific operations
You can’t perform that action at this time.
0 commit comments