sgrebnov opened a new pull request, #21295: URL: https://github.com/apache/datafusion/pull/21295
## Which issue does this PR close? ⚠️ Draft while manually verifying updated format against PG, MySQL, DuckDB, BigQuery - Closes #21294. ## Rationale for this change The default `timestamp_with_tz_to_string` uses `DateTime<Tz>.to_string()`, which produces literals like `2025-09-15 11:00:00 +00:00` that are not supported by multiple dialects (e.g. DuckDB, BigQuery). Switching to `to_rfc3339()` produces valid ISO 8601 / RFC 3339 strings (e.g. `2025-09-15T11:00:00+00:00`) that are broadly compatible. ## What changes are included in this PR? - Changed the default `Dialect::timestamp_with_tz_to_string` implementation from `dt.to_string()` to `dt.to_rfc3339()` - Removed now-redundant `timestamp_with_tz_to_string` overrides from `DuckDBDialect` and `BigQueryDialect` (they produced equivalent RFC 3339-compatible output via custom format strings) - Updated test expectations to match the new default format ## Are these changes tested? Yes, existing tests in `unparser::expr::tests` have been updated to reflect the new format. ## Are there any user-facing changes? Yes — timestamp-with-timezone literals are now formatted as RFC 3339 (`2025-09-15T11:00:00+00:00`) instead of the previous `Display` format (`2025-09-15 11:00:00 +00:00`). Dialects that need a different format can still override `timestamp_with_tz_to_string`. -- 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. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
