[ https://issues.apache.org/jira/browse/FLINK-6426?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16007580#comment-16007580 ]
ASF GitHub Bot commented on FLINK-6426: --------------------------------------- Github user sunjincheng121 commented on a diff in the pull request: https://github.com/apache/flink/pull/3806#discussion_r116146470 --- Diff: docs/dev/table_api.md --- @@ -1099,14 +1099,14 @@ Temporal intervals can be represented as number of months (`Types.INTERVAL_MONTH The Table API is a declarative API to define queries on batch and streaming tables. Projection, selection, and union operations can be applied both on streaming and batch tables without additional semantics. Aggregations on (possibly) infinite streaming tables, however, can only be computed on finite groups of records. Window aggregates group rows into finite groups based on time or row-count intervals and evaluate aggregation functions once per group. For batch tables, windows are a convenient shortcut to group records by time intervals. -Windows are defined using the `window(w: Window)` clause and require an alias, which is specified using the `as` clause. In order to group a table by a window, the window alias must be referenced in the `groupBy(...)` clause like a regular grouping attribute. +Windows are defined using the `window(w: Window)` clause and the window must have an alias. In order to group a table by a window, the window alias must be referenced in the `groupBy(...)` clause like a regular grouping attribute. The following example shows how to define a window aggregation on a table. <div class="codetabs" markdown="1"> <div data-lang="java" markdown="1"> {% highlight java %} Table table = input - .window([Window w].as("w")) // define window with alias w + .window([WindowWithoutAlias w].as("w")) // define window with alias w --- End diff -- Yes, But the `as` method does not belong to `Window`. I think the user may has a little bit confused. > Update the document of group-window table API&SQL > ------------------------------------------------- > > Key: FLINK-6426 > URL: https://issues.apache.org/jira/browse/FLINK-6426 > Project: Flink > Issue Type: Sub-task > Components: Documentation, Table API & SQL > Affects Versions: 1.3.0 > Reporter: sunjincheng > Assignee: sunjincheng > > 1.Correct the method parameter type error in the group-window table API > document, change the document from ` .window([w: Window] as 'w)` to ` > .window([w: WindowWithoutAlias] as 'w)` > 2. For the consistency of tableAPI and SQL, change the description of SQL > document from "Group Windows" to "Windows". -- This message was sent by Atlassian JIRA (v6.3.15#6346)