[ https://issues.apache.org/jira/browse/CALCITE-2776?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Stamatis Zampetakis resolved CALCITE-2776. ------------------------------------------ Resolution: Fixed Fixed inĀ [5a305f166cf06419a0c28e496a9bf853ba540047|https://github.com/apache/calcite-avatica/commit/5a305f166cf06419a0c28e496a9bf853ba540047]. > 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: avatica-1.14.0 > > Time Spent: 0.5h > Remaining Estimate: 0h > > 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)