Skip to content

ResultSet getObject with class return null values filled as it was not null #979

@FDoKE

Description

@FDoKE

When selecting values from table with getObject(index, Class)
simple types (like float/int/boolean) return 0/false as result (when null is expected).

CREATE TABLE db.tbl
   (
   id int not null,
   double_col double,
   float_col float,
   varchar_col varchar(36),
   boolean_col boolean,
   int_col int,
   bigint_col bigint,
   char_col char(10),
   int32_col int32
   primary key (id)
   )
   distributed by (id)

Expected: [1, null, null, null, null, null, null, null, null]
Actual: [1, 0.0, 0.0, null, false, 0, 0, null, 0]

getObject(int columnIndex) returns null as expected.

Is that expected behaivor? (it breaks Vertx jdbc client as it always uses getObject with expected class)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions