You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Alessandro Solimando (Jira)" <ji...@apache.org> on 2020/12/10 17:43:00 UTC

[jira] [Updated] (CALCITE-4436) Use the fields order from the struct type for 'ITEM(STRUCT, INDEX)' access

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

Alessandro Solimando updated CALCITE-4436:
------------------------------------------
    Description: 
The index-based access via the "ITEM" operator for operands of row/struct type is currently experimental and disabled by default (introduced in CALCITE-4354).

Its implementation uses the fields order from `getDeclaredFields()`, a JVM-specific feature, this might lead to silent data corruption (see [PR-2230|https://github.com/apache/calcite/pull/2230]).

The aim of the ticket is to improve the feature by relying on the safer fields order 
 from the struct field type itself (_i.e._, `relType.getFields()[index]`) so that we can enable it by default.

  was:
The index-based access via the "ITEM" operator for operands of row/struct type is currently experimental and disabled by default.

Its implementation uses the fields order from `getDeclaredFields()`, a JVM-specific feature, this might lead to silent data corruption (see [PR-2230|https://github.com/apache/calcite/pull/2230]).

The aim of the ticket is to improve the feature by relying on the safer fields order 
from the struct field type itself (_i.e._, `relType.getFields()[index]`) so that we can enable it by default.


> Use the fields order from the struct type for 'ITEM(STRUCT, INDEX)' access
> --------------------------------------------------------------------------
>
>                 Key: CALCITE-4436
>                 URL: https://issues.apache.org/jira/browse/CALCITE-4436
>             Project: Calcite
>          Issue Type: Improvement
>          Components: core
>    Affects Versions: 1.27.0
>            Reporter: Alessandro Solimando
>            Assignee: Alessandro Solimando
>            Priority: Major
>
> The index-based access via the "ITEM" operator for operands of row/struct type is currently experimental and disabled by default (introduced in CALCITE-4354).
> Its implementation uses the fields order from `getDeclaredFields()`, a JVM-specific feature, this might lead to silent data corruption (see [PR-2230|https://github.com/apache/calcite/pull/2230]).
> The aim of the ticket is to improve the feature by relying on the safer fields order 
>  from the struct field type itself (_i.e._, `relType.getFields()[index]`) so that we can enable it by default.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)