[
https://issues.apache.org/jira/browse/FLINK-12116?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Timo Walther closed FLINK-12116.
--------------------------------
Resolution: Won't Fix
Since the old planner has been removed, I will close this issue now. Please
reopen if you think that this topic has not been addressed.
> 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 / Legacy Planner
> Affects Versions: 1.6.4, 1.7.2
> Reporter: Xingcan Cui
> Priority: Minor
> Labels: auto-deprioritized-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
(v8.3.4#803005)