Skip to content

record.getBoolean(columnName) fails while record.hasValue(columnName) succeeds in GenericRecord (version 0.7.0) #1971

Closed
@dikshajoshi44

Description

@dikshajoshi44

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

  1. Execute the following generic query to retrieve a record from ClickHouse:
    SELECT EXISTS (
        SELECT *
        FROM {table_name}
        WHERE column_name = '{value_placeholder}'
    );
  2. 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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions