Skip to content

Commit

Permalink
fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
ptiurin committed Dec 9, 2024
1 parent 98a40fa commit 904ca57
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1484,18 +1484,18 @@ void shouldReturnStruct() throws SQLException {
resultSet = createResultSet(inputStream);
resultSet.next();
// TODO: is this correct null handling?
assertEquals("{\"a\": N}", resultSet.getObject(3));
assertEquals("{\"a\": N}", resultSet.getObject("an_empty_struct"));
assertEquals("{\"a\": 1}", resultSet.getObject(4));
assertEquals("{\"a\": 1}", resultSet.getObject("a_struct"));
assertEquals("{\"a\":N}", resultSet.getObject(2));
assertEquals("{\"a\":N}", resultSet.getObject("null_struct"));
assertEquals("{\"a\":\"1\"}", resultSet.getObject(4));
assertEquals("{\"a\":\"1\"}", resultSet.getObject("a_struct"));
// Returns native JDBC type
for (int i = 3; i <= 5; i++) {
for (int i = 2; i <= 4; i++) {
assertEquals(Types.VARCHAR, resultSet.getMetaData().getColumnType(i));
}

assertEquals("STRUCT(A INT NULL)", resultSet.getMetaData().getColumnTypeName(3));
assertEquals("STRUCT(A INT NULL)", resultSet.getMetaData().getColumnTypeName(2));
assertEquals("STRUCT(A INT)", resultSet.getMetaData().getColumnTypeName(3));
assertEquals("STRUCT(A INT)", resultSet.getMetaData().getColumnTypeName(4));
assertEquals("STRUCT(A INT)", resultSet.getMetaData().getColumnTypeName(5));
}

@Test
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +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"}

0 comments on commit 904ca57

Please sign in to comment.