Github user fhueske commented on a diff in the pull request:
https://github.com/apache/flink/pull/3743#discussion_r112570230
--- Diff:
flink-libraries/flink-table/src/main/scala/org/apache/flink/table/plan/nodes/datastream/DataStreamOverAggregate.scala
---
@@ -93,28 +96,43 @@ class DataStreamOverAggregate(
val orderKeys = overWindow.orderKeys.getFieldCollations
- if (orderKeys.size() != 1) {
- throw new TableException(
- "Unsupported use of OVER windows. The window can only be ordered
by a single time column.")
- }
- val orderKey = orderKeys.get(0)
+ val timeType = if (!orderKeys.isEmpty) {
+ if (orderKeys.size() != 1) {
+ throw new TableException(
+ "Unsupported use of OVER windows. The window can only be ordered
by a single time " +
+ "column.")
+ }
+ val orderKey = orderKeys.get(0)
- if (!orderKey.direction.equals(ASCENDING)) {
- throw new TableException(
- "Unsupported use of OVER windows. The window can only be ordered
in ASCENDING mode.")
+ if (!orderKey.direction.equals(ASCENDING)) {
+ throw new TableException(
+ "Unsupported use of OVER windows. The window can only be ordered
in ASCENDING mode.")
+ }
+ inputType
+ .getFieldList
+ .get(orderKey.getFieldIndex)
+ .getValue.asInstanceOf[TimeModeType]
+ } else {
--- End diff --
this could be removed if we don't use literals for the orderBy() field
---
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.
---