Skip to content

Commit

Permalink
Add TODOs
Browse files Browse the repository at this point in the history
  • Loading branch information
nathan-artie committed Apr 22, 2024
1 parent ea43232 commit 0e5d1a9
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions clients/shared/sweep.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ type GetQueryFunc func(dbAndSchemaPair kafkalib.DatabaseSchemaPair) (string, []a

func Sweep(dwh destination.DataWarehouse, topicConfigs []*kafkalib.TopicConfig, getQueryFunc GetQueryFunc) error {
slog.Info("Looking to see if there are any dangling artie temporary tables to delete...")
// TODO: Rewrite this to use [DataWarehouse.IdentifierFor]
dbAndSchemaPairs := kafkalib.GetUniqueDatabaseAndSchema(topicConfigs)
for _, dbAndSchemaPair := range dbAndSchemaPairs {
query, args := getQueryFunc(dbAndSchemaPair)
Expand All @@ -29,6 +30,7 @@ func Sweep(dwh destination.DataWarehouse, topicConfigs []*kafkalib.TopicConfig,
}

if ddl.ShouldDeleteFromName(tableName) {
// TODO: Rewrite this to pass a [types.TableIdentifiers] to [DropTemporaryTable]
err = ddl.DropTemporaryTable(dwh, fmt.Sprintf("%s.%s.%s", dbAndSchemaPair.Database, tableSchema, tableName), true)
if err != nil {
return err
Expand Down

0 comments on commit 0e5d1a9

Please sign in to comment.