Skip to content

fix(sql): preserve timezone-cast semantics for extraction ops#11984

Open
RedZapdos123 wants to merge 1 commit intoibis-project:mainfrom
RedZapdos123:fix-timezone-cast-regressions-11965
Open

fix(sql): preserve timezone-cast semantics for extraction ops#11984
RedZapdos123 wants to merge 1 commit intoibis-project:mainfrom
RedZapdos123:fix-timezone-cast-regressions-11965

Conversation

@RedZapdos123
Copy link
Copy Markdown

@RedZapdos123 RedZapdos123 commented Mar 31, 2026

This PR fixes the inconsistent timezone cast behavior across Trino and DuckDB for the issue patterns reported in the linked tickets. It updates Trino cast translation to use timezone functions for timezone aware extraction paths, and updates DuckDB timezone aware casts from string/date inputs so that epoch, and extraction operations use the correct instant semantics. It also adds targeted regression tests for timezone cast hour/time extraction, timezone aware epoch_seconds behavior, and Trino SQL timezone function generation.

Fixes #11965
Fixes #11527
Fixes #11211
Refs #11879

Screenshot 2026-04-01 031149

@github-actions github-actions bot added tests Issues or PRs related to tests duckdb The DuckDB backend sql Backends that generate SQL labels Mar 31, 2026
Preserve timezone-aware timestamp cast behavior for extraction operations in Trino and DuckDB, including string/date casts to timezone-aware timestamps in DuckDB.

Add targeted DuckDB regression coverage for timezone-cast hour/time extraction, timezone-aware epoch_seconds behavior, and Trino SQL generation using timezone functions.

Fixes ibis-project#11965

Fixes ibis-project#11527

Fixes ibis-project#11211

Refs ibis-project#11879

Signed-off-by: Mridankan Mandal <iib2024017@iiita.ac.in>
@RedZapdos123 RedZapdos123 force-pushed the fix-timezone-cast-regressions-11965 branch from 79634d8 to 5f54bcb Compare March 31, 2026 21:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

duckdb The DuckDB backend sql Backends that generate SQL tests Issues or PRs related to tests

Projects

None yet

1 participant