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_r275307566
 
 

 ##########
 File path: 
flink-table/flink-table-planner/src/main/scala/org/apache/flink/table/plan/logical/groupWindows.scala
 ##########
 @@ -50,43 +48,35 @@ case class TumblingGroupWindow(
     alias,
     timeField) {
 
-  override def resolveExpressions(
-      resolve: (PlannerExpression) => PlannerExpression): LogicalWindow =
-    TumblingGroupWindow(
-      resolve(alias),
-      resolve(timeField),
-      resolve(size))
+  override def validate(isStreaming: Boolean): Unit =
 
-  override def validate(tableEnv: TableEnvironment): ValidationResult =
-    super.validate(tableEnv).orElse(
-      tableEnv match {
+      isStreaming match {
 
         // check size
         case _ if !isTimeIntervalLiteral(size) && !isRowCountLiteral(size) =>
-          ValidationFailure(
+          throw new ValidationException(
             "Tumbling window expects size literal of type Interval of 
Milliseconds " +
               "or Interval of Rows.")
 
         // check time attribute
-        case _: StreamTableEnvironment if !isTimeAttribute(timeField) =>
-          ValidationFailure(
+        case true if !isTimeAttribute(timeField) =>
 
 Review comment:
   use a regular if/else statement

----------------------------------------------------------------
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

Reply via email to