Skip to content

Commit aebca12

Browse files
committed
add back doc
1 parent 41691a2 commit aebca12

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

  • docs/source/user-guide/latest/compatibility/expressions

docs/source/user-guide/latest/compatibility/expressions/datetime.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)