You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Jark Wu (Jira)" <ji...@apache.org> on 2021/06/18 07:30:00 UTC
[jira] [Closed] (FLINK-23026) OVER WINDOWS function lost data
[ https://issues.apache.org/jira/browse/FLINK-23026?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jark Wu closed FLINK-23026.
---------------------------
Resolution: Not A Problem
> OVER WINDOWS function lost data
> -------------------------------
>
> Key: FLINK-23026
> URL: https://issues.apache.org/jira/browse/FLINK-23026
> Project: Flink
> Issue Type: Bug
> Components: Table SQL / API, Table SQL / Client
> Affects Versions: 1.12.1
> Reporter: MOBIN
> Priority: Critical
> Attachments: image-2021-06-18-10-54-18-125.png
>
>
> {code:java}
> Flink SQL> CREATE TABLE tmall_item(
> > itemID VARCHAR,
> > itemType VARCHAR,
> > eventtime varchar,
> > onSellTime AS TO_TIMESTAMP(eventtime),
> > price DOUBLE,
> > WATERMARK FOR onSellTime AS onSellTime - INTERVAL '0' SECOND
> > ) with (
> > 'connector.type' = 'kafka',
> > 'connector.version' = 'universal',
> > 'connector.topic' = 'items',
> > 'format.type' = 'csv',
> > 'connector.properties.bootstrap.servers' = 'localhost:9092'
> > );
> >
> [INFO] Table has been created.
> Flink SQL> SELECT
> > itemType,
> > COUNT(itemID) OVER (
> > PARTITION BY itemType
> > ORDER BY onSellTime
> > RANGE BETWEEN INTERVAL '1' DAY preceding AND CURRENT ROW) AS cot
> > FROM tmall_item;
> {code}
> When I enter the following data into the topic, its Electronic count value is 3, which should normally be 4. If the event time and the value of the partition field are the same, data will be lost
> ITEM001,Electronic,2017-11-11 10:01:00,20
> {color:#ff0000}ITEM002{color},Electronic,{color:#ff0000}2017-11-11 10:02:00{color},50
> {color:#ff0000}ITEM002{color},Electronic,{color:#ff0000}2017-11-11 10:02:00{color},50
> ITEM003,Electronic,2017-11-11 10:03:00,50
> !image-2021-06-18-10-54-18-125.png|width=1156,height=192!
--
This message was sent by Atlassian Jira
(v8.3.4#803005)