You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "hehuiyuan (Jira)" <ji...@apache.org> on 2022/07/04 08:22:00 UTC
[jira] [Created] (FLINK-28375) Whether to consider adding other data type to support for last_value function
hehuiyuan created FLINK-28375:
---------------------------------
Summary: Whether to consider adding other data type to support for last_value function
Key: FLINK-28375
URL: https://issues.apache.org/jira/browse/FLINK-28375
Project: Flink
Issue Type: Improvement
Components: Table SQL / API
Reporter: hehuiyuan
Attachments: image-2022-07-04-16-20-08-661.png, image-2022-07-04-16-21-28-198.png
{code:java}
CREATE TABLE jmqTableSource (
keyField INTEGER,
timestampField INTEGER,
arrayField ARRAY<String>,
proc as PROCTIME())
WITH (
'connector' = 'kafka', ....
);
insert into kafkaTableSink
select keyField, last_value(arrayField) over (partition by keyField order by proc) from kafkaTableSource; {code}
Exception in thread "main" org.apache.flink.table.api.TableException: LAST_VALUE aggregate function does not support type: ''ARRAY''.
Please re-check the data type.
I have a modification to support this, but why does the community not support it?
Is there any special reason that i do not considered?
The test the array data type can run:
mock data:
!image-2022-07-04-16-21-28-198.png!
result:
!image-2022-07-04-16-20-08-661.png|width=626,height=146!
--
This message was sent by Atlassian Jira
(v8.20.10#820010)