Skip to content
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

[Feature] Ignore decimal type evolution in special case #4783

Open
2 tasks done
JackeyLee007 opened this issue Dec 26, 2024 · 0 comments
Open
2 tasks done

[Feature] Ignore decimal type evolution in special case #4783

JackeyLee007 opened this issue Dec 26, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@JackeyLee007
Copy link
Contributor

JackeyLee007 commented Dec 26, 2024

Search before asking

  • I searched in the issues and found nothing similar.

Motivation

We use ticdc to collect data from tidb and send to kafka in canal-json format, then sink the data with paimon-flink-action.

But actually only type name are collected and sent to kafka for the metadata part. For example, the decimal fields, only the name 'decimal' provided, without the precision and scale.

In paimon-flink-action, the missing precision and scale will be set to maximum, which is decimal(38,16). That is too large and not expected.
In this case, the original format is prefer, which means not changing the deciaml type during cdc.

Solution

Add a type-mappint option for kafka cdc, like

# to ignore only decimal change
--type_mapping decimal-no-change
# to ingore any type change
--type_mapping no_change

And ignore the type change in $$RichEventParser::parseSchemaChange$$

Anything else?

Enlarging type also occurs to char/varchar, which is acceptable.

Are you willing to submit a PR?

  • I'm willing to submit a PR!
@JackeyLee007 JackeyLee007 added the enhancement New feature or request label Dec 26, 2024
@JackeyLee007 JackeyLee007 changed the title [Feature] Ignore decimal type evolution if no precision and scale provided during CDC. [Feature] Ignore decimal type evolution in special case Dec 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant