You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Stamatis Zampetakis (JIRA)" <ji...@apache.org> on 2019/02/22 14:31:00 UTC

[jira] [Updated] (CALCITE-2776) Wrong value when accessing struct types with one attribute

     [ https://issues.apache.org/jira/browse/CALCITE-2776?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Stamatis Zampetakis updated CALCITE-2776:
-----------------------------------------
    Fix Version/s:     (was: next)
                   1.19.0

> Wrong value when accessing struct types with one attribute
> ----------------------------------------------------------
>
>                 Key: CALCITE-2776
>                 URL: https://issues.apache.org/jira/browse/CALCITE-2776
>             Project: Calcite
>          Issue Type: Bug
>          Components: avatica
>    Affects Versions: avatica-1.13.0
>            Reporter: Stamatis Zampetakis
>            Assignee: Stamatis Zampetakis
>            Priority: Blocker
>              Labels: pull-request-available
>             Fix For: 1.19.0
>
>
> The accessors for struct types with one attribute are not created correctly leading to wrong values when the internal representation for structured types is an Object[]. 
> For example consider the following query:
> {code:sql}
> select * from (values
>     (1, ROW(1)),
>     (2, ROW(2))) as v(id,struct);
> {code}
> Executing this query on calcite returns:
> {code:sql}
>  +----+--------------------------------+
>  | ID | STRUCT                         |
>  +----+--------------------------------+
>  |  1 | {[Ljava.lang.Object;@4ff4357f} |
>  |  2 | {[Ljava.lang.Object;@49cb9cb5} |
>  +----+--------------------------------+
> {code}
> instead of: 
> {code:sql}
> +----+--------+
> | ID | STRUCT |
> +----+--------+
> |  1 | {1}    |
> |  2 | {2}    |
> +----+--------+
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)