[jira] [Commented] (FLINK-24002) Support count window with the window TVF
[ https://issues.apache.org/jira/browse/FLINK-24002?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17447749#comment-17447749 ] Jark Wu commented on FLINK-24002: - Thanks [~jingzhang] for hte summary. Your proposed syntax looks good to me. Regarding to your questions: 1. I think it's find to not emit for windows not have enough size. But please make sure the semantic is the same for both batch and streaming. 2. Agree. 3. It depends on the implementation of the count window. For example, the count window of DataStream and Table SQL have different implementation and of course have different state cleanup strategy. > Support count window with the window TVF > > > Key: FLINK-24002 > URL: https://issues.apache.org/jira/browse/FLINK-24002 > Project: Flink > Issue Type: Sub-task > Components: Table SQL / Planner >Reporter: Jing Zhang >Priority: Minor > > For a long time, count window is supported in Table API, but not supported in > SQL. > With the new window TVF syntax, we can also introduce a new window function > for count window. > For example, the following TUMBLE_ROW assigns windows in 10 row-count > interval. > |{{SELECT}} {{*}} > {{FROM}} {{{}TABLE{}}}{{{}({}}} > {{ }}{{TUMBLE_ROW(}} > {{ }}{{data => }}{{TABLE}} {{inputTable PARTITION BY order_id,}} > {{ }}{{size}} {{=> 10));}}| > -- This message was sent by Atlassian Jira (v8.20.1#820001)
[jira] [Commented] (FLINK-24002) Support count window with the window TVF
[ https://issues.apache.org/jira/browse/FLINK-24002?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17447330#comment-17447330 ] Martijn Visser commented on FLINK-24002: If this has a dependency on Calcite, we should pause any work on it until Calcite has addressed it. Only after we've updated Flink to use that Calcite release, then we should continue on this feature. Thanks for clarifying [~qingru zhang] > Support count window with the window TVF > > > Key: FLINK-24002 > URL: https://issues.apache.org/jira/browse/FLINK-24002 > Project: Flink > Issue Type: Sub-task > Components: Table SQL / Planner >Reporter: Jing Zhang >Assignee: Yuepeng Pan >Priority: Minor > > For a long time, count window is supported in Table API, but not supported in > SQL. > With the new window TVF syntax, we can also introduce a new window function > for count window. > For example, the following TUMBLE_ROW assigns windows in 10 row-count > interval. > |{{SELECT}} {{*}} > {{FROM}} {{{}TABLE{}}}{{{}({}}} > {{ }}{{TUMBLE_ROW(}} > {{ }}{{data => }}{{TABLE}} {{inputTable PARTITION BY order_id,}} > {{ }}{{size}} {{=> 10));}}| > -- This message was sent by Atlassian Jira (v8.20.1#820001)
[jira] [Commented] (FLINK-24002) Support count window with the window TVF
[ https://issues.apache.org/jira/browse/FLINK-24002?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17447296#comment-17447296 ] Jing Zhang commented on FLINK-24002: [~RocMarshal] Thanks very much for take this issue. Just a reminder, this issue, just like session window (FLINK-24024) has a dependency on CALCITE-4864 We need to update the PTF syntax in Calcite first, then start to work on FLINK-24024 and FLINK-24002. For a tumble count window, we should specify the partition keys in Window Table Function, like |{{SELECT}} {{*}} {{FROM}} {{{}TABLE{}}}{{{}({}}} {{ }}{{TUMBLE_ROW(}} {{ }}{{data => }}{{TABLE}} {{inputTable PARTITION BY orderId,}} {{ }}{{size}} {{=> 10));}}| Go back to this issue, there are some other detail which need further discussion, such as, # Should we trigger the window which records number does not achieve specify threshold value when job is finished? # time attribute may be not necessary for count window? # When to clean the state of count window operator? Maybe it's better to have a short design document before start this issue? What do you think? [~twalthr] [~jark] > Support count window with the window TVF > > > Key: FLINK-24002 > URL: https://issues.apache.org/jira/browse/FLINK-24002 > Project: Flink > Issue Type: Sub-task > Components: Table SQL / Planner >Reporter: Jing Zhang >Assignee: Yuepeng Pan >Priority: Minor > > For a long time, count window is supported in Table API, but not supported in > SQL. > With the new window TVF syntax, we can also introduce a new window function > for count window. > For example, the following TUMBLE_ROW assigns windows in 10 row-count > interval. > {panel} > {panel} > |{{SELECT}} {{*}} > {{FROM}} {{TABLE}}{{(}} > {{ }}{{TUMBLE_ROW(}} > {{ }}{{data => }}{{TABLE}} {{inputTable,}} > {{ }}{{timecol => DESCRIPTOR(timecol),}} > {{ }}{{size}} {{=> 10));}}| > -- This message was sent by Atlassian Jira (v8.20.1#820001)
[jira] [Commented] (FLINK-24002) Support count window with the window TVF
[ https://issues.apache.org/jira/browse/FLINK-24002?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17447258#comment-17447258 ] Martijn Visser commented on FLINK-24002: [~RocMarshal] I've assigned it to you CC [~qingru zhang] > Support count window with the window TVF > > > Key: FLINK-24002 > URL: https://issues.apache.org/jira/browse/FLINK-24002 > Project: Flink > Issue Type: Sub-task > Components: Table SQL / Planner >Reporter: Jing Zhang >Assignee: Yuepeng Pan >Priority: Minor > > For a long time, count window is supported in Table API, but not supported in > SQL. > With the new window TVF syntax, we can also introduce a new window function > for count window. > For example, the following TUMBLE_ROW assigns windows in 10 row-count > interval. > {panel} > {panel} > |{{SELECT}} {{*}} > {{FROM}} {{TABLE}}{{(}} > {{ }}{{TUMBLE_ROW(}} > {{ }}{{data => }}{{TABLE}} {{inputTable,}} > {{ }}{{timecol => DESCRIPTOR(timecol),}} > {{ }}{{size}} {{=> 10));}}| > -- This message was sent by Atlassian Jira (v8.20.1#820001)
[jira] [Commented] (FLINK-24002) Support count window with the window TVF
[ https://issues.apache.org/jira/browse/FLINK-24002?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17440889#comment-17440889 ] Yuepeng Pan commented on FLINK-24002: - Hi, [~qingru zhang] [~twalthr] . Could you please assign this ticket to me ? Thx. > Support count window with the window TVF > > > Key: FLINK-24002 > URL: https://issues.apache.org/jira/browse/FLINK-24002 > Project: Flink > Issue Type: Sub-task > Components: Table SQL / Planner >Reporter: JING ZHANG >Priority: Minor > > For a long time, count window is supported in Table API, but not supported in > SQL. > With the new window TVF syntax, we can also introduce a new window function > for count window. > For example, the following TUMBLE_ROW assigns windows in 10 row-count > interval. > {panel} > {panel} > |{{SELECT}} {{*}} > {{FROM}} {{TABLE}}{{(}} > {{ }}{{TUMBLE_ROW(}} > {{ }}{{data => }}{{TABLE}} {{inputTable,}} > {{ }}{{timecol => DESCRIPTOR(timecol),}} > {{ }}{{size}} {{=> 10));}}| > -- This message was sent by Atlassian Jira (v8.20.1#820001)