You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Eric Xiao (Jira)" <ji...@apache.org> on 2022/11/21 20:17:00 UTC
[jira] [Comment Edited] (FLINK-21301) Decouple window aggregate allow lateness with state ttl configuration
[ https://issues.apache.org/jira/browse/FLINK-21301?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17636864#comment-17636864 ]
Eric Xiao edited comment on FLINK-21301 at 11/21/22 8:16 PM:
-------------------------------------------------------------
Hi there, I had a read of [https://www.mail-archive.com/user@flink.apache.org/msg43316.html] and was wondering if there was any particular reason why the allow-lateness configuration is not enabled for Window TVF aggregations? As I saw that Group Window Aggregation is deprecated [1].
Would it be something hard to implement? We might have bandwidth on our team to work on it.
[1] - https://nightlies.apache.org/flink/flink-docs-master/docs/dev/table/sql/queries/window-agg/#group-window-aggregation
was (Author: JIRAUSER295489):
Hi there, I had a read of [https://www.mail-archive.com/user@flink.apache.org/msg43316.html] and was wondering if there was any particular reason why the allow-lateness configuration is not enabled for Window TVF aggregations?
> Decouple window aggregate allow lateness with state ttl configuration
> ---------------------------------------------------------------------
>
> Key: FLINK-21301
> URL: https://issues.apache.org/jira/browse/FLINK-21301
> Project: Flink
> Issue Type: Bug
> Components: Table SQL / API
> Reporter: Jing Zhang
> Assignee: Jing Zhang
> Priority: Major
> Labels: auto-unassigned, pull-request-available
> Fix For: 1.14.0
>
>
> Currently, state retention time config will also effect state clean behavior of Window Aggregate, which is unexpected for most users.
> E.g for the following example, User would set `MinIdleStateRetentionTime` to 1 Day to clean state in `deduplicate` . However, it will also effects clean behavior of window aggregate. For example, 2021-01-04 data would clean at 2021-01-06 instead of 2021-01-05.
> {code:sql}
> SELECT
> DATE_FORMAT(tumble_end(ROWTIME ,interval '1' DAY),'yyyy-MM-dd') as stat_time,
> count(1) first_phone_num
> FROM (
> SELECT
> ROWTIME,
> user_id,
> row_number() over(partition by user_id, pdate order by ROWTIME ) as rn
> FROM source_kafka_biz_shuidi_sdb_crm_call_record
> ) cal
> where rn =1
> group by tumble(ROWTIME,interval '1' DAY);{code}
> It's better to decouple window aggregate allow lateness with `MinIdleStateRetentionTime` .
--
This message was sent by Atlassian Jira
(v8.20.10#820010)