Skip to content

Commit

Permalink
Spark: Make ignored UPDATE tests deterministic (apache#2243)
Browse files Browse the repository at this point in the history
  • Loading branch information
aokolnychyi authored Feb 19, 2021
1 parent efc4618 commit a747190
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -270,8 +270,8 @@ public void testUpdateWithInAndNotInConditions() {

sql("UPDATE %s SET id = 100 WHERE id NOT IN (1, 10)", tableName);
assertEquals("Should have expected rows",
ImmutableList.of(row(100, "hr"), row(100, "hardware"), row(null, "hr")),
sql("SELECT * FROM %s ORDER BY id ASC NULLS LAST", tableName));
ImmutableList.of(row(100, "hardware"), row(100, "hr"), row(null, "hr")),
sql("SELECT * FROM %s ORDER BY id ASC NULLS LAST, dep", tableName));
}

@Test
Expand Down Expand Up @@ -652,7 +652,7 @@ public void testUpdateWithNotInSubquery() {

sql("UPDATE %s SET id = -1 WHERE id NOT IN (SELECT * FROM updated_id WHERE value IS NOT NULL)", tableName);
assertEquals("Should have expected rows",
ImmutableList.of(row(-1, "hr"), row(-1, "hardware"), row(null, "hr")),
ImmutableList.of(row(-1, "hardware"), row(-1, "hr"), row(null, "hr")),
sql("SELECT * FROM %s ORDER BY id ASC NULLS LAST, dep", tableName));

sql("UPDATE %s SET id = 5 WHERE id NOT IN (SELECT * FROM updated_id) OR dep IN ('software', 'hr')", tableName);
Expand Down

0 comments on commit a747190

Please sign in to comment.