forked from datafold/data-diff
-
Notifications
You must be signed in to change notification settings - Fork 1
Closed
Labels
P0-criticalShip-blocking, fix immediatelyShip-blocking, fix immediatelybugSomething isn't workingSomething isn't workingtriage
Description
Problem
MsSQL cannot set a session timezone (mssql.py:85 raises NotImplementedError). When comparing MsSQL timestamps against a UTC-normalized database (e.g., PostgreSQL), phantom diffs appear for any timestamps where the MsSQL server timezone differs from UTC.
Solution
MsSQL supports AT TIME ZONE 'UTC' syntax. Wrap timestamp normalization in normalize_timestamp() to explicitly convert to UTC, bypassing the need for a session-level setting.
Key Files
data_diff/databases/mssql.py:85(set_timezone_to_utc)data_diff/databases/mssql.py(normalize_timestamp)
Acceptance Criteria
-
normalize_timestamp()wraps values withAT TIME ZONE 'UTC'conversion - Cross-database diff between MsSQL and PostgreSQL produces correct results regardless of MsSQL server timezone
- Unit test covers the SQL generation
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
P0-criticalShip-blocking, fix immediatelyShip-blocking, fix immediatelybugSomething isn't workingSomething isn't workingtriage