[ 
https://issues.apache.org/jira/browse/CALCITE-7464?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18081159#comment-18081159
 ] 

Stamatis Zampetakis commented on CALCITE-7464:
----------------------------------------------

Based on the comments in the PR it seems that extra design is needed before 
moving on to the PR. [~caicancai] what's your take on this? Is it a must have 
for 1.42.0 release or can we postpone it to the next? 

> 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
>             Fix For: 1.42.0
>
>
> 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)

Reply via email to