From c9e332a51a25abae9589f1996da61dc28895c5ff Mon Sep 17 00:00:00 2001 From: Robin Tang Date: Tue, 8 Oct 2024 08:42:46 -0700 Subject: [PATCH] Update statement. --- clients/redshift/staging.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/clients/redshift/staging.go b/clients/redshift/staging.go index c6c3a086e..b2f708043 100644 --- a/clients/redshift/staging.go +++ b/clients/redshift/staging.go @@ -35,8 +35,10 @@ func (s *Store) PrepareTemporaryTable(tableData *optimization.TableData, tableCo }) } - if err = destination.ExecStatements(s, queries); err != nil { - return fmt.Errorf("failed to increase string precision for table %q: %w", parentTableID.FullyQualifiedName(), err) + if len(queries) > 0 { + if err = destination.ExecStatements(s, queries); err != nil { + return fmt.Errorf("failed to increase string precision for table %q: %w", parentTableID.FullyQualifiedName(), err) + } } if createTempTable {