Skip to content

Commit

Permalink
fix null handling in unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ptiurin committed Dec 9, 2024
1 parent b6d205c commit b0f1178
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1483,9 +1483,8 @@ void shouldReturnStruct() throws SQLException {
inputStream = getInputStreamWithStruct();
resultSet = createResultSet(inputStream);
resultSet.next();
// TODO: is this correct null handling?
assertEquals("{\"a\":N}", resultSet.getObject(2));
assertEquals("{\"a\":N}", resultSet.getObject("null_struct"));
assertEquals("{\"a\":null}", resultSet.getObject(2));
assertEquals("{\"a\":null}", resultSet.getObject("null_struct"));
assertEquals("{\"a\":\"1\"}", resultSet.getObject(4));
assertEquals("{\"a\":\"1\"}", resultSet.getObject("a_struct"));
// Returns native JDBC type
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
id null_struct an_empty_struct a_struct
Int64 struct(a int null) struct(a int) struct(a int)
1 {"a":\N} {"a":"1"}
2 {"a":\N} {"a":"2"}
1 {"a":null} {"a":"1"}
2 {"a":null} {"a":"2"}

0 comments on commit b0f1178

Please sign in to comment.