Skip to content

Commit

Permalink
[clickhouse] Resync allow non deterministic mutations (#1935)
Browse files Browse the repository at this point in the history
  • Loading branch information
iskakaushik authored Jul 14, 2024
1 parent 0a353eb commit e1977a8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions flow/connectors/clickhouse/cdc.go
Original file line number Diff line number Diff line change
Expand Up @@ -179,8 +179,9 @@ func (c *ClickhouseConnector) RenameTables(ctx context.Context, req *protos.Rena
for _, renameRequest := range req.RenameTableOptions {
if req.SyncedAtColName != "" {
syncedAtCol := strings.ToLower(req.SyncedAtColName)
_, err := c.execWithLogging(ctx, fmt.Sprintf("ALTER TABLE %s UPDATE %s=now() WHERE true",
renameRequest.CurrentName, syncedAtCol))
_, err := c.execWithLogging(ctx,
fmt.Sprintf("ALTER TABLE %s UPDATE %s=now() WHERE true SETTINGS allow_nondeterministic_mutations=1",
renameRequest.CurrentName, syncedAtCol))
if err != nil {
return nil, fmt.Errorf("unable to set synced at column for table %s: %w",
renameRequest.CurrentName, err)
Expand Down

0 comments on commit e1977a8

Please sign in to comment.