flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [flink] twalthr commented on a change in pull request #8062: [FLINK-11884][table] Implement expression resolution on top of new Expressions
Date Tue, 23 Apr 2019 13:18:59 GMT
twalthr commented on a change in pull request #8062:  [FLINK-11884][table] Implement expression
resolution on top of new Expressions
URL: https://github.com/apache/flink/pull/8062#discussion_r277669420
 
 

 ##########
 File path: flink-table/flink-table-planner/src/main/scala/org/apache/flink/table/plan/logical/groupWindows.scala
 ##########
 @@ -39,164 +34,39 @@ case class LogicalOverWindow(
     following: Optional[Expression])
 
 // ------------------------------------------------------------------------------------------------
-// Tumbling group windows
+// Group windows
 // ------------------------------------------------------------------------------------------------
 
+sealed trait LogicalWindow {
+  def timeAttribute: PlannerExpression
+  def aliasAttribute: PlannerExpression
+}
+
 case class TumblingGroupWindow(
-    alias: PlannerExpression,
-    timeField: PlannerExpression,
+    aliasAttribute: PlannerExpression,
+    timeAttribute: PlannerExpression,
     size: PlannerExpression)
-  extends LogicalWindow(
-    alias,
-    timeField) {
-
-  override def resolveExpressions(
-      resolve: (PlannerExpression) => PlannerExpression): LogicalWindow =
-    TumblingGroupWindow(
-      resolve(alias),
-      resolve(timeField),
-      resolve(size))
-
-  override def validate(tableEnv: TableEnvironment): ValidationResult =
-    super.validate(tableEnv).orElse(
-      tableEnv match {
-
-        // check size
-        case _ if !isTimeIntervalLiteral(size) && !isRowCountLiteral(size) =>
-          ValidationFailure(
-            "Tumbling window expects size literal of type Interval of Milliseconds " +
 
 Review comment:
   where can I find this check for all types of windows?

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message