Skip to content

Commit

Permalink
EXCHANGE: quote table names (#2233)
Browse files Browse the repository at this point in the history
  • Loading branch information
heavycrystal authored Nov 8, 2024
1 parent 1f445f8 commit 5f431bb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion flow/connectors/clickhouse/cdc.go
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ func (c *ClickHouseConnector) RenameTables(
c.logger.Info("attempting atomic exchange",
slog.String("OldName", renameRequest.CurrentName), slog.String("NewName", renameRequest.NewName))
if err = c.execWithLogging(ctx,
fmt.Sprintf("EXCHANGE TABLES %s and %s", renameRequest.NewName, renameRequest.CurrentName),
fmt.Sprintf("EXCHANGE TABLES `%s` and `%s`", renameRequest.NewName, renameRequest.CurrentName),
); err == nil {
if err := c.execWithLogging(ctx, fmt.Sprintf(dropTableIfExistsSQL, renameRequest.CurrentName)); err != nil {
return nil, fmt.Errorf("unable to drop exchanged table %s: %w", renameRequest.CurrentName, err)
Expand Down

0 comments on commit 5f431bb

Please sign in to comment.