libenchao commented on a change in pull request #13427:
URL: https://github.com/apache/flink/pull/13427#discussion_r491674078
##########
File path:
flink-table/flink-table-planner-blink/src/test/scala/org/apache/flink/table/planner/runtime/stream/sql/WindowAggregateITCase.scala
##########
@@ -347,6 +347,83 @@ class WindowAggregateITCase(mode: StateBackendMode)
assertEquals(expected.sorted, sink.getAppendResults.sorted)
}
+ @Test
+ def testEventTimeTumblingWindowWithOffset(): Unit = {
+ val stream = failingDataSource(data)
+ .assignTimestampsAndWatermarks(
+ new TimestampAndWatermarkWithOffset
+ [(Long, Int, Double, Float, BigDecimal, String, String)](10L))
+ val table = stream.toTable(tEnv,
+ 'rowtime.rowtime, 'int, 'double, 'float, 'bigdec, 'string, 'name)
+ tEnv.registerTable("T1", table)
+
+ val sql =
+ """
+ |SELECT
+ | `string`,
+ | TUMBLE_START(rowtime, INTERVAL '0.005' SECOND, TIME '00:00:00.003'),
Review comment:
The `offset` parameter type is `TIME` in Calcite by default. Then we
cannot support offsets larger than one day? E.g., we want to have a 1 week
tumble window from Monday to Sunday, then we need `TUMBLE(ts, INTERVAL 7 DAY,
INTERVAL 3 DAY)`, current implementation cannot do this.
----------------------------------------------------------------
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:
[email protected]