You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Spongebob (Jira)" <ji...@apache.org> on 2022/01/02 10:35:00 UTC
[jira] [Created] (FLINK-25502) eval method of Flink ScalerFunction only run one time
Spongebob created FLINK-25502:
---------------------------------
Summary: eval method of Flink ScalerFunction only run one time
Key: FLINK-25502
URL: https://issues.apache.org/jira/browse/FLINK-25502
Project: Flink
Issue Type: Bug
Components: Table SQL / API
Affects Versions: 1.14.2
Reporter: Spongebob
assume that there is one scalerFunction named `id` which's eval method takes no arguments and return increasing int value on each calling. Now I found that when I call `id()` function in FlinkSQL that has 3 rows , the eval method only was called one time so I got the same id value for each row. The sql likes 'SELECT f0, id() FROM T'.
So I decided to define one argument on `eval` method. When I execute sql 'SELECT f0, id(1) FROM T' I got the same id value still. But when I execute sql 'SELECT f0, id(f0) FROM T' then I could get the correct id value, because the eval method was called by three times now.
--
This message was sent by Atlassian Jira
(v8.20.1#820001)