[
https://issues.apache.org/jira/browse/FLINK-13353?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16890028#comment-16890028
]
Jark Wu commented on FLINK-13353:
---------------------------------
The definition of {{Replace}} planner expression is the same between blink
planner and flink planner. And it seems that we don't have tests to cover
{{replace(str, begin)}} function.
Hi [~twalthr], do you have any idea about this? I find that {{replace(str,
begin)}} is introduce in your commit:
https://github.com/apache/flink/commit/939038fc2a5bfff5a1fc9347a2c21f5876910e0f.
> Wrong definition of REPLACE planner expression
> ----------------------------------------------
>
> Key: FLINK-13353
> URL: https://issues.apache.org/jira/browse/FLINK-13353
> Project: Flink
> Issue Type: Bug
> Components: Table SQL / Legacy Planner, Table SQL / Planner
> Affects Versions: 1.9.0, 1.10.0
> Reporter: Louis Xu
> Priority: Major
> Fix For: 1.10.0
>
>
> Replace definition in stringExpression.scala has another constructor with 2
> arguments.
> According to source code, the args' meaning are str, begin. And it call other
> constructor with 3 args adding the 3rd arg which is the length of str.
> But its expectTypes is (String, String, String), but actually is (String,
> int, int).
> So I think the 2 args defined constructor means search and replacement is ""
> default, not begin and length of str.
--
This message was sent by Atlassian JIRA
(v7.6.14#76016)