You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "vinoyang (JIRA)" <ji...@apache.org> on 2019/06/25 02:09:00 UTC

[jira] [Assigned] (FLINK-12116) Args autocast will cause exception for plan transformation in TableAPI

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

vinoyang reassigned FLINK-12116:
--------------------------------

    Assignee:     (was: vinoyang)

> Args autocast will cause exception for plan transformation in TableAPI
> ----------------------------------------------------------------------
>
>                 Key: FLINK-12116
>                 URL: https://issues.apache.org/jira/browse/FLINK-12116
>             Project: Flink
>          Issue Type: Bug
>          Components: Table SQL / Planner
>    Affects Versions: 1.6.4, 1.7.2
>            Reporter: Xingcan Cui
>            Priority: Major
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> In tableAPI, the automatic typecast for arguments may break their initial structures, which makes {{TreeNode.makeCopy()}} fail.
> Take the {{ConcatWs}} function as an example. It requires a string {{Expression}} sequence for the second parameter of its constructor. If we provide some {{Expressions}} with other types, the planner will try to cast them automatically. However, during this process, the arguments will be incorrectly unwrapped (e.g., {{[f1, f2]}} will be unwrapped to two expressions {{f1.cast(String)}} and {{f2.cast(String)}}) which will cause {{java.lang.IllegalArgumentException: wrong number of arguments}} for {{Constructor.newInstance()}}.
> As a workaround, we can cast these arguments manually.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)