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


##########
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:
   The test you posted covers the input strategy not output. However you're 
right, it should return `TIMESTAMP(3)` (SQL_TIMESTAMP is a legacy type). I 
updated the output strategy for `ROWTIME`



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