[
https://issues.apache.org/jira/browse/CALCITE-7464?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18081209#comment-18081209
]
Caican Cai commented on CALCITE-7464:
-------------------------------------
Removed from version 1.42.0; currently, there's no time to dedicate resources
to it.
> Refactor type coercion in array/map functions to avoid mutating operands as
> side effects
> ----------------------------------------------------------------------------------------
>
> Key: CALCITE-7464
> URL: https://issues.apache.org/jira/browse/CALCITE-7464
> Project: Calcite
> Issue Type: Improvement
> Affects Versions: 1.41.0
> Reporter: Caican Cai
> Priority: Major
> Labels: pull-request-available
>
> Several array and map functions currently insert explicit CAST nodes by
> mutating operands (call.setOperand()) as a side effect during type checking
> or return type inference. As noted by Julian Hyde and Mihai Budiu in
> CALCITE-6300, this violates the "functional programming" principle —
> SqlOperandTypeChecker and return type inference should be side-effect-free,
> and other code may be surprised by such mutations.
> This pattern has spread to multiple functions: In return type inference (via
> - ARRAY_APPEND / ARRAY_PREPEND / ARRAY_INSERT
--
This message was sent by Atlassian Jira
(v8.20.10#820010)