Skip to content

Commit

Permalink
Fix IDTB#testUpdateWithPredicate
Browse files Browse the repository at this point in the history
  • Loading branch information
ZacBlanco committed Dec 26, 2024
1 parent 8a38c47 commit 19ee4d9
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2273,13 +2273,13 @@ public void testUpdateWithPredicates()
assertUpdate("UPDATE " + tableName + " SET email = 'abc@gmail.com' WHERE id in(1, 2, 3)", 3);
assertQuery("SELECT id, full_name, email FROM " + tableName, "VALUES (1, 'aaaa', 'abc@gmail.com'), (2, 'ssss', 'abc@gmail.com'), (3, 'ssss', 'abc@gmail.com'), (4, 'dddd', 'ddd@gmail.com') ");

// set values to null
// set all values to null
assertUpdate("UPDATE " + tableName + " SET email = NULL", 4);
assertQuery("SELECT email FROM " + tableName + " WHERE email is NULL", "VALUES NULL");
assertQuery("SELECT email FROM " + tableName + " WHERE email is NULL", "VALUES NULL, NULL, NULL, NULL");

// update nulls to non-null
assertUpdate("UPDATE " + tableName + " SET email = 'test@gmail.com' WHERE full_name is NULL", 1);
assertQuery("SELECT email FROM " + tableName + "WHERE email is NULL", "VALUES 'test@gmail.com'");
assertUpdate("UPDATE " + tableName + " SET email = 'test@gmail.com' WHERE email is NULL", 4);
assertQuery("SELECT count(*) FROM " + tableName + " WHERE email is not NULL", "VALUES 4");
}

@Test
Expand Down

0 comments on commit 19ee4d9

Please sign in to comment.