Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
nathan-artie committed May 3, 2024
1 parent 6161ac4 commit 40722b3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/destination/dml/merge.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ func (m *MergeArgument) buildRedshiftInsertQuery(columns []columns.Column) strin
)
}

func (m *MergeArgument) buildRedshiftUpdateQuery(columns []columns.Column, softDeletes bool) string {
func (m *MergeArgument) buildRedshiftUpdateQuery(columns []columns.Column, softDelete bool) string {
stringBuilder := strings.Builder{}

stringBuilder.WriteString(fmt.Sprintf(`UPDATE %s as c SET %s FROM %s as cc WHERE %s`,
Expand All @@ -114,7 +114,7 @@ func (m *MergeArgument) buildRedshiftUpdateQuery(columns []columns.Column, softD
stringBuilder.WriteString(fmt.Sprintf(" AND cc.%s >= c.%s", m.IdempotentKey, m.IdempotentKey))
}

if !softDeletes {
if !softDelete {
stringBuilder.WriteString(fmt.Sprintf(" AND COALESCE(cc.%s, false) = false", m.Dialect.QuoteIdentifier(constants.DeleteColumnMarker)))
}

Expand Down

0 comments on commit 40722b3

Please sign in to comment.