[ https://issues.apache.org/jira/browse/CALCITE-4503?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Stamatis Zampetakis resolved CALCITE-4503. ------------------------------------------ Resolution: Fixed Fixed in [9e37120b1c6512354357f83dce0abb85176fc2c3|https://github.com/apache/calcite-avatica/commit/9e37120b1c6512354357f83dce0abb85176fc2c3]. Thanks for the PR [~asolimando]! > Order of fields in records should follow that of the SQL types > -------------------------------------------------------------- > > Key: CALCITE-4503 > URL: https://issues.apache.org/jira/browse/CALCITE-4503 > Project: Calcite > Issue Type: Bug > Components: avatica > Affects Versions: 1.17.0 > Reporter: Alessandro Solimando > Assignee: Alessandro Solimando > Priority: Minor > Labels: pull-request-available > Fix For: 1.18.0 > > > When dealing with records coming from Java classes, Avatica relies on the > order of fields coming from {{java.lang.Class#getFields}} instead of using > the order defined in the underlying SQL data type: > # [org.apache.calcite.avatica.MetaImpl#createGetter(int > ordinal)|https://github.com/apache/calcite-avatica/blob/ba20936bb1387793f34ae489760ec0cdbe205e4e/core/src/main/java/org/apache/calcite/avatica/MetaImpl.java#L145] > # > [org.apache.calcite.avatica.util.RecordIteratorCursor#RecordIteratorCursor(Iterator<E> > iterator, Class<E> > clazz)|https://github.com/apache/calcite-avatica/blob/ba20936bb1387793f34ae489760ec0cdbe205e4e/core/src/main/java/org/apache/calcite/avatica/util/RecordIteratorCursor.java#L42] > This behaviour prevents the change of fields orders, and it's particularly > problematic because {{#getFields}} is JVM-specific. > -- This message was sent by Atlassian Jira (v8.3.4#803005)