Skip to content

Commit

Permalink
PR feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
nathan-artie committed May 13, 2024
1 parent 83ad5ad commit b0996c2
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions clients/shared/append.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ func Append(dwh destination.DataWarehouse, tableData *optimization.TableData, op
return fmt.Errorf("failed to get table config: %w", err)
}

cols, _ := columns.RemoveDeleteColumnMarker(tableConfig.Columns().GetColumns())
srcColumns, _ := columns.RemoveDeleteColumnMarker(tableData.ReadOnlyInMemoryCols().GetColumns())

// We don't care about srcKeysMissing because we don't drop columns when we append.
_, targetKeysMissing := columns.Diff(
tableData.ReadOnlyInMemoryCols().GetColumns(),
cols,
tableData.TopicConfig().SoftDelete,
srcColumns,
tableConfig.Columns().GetColumns(),
false,
tableData.TopicConfig().IncludeArtieUpdatedAt,
tableData.TopicConfig().IncludeDatabaseUpdatedAt,
tableData.Mode(),
Expand All @@ -49,7 +49,7 @@ func Append(dwh destination.DataWarehouse, tableData *optimization.TableData, op
return fmt.Errorf("failed to alter table: %w", err)
}

if err = tableData.MergeColumnsFromDestination(cols...); err != nil {
if err = tableData.MergeColumnsFromDestination(tableConfig.Columns().GetColumns()...); err != nil {
return fmt.Errorf("failed to merge columns from destination: %w", err)
}

Expand Down

0 comments on commit b0996c2

Please sign in to comment.