[
https://issues.apache.org/jira/browse/FLINK-5386?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15779639#comment-15779639
]
ASF GitHub Bot commented on FLINK-5386:
---------------------------------------
GitHub user sunjincheng121 opened a pull request:
https://github.com/apache/flink/pull/3046
[FLINK-5386][Table API & SQL] refactoring Window Clause
Thanks for contributing to Apache Flink. Before you open your pull request,
please take the following check list into consideration.
If your changes take all of the items into account, feel free to open your
pull request. For more information and/or questions please refer to the [How To
Contribute guide](http://flink.apache.org/how-to-contribute.html).
In addition to going through the list, please provide a meaningful
description of your changes.
- [×] General
- The pull request references the related JIRA issue ("[FLINK-5386][Table
API & SQL] refactoring Window Clause")
- The pull request addresses only one issue
- Each commit in the PR has a meaningful commit message (including the
JIRA id)
- [ ] Documentation
- Documentation has been added for new functionality
- Old documentation affected by the pull request has been updated
- JavaDoc for public methods has been added
- [×] Tests & Build
- Functionality added by the pull request is covered by tests
- `mvn clean verify` has been executed successfully locally or a Travis
build has passed
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/sunjincheng121/flink FLINK-5386-PR
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/flink/pull/3046.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #3046
----
commit 5f5b8789b6c833d73ed189f606f0e81095205990
Author: Jincheng Sun <[email protected]>
Date: 2016-12-15T02:31:33Z
up
commit decb18ad2a6b83a78bc9d4ef4acacfc9c877d866
Author: Jincheng Sun <[email protected]>
Date: 2016-12-15T02:31:33Z
up
commit 538af431d054fe9da4ee30f1c6b7e46c5c20181a
Author: Jincheng Sun <[email protected]>
Date: 2016-12-23T03:20:00Z
Merge branch 'master' of https://github.com/sunjincheng121/flink
commit c0e0c4245cf6c5d842a91b91e40929912346c755
Author: Jincheng Sun <[email protected]>
Date: 2016-12-23T06:11:42Z
[FLINK-5386][Table API & SQL] refactoring Window Clause
----
> Refactoring Window Clause
> -------------------------
>
> Key: FLINK-5386
> URL: https://issues.apache.org/jira/browse/FLINK-5386
> Project: Flink
> Issue Type: Sub-task
> Components: Table API & SQL
> Reporter: sunjincheng
> Assignee: sunjincheng
>
> Similar to the SQL, window clause is defined "as" a symbol which is
> explicitly used in groupby/over. We are proposing to refactor the way to
> write groupby+window tableAPI as follows:
> val windowedTable = table
> .window(Slide over 10.milli every 5.milli as 'w1)
> .window(Tumble over 5.milli as 'w2)
> .groupBy('w1, 'key)
> .select('string, 'int.count as 'count, 'w1.start)
> .groupBy( 'w2, 'key)
> .select('string, 'count.sum as sum2)
> .window(Tumble over 5.milli as 'w3)
> .groupBy( 'w3) // windowAll
> .select('sum2, 'w3.start, 'w3.end)
> In this way, we can remove both GroupWindowedTable and the window() method in
> GroupedTable which makes the API a bit clean. In addition, for row-window, we
> anyway need to define window clause as a symbol. This change will make the
> API of window and row-window consistent, example for row-window:
> .window(RowXXXWindow as ‘x, RowYYYWindow as ‘y)
> .select(‘a, ‘b.count over ‘x as ‘xcnt, ‘c.count over ‘y as ‘ycnt, ‘x.start,
> ‘x.end)
> What do you think? [~fhueske] [~twalthr]
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)