sql 动态修改参数问题

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

sql 动态修改参数问题

酷酷的浑蛋
StatementSet statementSet = tableEnvironment.createStatementSet();
String sql1 = "insert into test select a,b,c from test_a_12342 /*+ OPTIONS('table-name'='test_a_1')*/";
String sql2 = "insert into test select a,b,c from test_a_12342 /*+ OPTIONS('table-name'='test_a_2')*/";
statementSet.addInsertSql(sql1);
statementSet.addInsertSql(sql2);
statementSet.execute();


Sql代码如上,在最终insert后是将test_a_1表的数据插入了两遍,而test_a_2的数据并没有插入,请问这个是bug吗
Reply | Threaded
Open this post in threaded view
|

Re: sql 动态修改参数问题

Jark
Administrator
看起来是个分段优化复用节点的bug,可以去 JIRA 开个 issue。

Best,
Jark

On Thu, 4 Mar 2021 at 19:37, 酷酷的浑蛋 <[hidden email]> wrote:

> StatementSet statementSet = tableEnvironment.createStatementSet();
> String sql1 = "insert into test select a,b,c from test_a_12342 /*+
> OPTIONS('table-name'='test_a_1')*/";
> String sql2 = "insert into test select a,b,c from test_a_12342 /*+
> OPTIONS('table-name'='test_a_2')*/";
> statementSet.addInsertSql(sql1);
> statementSet.addInsertSql(sql2);
> statementSet.execute();
>
>
> Sql代码如上,在最终insert后是将test_a_1表的数据插入了两遍,而test_a_2的数据并没有插入,请问这个是bug吗
Reply | Threaded
Open this post in threaded view
|

Re:Re: sql 动态修改参数问题

Michael Ran



我没重现这个BUG,是1.12 的版本吗?



在 2021-03-04 23:12:11,"Jark Wu" <[hidden email]> 写道:

>看起来是个分段优化复用节点的bug,可以去 JIRA 开个 issue。
>
>Best,
>Jark
>
>On Thu, 4 Mar 2021 at 19:37, 酷酷的浑蛋 <[hidden email]> wrote:
>
>> StatementSet statementSet = tableEnvironment.createStatementSet();
>> String sql1 = "insert into test select a,b,c from test_a_12342 /*+
>> OPTIONS('table-name'='test_a_1')*/";
>> String sql2 = "insert into test select a,b,c from test_a_12342 /*+
>> OPTIONS('table-name'='test_a_2')*/";
>> statementSet.addInsertSql(sql1);
>> statementSet.addInsertSql(sql2);
>> statementSet.execute();
>>
>>
>> Sql代码如上,在最终insert后是将test_a_1表的数据插入了两遍,而test_a_2的数据并没有插入,请问这个是bug吗