Closed
Description
Description
I am encountering an issue with the GenericRecord
interface from the com.clickhouse.client.api.query
package in version 0.7.0. The method record.hasValue(columnName)
returns true
, indicating that the column has a value, but when I call record.getBoolean(columnName)
, it does not return the expected boolean value.
Steps to Reproduce
- Execute the following generic query to retrieve a record from ClickHouse:
SELECT EXISTS ( SELECT * FROM {table_name} WHERE column_name = '{value_placeholder}' );
- if (record.hasValue(columnName)) {
boolean value = record.getBoolean(columnName); // This is where the issue occurs
}
Expected Behavior
record.getBoolean(columnName)
should return the correct boolean value when record.hasValue(columnName)
returns true
.
Environment
- ClickHouse Client version: 0.7.0
- Java version: 17