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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to