From 8770519118884e2645bd878d800c54b8b3f25eb6 Mon Sep 17 00:00:00 2001 From: Robin Tang Date: Tue, 15 Oct 2024 20:09:03 -0700 Subject: [PATCH] Check for error. --- clients/redshift/staging.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/clients/redshift/staging.go b/clients/redshift/staging.go index a92b04ba7..70acb1288 100644 --- a/clients/redshift/staging.go +++ b/clients/redshift/staging.go @@ -31,9 +31,13 @@ func (s *Store) PrepareTemporaryTable(ctx context.Context, tableData *optimizati return fmt.Errorf("failed to increase string precision for table %q: %w", parentTableID.FullyQualifiedName(), err) } - tableConfig.Columns().UpsertColumn(colName, columns.UpsertColumnArg{ + err = tableConfig.Columns().UpsertColumn(colName, columns.UpsertColumnArg{ StringPrecision: typing.ToPtr(newValue), }) + + if err != nil { + return fmt.Errorf("failed to update table config with new string precision: %w", err) + } } if createTempTable {