You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Julian Hyde (Jira)" <ji...@apache.org> on 2020/11/13 05:59:00 UTC

[jira] [Resolved] (CALCITE-4394) When generating code for a function call, take the inferred operand type into account

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

Julian Hyde resolved CALCITE-4394.
----------------------------------
    Fix Version/s: 1.27.0
       Resolution: Fixed

Fixed in [e819b461|https://github.com/apache/calcite/commit/e819b4611e883c54708a75f6856300462c92b8ae].

> When generating code for a function call, take the inferred operand type into account
> -------------------------------------------------------------------------------------
>
>                 Key: CALCITE-4394
>                 URL: https://issues.apache.org/jira/browse/CALCITE-4394
>             Project: Calcite
>          Issue Type: Bug
>            Reporter: Julian Hyde
>            Assignee: Julian Hyde
>            Priority: Major
>             Fix For: 1.27.0
>
>
> When generating code for a function call, take the inferred operand type into account. If we don't do this, the Java code we generate for {{CONCAT(CAST(NULL AS ANY), 'x')}} does not compile, because the first parameter is of type Object; it needs to be String (based on the inferred operand type of VARCHAR).
> We achieve this by using {{SqlOperator.operandTypeInference}} at validate time, storing the list of inferred operand types for the call, then using that list (if available) during code generation.



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