dawidwys commented on code in PR #23634:
URL: https://github.com/apache/flink/pull/23634#discussion_r1388261066


##########
flink-table/flink-table-planner/src/main/scala/org/apache/flink/table/planner/expressions/fieldExpression.scala:
##########
@@ -103,71 +103,6 @@ case class TableReference(name: String, tableOperation: 
QueryOperation)
   override def toString: String = s"$name"
 }
 
-abstract class TimeAttribute(val expression: PlannerExpression)
-  extends UnaryExpression
-  with WindowProperty {
-
-  override private[flink] def child: PlannerExpression = expression
-}
-
-case class RowtimeAttribute(expr: PlannerExpression) extends 
TimeAttribute(expr) {
-
-  override private[flink] def validateInput(): ValidationResult = {
-    child match {
-      case WindowReference(_, Some(tpe: TypeInformation[_])) if 
isProctimeIndicatorType(tpe) =>
-        ValidationFailure("A proctime window cannot provide a rowtime 
attribute.")
-      case WindowReference(_, Some(tpe: TypeInformation[_])) if 
isRowtimeIndicatorType(tpe) =>
-        // rowtime window
-        ValidationSuccess
-      case WindowReference(_, Some(tpe)) if tpe == Types.LONG || tpe == 
Types.SQL_TIMESTAMP =>
-        // batch time window
-        ValidationSuccess
-      case WindowReference(_, _) =>
-        ValidationFailure("Reference to a rowtime or proctime window 
required.")
-      case any =>
-        ValidationFailure(
-          s"The '.rowtime' expression can only be used for table definitions 
and windows, " +
-            s"while [$any] was found.")
-    }
-  }
-
-  override def resultType: TypeInformation[_] = {
-    child match {
-      case WindowReference(_, Some(tpe: TypeInformation[_])) if 
isRowtimeIndicatorType(tpe) =>
-        // rowtime window
-        TimeIndicatorTypeInfo.ROWTIME_INDICATOR
-      case WindowReference(_, Some(tpe)) if tpe == Types.LONG || tpe == 
Types.SQL_TIMESTAMP =>
-        // batch time window
-        Types.SQL_TIMESTAMP

Review Comment:
   Actually we do need to update it for `PROCTIME`, because we always need to 
return `PROCTIME time indicator`.
   
   I thought having `timestampKind == TimestampKind.PROCTIME && 
!LogicalTypeChecks.isTimeAttribute(type)` for input is enough, but it passes 
also for `ROWTIME time indicator`.
   
   I'll update the output type strategy for `PROCTIME`



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

To unsubscribe, e-mail: issues-unsubscr...@flink.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to