Skip to content

Commit

Permalink
chore: add columns in one go instead of adding it single
Browse files Browse the repository at this point in the history
  • Loading branch information
achettyiitr committed Dec 9, 2024
1 parent 446666b commit 56219a5
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,8 @@ func (m *Manager) addColumns(ctx context.Context, namespace, tableName string, c
defer func() {
snowflakeManager.Cleanup(ctx)
}()
for _, column := range columns {
if err = snowflakeManager.AddColumns(ctx, tableName, []whutils.ColumnInfo{column}); err != nil {
return fmt.Errorf("adding column: %w", err)
}
if err = snowflakeManager.AddColumns(ctx, tableName, columns); err != nil {
return fmt.Errorf("adding column: %w", err)

Check warning on line 69 in router/batchrouter/asyncdestinationmanager/snowpipestreaming/channel.go

View check run for this annotation

Codecov / codecov/patch

router/batchrouter/asyncdestinationmanager/snowpipestreaming/channel.go#L69

Added line #L69 was not covered by tests
}
return nil
}
Expand Down

0 comments on commit 56219a5

Please sign in to comment.