From e1977a82dbbf1b361eb8ec49ef55b18c5f4ae0db Mon Sep 17 00:00:00 2001 From: Kaushik Iska Date: Sun, 14 Jul 2024 15:46:01 -0500 Subject: [PATCH] [clickhouse] Resync allow non deterministic mutations (#1935) --- flow/connectors/clickhouse/cdc.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/flow/connectors/clickhouse/cdc.go b/flow/connectors/clickhouse/cdc.go index 737d080ff1..4a7dd98013 100644 --- a/flow/connectors/clickhouse/cdc.go +++ b/flow/connectors/clickhouse/cdc.go @@ -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)