Skip to content

Commit

Permalink
Added new test for null parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
rubenada committed Apr 16, 2024
1 parent 2a03f67 commit bee5c5c
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions core/src/test/java/org/apache/calcite/test/JdbcTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -8466,6 +8466,19 @@ private void checkGetTimestamp(Connection con) throws SQLException {
.returnsUnordered("VAL=2500.55");
}

@Test void bindNullParameter() {
final String sql =
"with cte as (select 2500.55 as val)"
+ "select * from cte where val = ?";

CalciteAssert.hr()
.query(sql)
.consumesPreparedStatement(p -> {
p.setBigDecimal(1, null);
})
.returnsUnordered("");
}

@Disabled("CALCITE-6366")
@Test void bindOverflowingTinyIntParameter() {
final String sql =
Expand Down

0 comments on commit bee5c5c

Please sign in to comment.