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 Mon, 15 Apr 2019 11:11:34 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_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:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message