Hi,

Based on the screenshot of your source data, all events have the same value
for `datatime`. Is that indeed correct?

Best regards,

Martijn

On Thu, 23 Dec 2021 at 10:16, cy <caiyi_2...@126.com> wrote:

> Hi,
>
> I execute the sql on 1.13.5 and the result is correct but no result show
> on 1.14.0 and 1.14.2.
> sql:
> SELECT window_start, window_end, COUNT(*)
> FROM TABLE(
>     TUMBLE(TABLE `origin`.`queue_3_ads_ccops_sdn_vrs_result`,
> DESCRIPTOR(datatime), INTERVAL '5' MINUTES)
> ) GROUP BY window_start, window_end;
>
> watermark definition is
> watermark for `datatime` as `datatime` - interval '5' minutes
>
> so I don't know what's wrong about it.
>
>
>
> At 2021-12-23 17:06:35, "Yun Gao" <yungao...@aliyun.com> wrote:
>
> Sorry I mean 16:00:05, but it should be similar.
>
> ------------------Original Mail ------------------
>
> *Sender:*Yun Gao <yungao...@aliyun.com>
> *Send Date:*Thu Dec 23 17:05:33 2021
> *Recipients:*cy <caiyi_2...@126.com>
> *CC:*'user@flink.apache.org' <user@flink.apache.org>
> *Subject:*Re: Re:Re: Window Aggregation and Window Join ability not work
> properly
>
>> Hi Caiyi,
>>
>> I think if the image shows all the records, after the change we should
>> only have
>> the watermark at 16:05, which is still not be able to trigger the window
>> of 5 minutes?
>>
>> Best,
>> Yun
>>
>>
>> ------------------Original Mail ------------------
>> *Sender:*cy <caiyi_2...@126.com>
>> *Send Date:*Thu Dec 23 15:44:23 2021
>> *Recipients:*Yun Gao <yungao...@aliyun.com>
>> *CC:*'user@flink.apache.org' <user@flink.apache.org>
>> *Subject:*Re:Re: Window Aggregation and Window Join ability not work
>> properly
>>
>>> I change to
>>> watermark for `datatime` as `datatime` - interval '1' second
>>> or
>>> watermark for `datatime` as `datatime`
>>> but is still not work.
>>>
>>>
>>>
>>>
>>>
>>>
>>> At 2021-12-23 15:16:20, "Yun Gao" <yungao...@aliyun.com> wrote:
>>>
>>> Hi Caiyi,
>>>
>>> The window need to be finalized with watermark[1]. I noticed that the
>>> watermark defined
>>> is `datatime` - INTERVAL '5' MINUTE,  it means the watermark emitted
>>> would be the
>>> maximum observed timestamp so far minus 5 minutes [1]. Therefore, if we
>>> want to
>>> trigger the window of 16:00 ~ 16:05, there should be one record with
>>> datetime >= 16:10
>>> get processed, then the source would emit the watermark >= 16:05 to
>>> finalize the window,
>>> otherwise there would be no output due to no window is finalized.
>>>
>>> Best,
>>> Yun
>>>
>>>
>>> [1]
>>> https://nightlies.apache.org/flink/flink-docs-release-1.14/docs/dev/table/sql/create/#watermark
>>>
>>> ------------------Original Mail ------------------
>>> *Sender:*cy <caiyi_2...@126.com>
>>> *Send Date:*Thu Dec 23 09:52:40 2021
>>> *Recipients:*'user@flink.apache.org' <user@flink.apache.org>
>>> *Subject:*Window Aggregation and Window Join ability not work properly
>>>
>>>> Hi
>>>> Flink 1.14.2Scala 2.12
>>>>
>>>> I'm using flink sql window aggregation and window join ability,  I
>>>> write the sql as documentation said but is not work. Here is my schema and
>>>> sql
>>>> schema:
>>>>
>>>> sql;
>>>> SELECT window_start, window_end, COUNT(*)
>>>> FROM TABLE(
>>>>     TUMBLE(TABLE `origin`.`queue_3_ads_ccops_sdn_vrs_result`,
>>>> DESCRIPTOR(datatime), INTERVAL '5' MINUTES))
>>>> GROUP BY window_start, window_end;
>>>>
>>>> result:
>>>>
>>>> data:
>>>>
>>>> Similar with window join ability.
>>>>
>>>> So is anything wrong with this two abilities?
>>>>
>>>> Need your help, thank you.
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>
>>>
>>>
>>>
>>
>
>
>

Reply via email to