You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 26, 2026. It is now read-only.
Seems like a straightforward bug. BIT seems otherwise supported. Types.BOOLEAN works fine.
According to the spanner docs:
For nullable data types, NULL is a valid value. Currently, all existing data types are nullable.
so I'd expect BIT to be nullable too.
Steps to reproduce
Set a null parameter in SQL which ends up evaluating to BIT type. The corresponding database column will be nullable BOOL.
IllegalArgumentException at runtime
Stack trace
java.lang.IllegalArgumentException: Unsupported sql type for setting to null: -7
com.google.cloud.spanner.jdbc.JdbcParameterStore.setNullValue(JdbcParameterStore.java:912)
at com.google.cloud.spanner.jdbc.JdbcParameterStore.setSingleValue(JdbcParameterStore.java:415)
at com.google.cloud.spanner.jdbc.JdbcParameterStore.setValue(JdbcParameterStore.java:402)
at com.google.cloud.spanner.jdbc.JdbcParameterStore.bindParameterValue(JdbcParameterStore.java:384)
at com.google.cloud.spanner.jdbc.JdbcPreparedStatement.createStatement(JdbcPreparedStatement.java:61)
at com.google.cloud.spanner.jdbc.JdbcPreparedStatement.executeUpdate(JdbcPreparedStatement.java:80)
Seems like a straightforward bug. BIT seems otherwise supported. Types.BOOLEAN works fine.
According to the spanner docs:
so I'd expect BIT to be nullable too.
Steps to reproduce
Stack trace
External references such as API reference guides
https://cloud.google.com/spanner/docs/reference/standard-sql/data-types for the "all existing data types are nullable"