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

[cdc] Fix bug that computed columns work abnormally with case-insensitive #2485

Merged
merged 2 commits into from
Dec 12, 2023

Conversation

yuzelin
Copy link
Contributor

@yuzelin yuzelin commented Dec 12, 2023

Purpose

We cannot retrieve schema with case sensitive because the computed columns rely on the original schema.
I refactor the flow:

  1. case-sensitive is not involved in the validation, schema retrieving and computed columns building phases;
  2. building Paimon schema uses case-sensitive;
  3. when parsing records, first we parse all field and evaluate all computed columns, and then we apply case-sensitive conversion.

Tests

KafkaCanalSyncTableActionITCase#testComputedColumnWithCaseInsensitive
MongoDBSyncTableActionITCase#testComputedColumnWithCaseInsensitive
MySqlSyncTableActionITCase#testComputedColumnWithCaseInsensitive
MySqlSyncTableActionITCase#testSpecifyKeysWithCaseInsensitive

API and Format

Documentation

@yuzelin yuzelin force-pushed the fix_computed_column branch from 57705e7 to 137ec4e Compare December 12, 2023 02:58
@yuzelin yuzelin force-pushed the fix_computed_column branch from 137ec4e to a0aa552 Compare December 12, 2023 03:30
@yuzelin yuzelin closed this Dec 12, 2023
@yuzelin yuzelin deleted the fix_computed_column branch December 12, 2023 07:59
@yuzelin yuzelin restored the fix_computed_column branch December 12, 2023 07:59
@yuzelin yuzelin reopened this Dec 12, 2023
Copy link
Contributor

@JingsongLi JingsongLi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

@JingsongLi JingsongLi merged commit 2c401ac into apache:master Dec 12, 2023
18 checks passed
@yuzelin yuzelin deleted the fix_computed_column branch December 15, 2023 16:34
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.

2 participants