[
https://issues.apache.org/jira/browse/FLINK-36263?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18132217#comment-18132217
]
YaLei Zhang commented on FLINK-36263:
-------------------------------------
Hi, I'd like to work on this issue. My understanding is that for UPDATE events,
the Canal JSON old field should contain only the previous values of changed
columns.
I plan to compare the before and after values when building old, and add
regression tests for single/multiple changed columns, null transitions, and
unchanged columns, while preserving the existing INSERT and DELETE behavior.
If this approach makes sense, could a committer assign this issue to me
(pika0yalei)?
> Include only changed columns in old for canal format in Kakfa Sink
> ------------------------------------------------------------------
>
> Key: FLINK-36263
> URL: https://issues.apache.org/jira/browse/FLINK-36263
> Project: Flink
> Issue Type: New Feature
> Components: Flink CDC
> Affects Versions: cdc-3.3.0
> Reporter: Yanquan Lv
> Priority: Minor
>
> For Update type events, in Canal's official implementation, the old field
> only contains the modified column data.
> An example output that only c_int and c_tinyint columns were changed:
> {code:java}
> {
> "id": 0,
> ...
> "type": "UPDATE",
> ...
> "sqlType": {
> ...
> },
> "mysqlType": {
> ...
> },
> "data": [
> {
> "c_bigint": "9223372036854775807",
> "c_int": "0",
> "c_mediumint": "8388607",
> "c_smallint": "32767",
> "c_tinyint": "0",
> "id": "2"
> }
> ],
> "old": [
> {
> "c_int": "2147483647",
> "c_tinyint": "127"
> }
> ]
> } {code}
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)