You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@calcite.apache.org by GitBox <gi...@apache.org> on 2021/02/20 12:41:50 UTC

[GitHub] [calcite-avatica] asolimando commented on a change in pull request #105: [CALCITE-3163] AbstractCursor#convertValue() now adheres to JDBC specification

asolimando commented on a change in pull request #105:
URL: https://github.com/apache/calcite-avatica/pull/105#discussion_r579652093



##########
File path: core/src/main/java/org/apache/calcite/avatica/util/AbstractCursor.java
##########
@@ -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:

Review comment:
       I agree, unfortunately `ArrayTypeTest` being based on `hsqldb`, it won't work as-is, because `hsqldb` maps `Double`, `Real` and `Float` to Java `double` (see [here](http://hsqldb.org/doc/guide/sqlgeneral-chapt.html#sgc_numeric_types)).
   
   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.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org