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/01/08 14:23:00 UTC
[jira] [Commented] (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:comment-tabpanel&focusedCommentId=16737166#comment-16737166 ]
Stamatis Zampetakis commented on CALCITE-2776:
----------------------------------------------
I run CalciteSuite with an Avatica jar containing PR#82 and all the tests pass after including the fix for CALCITE-2677.
> 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
> Priority: Blocker
> Labels: pull-request-available
> Fix For: next
>
>
> 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)