-
Notifications
You must be signed in to change notification settings - Fork 592
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): add name
field and change date
representation to Epoch in debezium json
#13496
Conversation
TimestampHandlingMode::String, | ||
TimestamptzHandlingMode::UtcString, | ||
&CustomJsonType::None, | ||
) | ||
.unwrap(); | ||
assert_eq!(ts_value, json!("1970-01-01 00:16:40.000000".to_string())); | ||
|
||
// Represents the number of microseconds past midnigh, io.debezium.time.Time | ||
// Represents the number of milliseconds past midnigh, org.apache.kafka.connect.data.Time |
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.
Good catch!
{"id":7,"v_bigint":15914,"v_bytea":"ur7A3g==","v_double":10967.182297153104,"v_float":3946.743408203125,"v_integer":12652,"v_smallint":10324,"v_timestamp":1681447263083,"v_varchar":"YIVLnWxHyf"} | ||
{"id":8,"v_bigint":28641,"v_bytea":"3q26vg==","v_double":993.408963466774,"v_float":13652.0732421875,"v_integer":19036,"v_smallint":194,"v_timestamp":1681393929356,"v_varchar":"lv7Eq3g8hx"} | ||
{"id":9,"v_bigint":24837,"v_bytea":"3q26vg==","v_double":11615.276406159757,"v_float":20699.55859375,"v_integer":20090,"v_smallint":10028,"v_timestamp":1681389642487,"v_varchar":"nwRq4zejSQ"} | ||
{"id":1,"v_bigint":1872,"v_bytea":"AA==","v_date":1,"v_double":23956.39329760601,"v_float":26261.416015625,"v_integer":1872,"v_interval":"P0Y0M0DT0H0M0S","v_jsonb":"{}","v_smallint":31031,"v_time":1000,"v_timestamp":1681453634104,"v_timestamptz":"0001-01-01 00:00:00.123456","v_varchar":"8DfUFencLe"} |
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.
Note to myself: this would become "v_timestamptz":"0001-01-01 00:00:00.123456Z"
after migrating to new syntax #13066
(8, 'lv7Eq3g8hx', 194, 19036, 28641, 13652.073, 993.408963466774, '2023-04-13 13:52:09.356742', '\xDEADBABE'), | ||
(9, 'nwRq4zejSQ', 10028, 20090, 24837, 20699.559, 11615.276406159757, '2023-04-13 12:40:42.487742', '\xDEADBABE'), | ||
(10, '0oVqRIHqkb', 26951, 20674, 20674, 19387.238, 9042.404483827515, '2023-04-13 16:40:58.888742', '\x00'); | ||
(1, '8DfUFencLe', 31031, 1872, 1872, 26261.416, 23956.39329760601, '2023-04-14 06:27:14.104742', '\x00', '0 second', '0001-01-01', '00:00:01.123456', '0001-01-01 00:00:00.123456'::timestamptz, '{}'), |
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.
'0001-01-01 00:00:00.123456'::timestamptz
is discouraged usage. It is better to include a timezone:
'0001-01-01 00:00:00.123456Z'
'0001-01-01 00:00:00.123456+00:00'
'0001-01-01 00:00:00.123456+08:00'
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.
create table test (
tz timestamptz
);
insert into test values ('0001-01-01 00:00:00Z');
will cause Parse error: Can't cast string to timestamp (expected format is YYYY-MM-DD HH:MM:SS[.D+{up to 6 digits}] or YYYY-MM-DD HH:MM or YYYY-MM-DD or ISO 8601 format)
.
'1969-01-01 00:00:00Z'
is ok.
ec9d8ea
I hereby agree to the terms of the RisingWave Labs, Inc. Contributor License Agreement.
What's changed and what's your intention?
name
field in debezium json #13450. Addname
field in the debezium json schema. Now we can use Debezium JDBC to consume events from kafka, which are produced by a kafka sink with Debezium JSON format in RisingWave, and then use Debezium JDBC writedate
,time
,timestamp
,timestamptz
,json
type data directly to PostgreSQL.date
Representation in debezium json #13486.Checklist
./risedev check
(or alias,./risedev c
)Documentation
Release note
If this PR includes changes that directly affect users or other significant modifications relevant to the community, kindly draft a release note to provide a concise summary of these changes. Please prioritize highlighting the impact these changes will have on users.