diff --git a/bulkerlib/implementations/sql/redshift.go b/bulkerlib/implementations/sql/redshift.go index a6c9001..cfac266 100644 --- a/bulkerlib/implementations/sql/redshift.go +++ b/bulkerlib/implementations/sql/redshift.go @@ -205,7 +205,7 @@ func (p *Redshift) CopyTables(ctx context.Context, targetTable *Table, sourceTab quotedTargetTableName := p.quotedTableName(targetTable.Name) quotedSourceTableName := p.quotedTableName(sourceTable.Name) - if mergeWindow <= 0 && len(targetTable.PKFields) > 0 { + if mergeWindow > 0 && len(targetTable.PKFields) > 0 { //delete duplicates from table var pkMatchConditions string for i, pkColumn := range targetTable.GetPKFields() {