Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1318,8 +1318,9 @@ private Object convertValue() throws SQLException {
return componentAccessor.getInt();
case Types.BIGINT:
return componentAccessor.getLong();
case Types.FLOAT:
case Types.REAL:
return componentAccessor.getFloat();
case Types.FLOAT:
Comment on lines -1321 to +1323

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The fix looks reasonable but I was thinking that it would be nice to have some tests to guard against future regressions. Maybe in ArrayTypeTest?

@asolimando asolimando Feb 20, 2021

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree, unfortunately ArrayTypeTest being based on hsqldb, won't work as-is, because hsqldb maps Double, Real and Float to Java double (see here).

I tried and indeed a CREATE TABLE $table (id integer, vals REAL ARRAY) statement creates a table (INTEGER, DOUBLE ARRAY).

Either we find an "easy" way to use another DB in those tests, or we need to find another location, I will have a look during the weekend.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have managed to add unit tests, I have opened a complementing PR: #139

case Types.DOUBLE:
return componentAccessor.getDouble();
case Types.ARRAY:
Expand Down