layout: news_item date: “2021-05-18 08:30:00 +0000” author: francischuang version: 1.18.0 categories: [release] tag: v1-18-0 sha: a7cfca4 component: avatica

Apache Calcite Avatica 1.18.0 includes a few dependency updates, bug fixes and a breaking change. In addition, the Gradle wrapper has been removed from the source distribution in order to comply with ASF policy. See the list of [bug fixes and new features]({{ site.baseurl }}/docs/history.html#v1-18-0) for more information.

Breaking change (CALCITE-4503): Order of fields in records should follow that of the SQL types

Meta#deduce(List<ColumnMetaData> columns, Class resultClazz) now only derives the order of the fields from the list of provided column metadata columns when generating a record from the given Java class resultClazz, instead of relying on the field order provided by Object#getFields(), which is a JVM-dependent feature.

Before, the field names where not checked against the field names of the provided class. Now, if resultClazz is not null, the provided field names are expected to match existing fields in that class. If a column metadata has name column, and no public field in resultClazz with that name exists, the following exception is thrown: java.lang.RuntimeException: java.lang.NoSuchFieldException: C.