abir123rajbongshi-debug commented on PR #60609: URL: https://github.com/apache/spark/pull/60609#issuecomment-6972564186
> > The rest of the changes look good to me. Can you just tell me why this change is necessary over say changing the driver JVM timezone or something akin to that? > > Otherwise LGTM We were seeing data correctness issues in mysql qbc snapshot when jvm timezone did not match the session timezone. There was no reilable way to match this; a numeric offset is wrong for part of the year in daylight-saving zones, named zones need MySQL time zone tables that many servers don't have, and the driver's own time zone setting also shifts DATETIME values So we fixed session timezone to utc, MySQL then sends TIMESTAMP values as UTC text without an offset, and the driver still parses that text in the JVM time zone, so the values are shifted on any non-UTC JVM. This option lets us tell Spark the zone the database uses (UTC in our case), so reads are correct regardless of the JVM zone. -- 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]
