-
Notifications
You must be signed in to change notification settings - Fork 596
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 emails.
Already on GitHub? Sign in to your account
fix(sink): json timestamptz
should contain UTC suffix Z
#13109
Conversation
Codecov Report
@@ Coverage Diff @@
## main #13109 +/- ##
==========================================
- Coverage 68.10% 68.10% -0.01%
==========================================
Files 1507 1507
Lines 255634 255729 +95
==========================================
+ Hits 174104 174154 +50
- Misses 81530 81575 +45
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 3 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
55fcf52
to
94e6ab2
Compare
a8a0022
to
22142f9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. I did not realize the issue before. 😭
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
I hereby agree to the terms of the RisingWave Labs, Inc. Contributor License Agreement.
What's changed and what's your intention?
In #9755
That PR changed from
1516991409.453000
to2018-01-26 18:30:09.453000
. This format is the only format accept by aninsert
intomysql/tidb
.However, the actual debezium output is
2018-01-26T18:30:09.453Z
, no matter it is from postgresql or mysql.https://github.com/debezium/debezium/blob/main/debezium-core/src/main/java/io/debezium/time/ZonedTimestamp.java
Furthermore, RisingWave json source accepts
2018-01-26T18:30:09.453Z
but rejects2018-01-26 18:30:09.453000
since 1.2.To distinguish it from
timestamp
(without time zone), align with debezium as well as RisingWave's own json source, this PR changes the output format in the following cases:For compatibility, the old format is still used in the following cases:
It also provides a new option for new kafka / kinesis / pulsar append-only / upsert sinks to explicitly select the old format:
timestamptz.handling.mode = 'utc_without_suffix'
Just for a comparison of the different formats:
T
with zone2006-01-02T15:04:05Z
2006-01-02 15:04:05
2006-01-02 15:04:05+00
Z
or+00:00
but not+00
+00
+00
but rw+00:00
Z
or+00:00
but not+00
Checklist
./risedev check
(or alias,./risedev c
)Documentation
Release note
For sinks with
timestamptz
column usingjson
encoding, the output format changed from2018-01-26 18:30:09.453000
to2018-01-26T18:30:09.453000Z
.