Github user fhueske commented on a diff in the pull request:
https://github.com/apache/flink/pull/3808#discussion_r114761137
--- Diff:
flink-libraries/flink-table/src/main/scala/org/apache/flink/table/api/BatchTableEnvironment.scala
---
@@ -194,7 +194,30 @@ abstract class BatchTableEnvironment(
protected def registerDataSetInternal[T](
name: String, dataSet: DataSet[T], fields: Array[Expression]): Unit
= {
- val (fieldNames, fieldIndexes) = getFieldInfo[T](dataSet.getType,
fields)
+ val (fieldNames, fieldIndexes) = getFieldInfo[T](
+ dataSet.getType,
+ fields,
+ ignoreTimeAttributes = true)
+
+ // validate and extract time attributes
+ val (rowtime, proctime) = validateAndExtractTimeAttributes(fieldNames,
fieldIndexes, fields)
+
+ // don't allow proctime on batch
+ proctime match {
--- End diff --
If I understood it right, `rowtime` is allowed on batch tables but not
interpreted (it is not passed on).
I would not allow `rowtime` for batch tables. I don't think there is a
reason for time indicators in batch mode.
Any Long / Timestamp attribute can be used for windows, etc.
Regarding compatibility of batch and streaming, I would argue that the
table definition is not part of the query and does not need to be unified, IMO.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---