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

Fix COLLAPSING_MERGE_TREE Update statement #74

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Raffaellorr
Copy link

It would insert an empty statement, which covered the before statement. Now I insert a before statement first and then insert an after statement.

It would insert an empty statement, which covered the `before` statement. Now I insert a `before` statement first and then insert an `after` statement.
@aadant aadant requested a review from subkanthi September 11, 2022 18:24
@@ -418,9 +419,15 @@ public BlockMetaData addToPreparedStatementBatch(String topicName, Map<MutablePa
insertPreparedStatement(entry.getKey().right, ps, record.getAfterModifiedFields(), record, record.getAfterStruct(), false);
} else if(CdcRecordState.CDC_RECORD_STATE_BOTH == getCdcSectionBasedOnOperation(record.getCdcOperation())) {
if(this.engine != null && this.engine.getEngine().equalsIgnoreCase(DBMetadata.TABLE_ENGINE.COLLAPSING_MERGE_TREE.getEngine())) {
insertPreparedStatement(entry.getKey().right, ps, record.getBeforeModifiedFields(), record, record.getBeforeStruct(), true);
if (!beforeInseted) {
Copy link
Collaborator

@subkanthi subkanthi Sep 11, 2022

Choose a reason for hiding this comment

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

typo, This should be beforeInserted

Copy link
Author

@Raffaellorr Raffaellorr Sep 12, 2022

Choose a reason for hiding this comment

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

Sorry, my bad. I'll fix it.

@Raffaellorr
Copy link
Author

Hi, @subkanthi . I've fixed it.

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