Skip to content

Commit

Permalink
Add new col to more test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
danafallon committed Jul 16, 2024
1 parent 8a1c6c6 commit 6831601
Showing 1 changed file with 19 additions and 15 deletions.
34 changes: 19 additions & 15 deletions clients/snowflake/dialect/dialect_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -330,11 +330,12 @@ func TestSnowflakeDialect_BuildMergeQueries(t *testing.T) {
// No idempotent key
fqTable := "database.schema.table"
_cols := buildColumns(map[string]typing.KindDetails{
"id": typing.String,
"bar": typing.String,
"updated_at": typing.String,
"start": typing.String,
constants.DeleteColumnMarker: typing.Boolean,
"id": typing.String,
"bar": typing.String,
"updated_at": typing.String,
"start": typing.String,
constants.DeleteColumnMarker: typing.Boolean,
constants.OnlySetDeletedColumnMarker: typing.Boolean,
})

fakeTableID := &mocks.FakeTableIdentifier{}
Expand Down Expand Up @@ -362,8 +363,9 @@ WHEN NOT MATCHED AND IFNULL(stg."__ARTIE_DELETE", false) = false THEN INSERT ("B
func TestSnowflakeDialect_BuildMergeQueries_IdempotentKey(t *testing.T) {
fqTable := "database.schema.table"
_cols := buildColumns(map[string]typing.KindDetails{
"id": typing.String,
constants.DeleteColumnMarker: typing.Boolean,
"id": typing.String,
constants.DeleteColumnMarker: typing.Boolean,
constants.OnlySetDeletedColumnMarker: typing.Boolean,
})

fakeTableID := &mocks.FakeTableIdentifier{}
Expand Down Expand Up @@ -391,9 +393,10 @@ WHEN NOT MATCHED AND IFNULL(stg."__ARTIE_DELETE", false) = false THEN INSERT ("I
func TestSnowflakeDialect_BuildMergeQueries_CompositeKey(t *testing.T) {
fqTable := "database.schema.table"
_cols := buildColumns(map[string]typing.KindDetails{
"id": typing.String,
"another_id": typing.String,
constants.DeleteColumnMarker: typing.Boolean,
"id": typing.String,
"another_id": typing.String,
constants.DeleteColumnMarker: typing.Boolean,
constants.OnlySetDeletedColumnMarker: typing.Boolean,
})

fakeTableID := &mocks.FakeTableIdentifier{}
Expand Down Expand Up @@ -425,11 +428,12 @@ func TestSnowflakeDialect_BuildMergeQueries_EscapePrimaryKeys(t *testing.T) {
// No idempotent key
fqTable := "database.schema.table"
_cols := buildColumns(map[string]typing.KindDetails{
"id": typing.String,
"group": typing.String,
"updated_at": typing.String,
"start": typing.String,
constants.DeleteColumnMarker: typing.Boolean,
"id": typing.String,
"group": typing.String,
"updated_at": typing.String,
"start": typing.String,
constants.DeleteColumnMarker: typing.Boolean,
constants.OnlySetDeletedColumnMarker: typing.Boolean,
})

fakeTableID := &mocks.FakeTableIdentifier{}
Expand Down

0 comments on commit 6831601

Please sign in to comment.