8000 change QValueTime/QValueTimeTZ to internally use time.Duration not time.Time by serprex · Pull Request #3036 · PeerDB-io/peerdb · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

change QValueTime/QValueTimeTZ to internally use time.Duration not time.Time #3036

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related ema 8000 ils.

Already on GitHub? Sign in to your account

Merged
merged 13 commits into from
Jun 12, 2025

Conversation

serprex
Copy link
Member
@serprex serprex commented Jun 10, 2025

MySQL should instead map time to QValueTimestamp since QValueTime maps to types on destinations where time is expected to be the time part of a datetime (ie, from 00:00 up to 24:00). Keep existing QValueTime handling to not break existing mirrors. Note these existing mirrors have a problem where in cdc they will have time be modulos 24 hours

Another issue was that postgres time values over cdc on clickhouse were coming in with current year instead of unix epoch. This is because we relied on parseDateTime64BestEffort which interprets times without dates as happening in current year (or previous year in some cases). Adjust normalization to have year be 1970 in order to be consistent between qrep & cdc

This also helps allow in the future mapping QValueTime to DateTime instead of DateTime64

Adjust tests to not be so permissive, which let these discrepancies exist, but which going forward we should prevent

@serprex serprex requested a review from jgao54 June 10, 2025 19:22
@serprex serprex force-pushed the better-time branch 3 times, most recently from a955ef0 to 1da46b8 Compare June 11, 2025 16:40
@serprex serprex marked this pull request as ready for review June 11, 2025 16:41
@serprex serprex force-pushed the better-time branch 2 times, most recently from cdca171 to 47a03c2 Compare June 11, 2025 17:24
@serprex serprex merged commit 4600877 into main Jun 12, 2025
9 checks passed
@serprex serprex deleted the better-time branch June 12, 2025 15:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0