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

hehuiyuan updated FLINK-21284:
------------------------------
    Description: 
Non-deterministic UDF functions is used mutiple times , the result is different.

 
{code:java}
Table tm = tableEnv.sqlQuery("select name, RAND_INTEGER(10) as sample , sex 
from myhive_staff");
tableEnv.registerTable("tmp", tm);


tableEnv.sqlUpdate("insert into sinktable select * from tmp  where sample >= 
8");


}{code}
 

RAND_INTEGER()  function is used for `RAND_INTEGER(10) as sample`  when sink,

which lead  to  inconsistent result.

 

!image-2021-02-05-10-23-02-616.png|width=759,height=433!

 

 

!image-2021-02-05-10-23-20-639.png|width=1664,height=728!

  was:
Non-deterministic UDF functions is used mutiple times , the result is different.

 
{code:java}

Table tm = tableEnv.sqlQuery("select name, RAND_INTEGER(10) as sample , sex 
from myhive_staff");
tableEnv.registerTable("tmp", tm);


tableEnv.sqlUpdate("insert into sinktable select * from tmp  where sample >= 
8");


}{code}
 

Sample udf function is used for `RAND_INTEGER(10) as sample`  when sink,

which lead  to  inconsistent result.

 

!image-2021-02-05-10-23-02-616.png|width=759,height=433!

 

 

!image-2021-02-05-10-23-20-639.png|width=1664,height=728!


> Non-deterministic  functions return different values
> ----------------------------------------------------
>
>                 Key: FLINK-21284
>                 URL: https://issues.apache.org/jira/browse/FLINK-21284
>             Project: Flink
>          Issue Type: Bug
>          Components: Table SQL / Planner
>            Reporter: hehuiyuan
>            Priority: Major
>         Attachments: image-2021-02-05-10-23-02-616.png, 
> image-2021-02-05-10-23-20-639.png
>
>
> Non-deterministic UDF functions is used mutiple times , the result is 
> different.
>  
> {code:java}
> Table tm = tableEnv.sqlQuery("select name, RAND_INTEGER(10) as sample , sex 
> from myhive_staff");
> tableEnv.registerTable("tmp", tm);
> tableEnv.sqlUpdate("insert into sinktable select * from tmp  where sample >= 
> 8");
> }{code}
>  
> RAND_INTEGER()  function is used for `RAND_INTEGER(10) as sample`  when sink,
> which lead  to  inconsistent result.
>  
> !image-2021-02-05-10-23-02-616.png|width=759,height=433!
>  
>  
> !image-2021-02-05-10-23-20-639.png|width=1664,height=728!



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

Reply via email to