Skip to content

Commit

Permalink
Update test
Browse files Browse the repository at this point in the history
  • Loading branch information
nathan-artie committed May 3, 2024
1 parent f3b8c2e commit 37a1d70
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions lib/destination/dml/merge_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -273,18 +273,11 @@ func TestMergeStatementEscapePrimaryKeys(t *testing.T) {
}

func TestMergeArgument_RedshiftEqualitySQLParts(t *testing.T) {
cols := []columns.Column{
columns.NewColumn("col1", typing.Invalid),
columns.NewColumn("col2", typing.Invalid),
}

mergeArg := MergeArgument{
TableID: MockTableIdentifier{"{TABLE_ID}"},
SubQuery: "{SUB_QUERY}",
PrimaryKeys: []columns.Column{cols[0], columns.NewColumn("othercol", typing.Invalid)},
PrimaryKeys: []columns.Column{columns.NewColumn("col1", typing.Invalid), columns.NewColumn("col2", typing.Invalid)},
Dialect: sql.SnowflakeDialect{},
}
assert.Equal(t, []string{`c."COL1" = cc."COL1"`, `c."OTHERCOL" = cc."OTHERCOL"`}, mergeArg.redshiftEqualitySQLParts())
assert.Equal(t, []string{`c."COL1" = cc."COL1"`, `c."COL2" = cc."COL2"`}, mergeArg.redshiftEqualitySQLParts())
}

func TestMergeArgument_BuildRedshiftInsertQuery(t *testing.T) {
Expand Down

0 comments on commit 37a1d70

Please sign in to comment.