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

ClickHouse resync: remove soft-delete transfer #2411

Merged
merged 2 commits into from
Jan 6, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion flow/connectors/clickhouse/cdc.go
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ func (c *ClickHouseConnector) RenameTables(
allCols := strings.Join(columnNames, ",")
c.logger.Info("handling soft-deletes for table before rename", slog.String("NewName", renameRequest.NewName))
if err := c.execWithLogging(ctx,
fmt.Sprintf("INSERT INTO `%s`(%s,%s) SELECT %s,true FROM `%s` WHERE %s = 1",
fmt.Sprintf("INSERT INTO `%s`(%s,%s) SELECT %s,true FROM `%s` FINAL WHERE %s = 1",
renameRequest.CurrentName, allCols, signColName, allCols, renameRequest.NewName, signColName),
); err != nil {
return nil, fmt.Errorf("unable to handle soft-deletes for table %s: %w", renameRequest.NewName, err)
Expand Down
Loading