You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by shaoxuan-wang <gi...@git.apache.org> on 2017/01/09 18:46:19 UTC

[GitHub] flink pull request #3046: [FLINK-5386][Table API & SQL] refactoring Window C...

Github user shaoxuan-wang commented on a diff in the pull request:

    https://github.com/apache/flink/pull/3046#discussion_r95219196
  
    --- Diff: flink-libraries/flink-table/src/main/scala/org/apache/flink/table/api/table.scala ---
    @@ -785,13 +793,19 @@ class Table(
         * will be processed by a single operator.
         *
         * @param groupWindow group-window that specifies how elements are grouped.
    -    * @return A windowed table.
         */
    -  def window(groupWindow: GroupWindow): GroupWindowedTable = {
    +  def window(groupWindow: GroupWindow): Table = {
         if (tableEnv.isInstanceOf[BatchTableEnvironment]) {
           throw new ValidationException(s"Windows on batch tables are currently not supported.")
         }
    -    new GroupWindowedTable(this, Seq(), groupWindow)
    +    if (None == groupWindow.name) {
    +      throw new ValidationException("An alias must be specified for the window.")
    +    }
    +    if (windowPool.contains(groupWindow.name.get)) {
    +      throw new ValidationException("The window alias can not be duplicated.")
    --- End diff --
    
    s/"The window alias can not be duplicated."/"The same window alias has been defined"/


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---