You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@calcite.apache.org by "Kent Nguyen (Jira)" <ji...@apache.org> on 2020/08/20 06:14:00 UTC

[jira] [Created] (CALCITE-4181) Avatica throw exception when select field is a List

Kent Nguyen created CALCITE-4181:
------------------------------------

             Summary: Avatica throw exception when select field is a List<?>
                 Key: CALCITE-4181
                 URL: https://issues.apache.org/jira/browse/CALCITE-4181
             Project: Calcite
          Issue Type: Bug
          Components: avatica
    Affects Versions: avatica-1.17.0
            Reporter: Kent Nguyen
            Assignee: Kent Nguyen


When a select field is a list of java object, for example List<MapRecord>, ArrayAccessor.getObject() throws an exception. The convertValue() function throws that exception when the list component type is Types.OTHER:

[https://github.com/apache/calcite-avatica/blob/master/core/src/main/java/org/apache/calcite/avatica/util/AbstractCursor.java#L1346]

Any component type that does not exactly match the types in this list will be considered Types.OTHER:

[https://github.com/apache/calcite/blob/master/core/src/main/java/org/apache/calcite/sql/type/JavaToSqlTypeConversionRules.java#L45-L82]

If Types.OTHER is treated the same way as Types.JAVA_OBJECT then it will work for a select query that includes an object in its field list.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)