sunjincheng121 commented on a change in pull request #7920:
[FLINK-11844][table-api] Simplify over window API classes and improve
documentation
URL: https://github.com/apache/flink/pull/7920#discussion_r264090487
##########
File path:
flink-table/flink-table-planner/src/main/scala/org/apache/flink/table/api/scala/windows.scala
##########
@@ -85,73 +85,36 @@ object Session {
}
/**
- * Helper object for creating a over window.
+ * Helper class for creating an over window. Similar to SQL, over window
aggregates compute an
+ * aggregate for each input row over a range of its neighboring rows.
*/
object Over {
/**
- * Specifies the time attribute on which rows are grouped.
+ * Specifies the time attribute on which rows are ordered.
*
- * For streaming tables call [[orderBy 'rowtime or orderBy 'proctime]] to
specify time mode.
+ * For streaming tables, reference a rowtime or proctime time attribute here
+ * to specify the time mode.
*
* For batch tables, refer to a timestamp or long attribute.
- */
- def orderBy(orderBy: Expression): OverWindowWithOrderBy = {
- new OverWindowWithOrderBy(Seq[Expression](), orderBy)
- }
-
- /**
- * Partitions the elements on some partition keys.
*
- * @param partitionBy some partition keys.
- * @return A partitionedOver instance that only contains the orderBy method.
+ * @param orderBy field reference
+ * @return an over window with defined order
*/
- def partitionBy(partitionBy: Expression*): PartitionedOver = {
- PartitionedOver(partitionBy.toArray)
+ def orderBy(orderBy: Expression): OverWindowPartitionedOrdered = {
+ new OverWindowPartitionedOrdered(Seq[Expression](), orderBy)
Review comment:
`Seq[Expression]()` -> `Seq()` may be works well. But feel free to keep
current state.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services