diff --git a/clients/redshift/dialect/dialect_test.go b/clients/redshift/dialect/dialect_test.go index 5f8133218..14a6e40bf 100644 --- a/clients/redshift/dialect/dialect_test.go +++ b/clients/redshift/dialect/dialect_test.go @@ -92,12 +92,12 @@ func TestRedshiftDialect_BuildIsNotToastValueExpression(t *testing.T) { assert.Equal(t, ` COALESCE( - CASE - WHEN JSON_SIZE(tbl."foo") < 500 THEN JSON_SERIALIZE(tbl."foo") NOT LIKE '%__debezium_unavailable_value%' - ELSE - TRUE - END, - TRUE + CASE + WHEN JSON_SIZE(tbl."foo") < 500 THEN JSON_SERIALIZE(tbl."foo") NOT LIKE '%__debezium_unavailable_value%' + ELSE + TRUE + END, + TRUE )`, RedshiftDialect{}.BuildIsNotToastValueExpression("tbl", columns.NewColumn("foo", typing.Struct)), ) } @@ -106,12 +106,12 @@ COALESCE( assert.Equal(t, ` COALESCE( - CASE - WHEN JSON_SIZE(tbl."foo") < 500 THEN JSON_SERIALIZE(tbl."foo") NOT LIKE '%__debezium_unavailable_value%' - ELSE - TRUE - END, - TRUE + CASE + WHEN JSON_SIZE(tbl."foo") < 500 THEN JSON_SERIALIZE(tbl."foo") NOT LIKE '%__debezium_unavailable_value%' + ELSE + TRUE + END, + TRUE )`, RedshiftDialect{}.BuildIsNotToastValueExpression("tbl", columns.NewColumn("foo", typing.Array)), ) } diff --git a/lib/sql/tests/columns_test.go b/lib/sql/tests/columns_test.go index 1e0fd8824..2be8586d6 100644 --- a/lib/sql/tests/columns_test.go +++ b/lib/sql/tests/columns_test.go @@ -159,12 +159,12 @@ func TestBuildColumnsUpdateFragment_Redshift(t *testing.T) { columns: lastCaseColTypes, expectedString: `"a1"= CASE WHEN COALESCE( - CASE - WHEN JSON_SIZE(stg."a1") < 500 THEN JSON_SERIALIZE(stg."a1") NOT LIKE '%__debezium_unavailable_value%' - ELSE - TRUE - END, - TRUE + CASE + WHEN JSON_SIZE(stg."a1") < 500 THEN JSON_SERIALIZE(stg."a1") NOT LIKE '%__debezium_unavailable_value%' + ELSE + TRUE + END, + TRUE ) THEN stg."a1" ELSE tgt."a1" END,"b2"= CASE WHEN COALESCE(stg."b2" NOT LIKE '%__debezium_unavailable_value%', TRUE) THEN stg."b2" ELSE tgt."b2" END,"c3"=stg."c3"`, }, }