hackergin commented on code in PR #24243:
URL: https://github.com/apache/flink/pull/24243#discussion_r1473706753
##########
flink-table/flink-table-planner/src/test/scala/org/apache/flink/table/planner/plan/stream/sql/WindowTableFunctionTest.scala:
##########
@@ -257,4 +257,48 @@ class WindowTableFunctionTest extends TableTestBase {
util.verifyRelPlan(sql)
}
+ @Test
+ def testSessionTVF(): Unit = {
+ val sql =
+ """
+ |SELECT *
+ |FROM TABLE(SESSION(TABLE MyTable, DESCRIPTOR(rowtime), INTERVAL '15'
MINUTE))
+ |""".stripMargin
+ util.verifyRelPlan(sql)
+ }
+
+ @Test
+ def testSessionTVFProctime(): Unit = {
+ val sql =
+ """
+ |SELECT *
+ |FROM TABLE(SESSION(TABLE MyTable, DESCRIPTOR(proctime), INTERVAL '15'
MINUTE))
+ |""".stripMargin
+ util.verifyRelPlan(sql)
+ }
+
+ @Test
+ def testSessionTVFWithPartitionKeys(): Unit = {
+ val sql =
+ """
+ |SELECT *
+ |FROM TABLE(SESSION(TABLE MyTable PARTITION BY (b, a),
DESCRIPTOR(rowtime), INTERVAL '15' MINUTE))
+ |""".stripMargin
+ util.verifyRelPlan(sql)
+ }
+
+ @Test
+ def testSessionTVFWithNamedParams(): Unit = {
Review Comment:
If the order of parameters is changed, it seems that verification cannot be
passed now?
```sql
SESSION(
TIMECOL => DESCRIPTOR(rowtime),
DATA => TABLE MyTable PARTITION BY (b, a),
GAP => INTERVAL '15' MINUTE))
```
Do we also need to support 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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]