raminqaf commented on code in PR #28682:
URL: https://github.com/apache/flink/pull/28682#discussion_r3542304733
##########
flink-table/flink-table-planner/src/test/scala/org/apache/flink/table/planner/plan/stream/sql/CalcTest.scala:
##########
@@ -38,6 +38,54 @@ class CalcTest extends TableTestBase {
util.addTemporarySystemFunction("random_udf", new NonDeterministicUdf)
}
+ @Test
+ def test(): Unit = {
+ util.tableEnv.executeSql("""
+ |CREATE TEMPORARY TABLE kafka_raw(
+ | a VARCHAR
+ | ,b VARCHAR
+ | ,pt AS PROCTIME()
+ |)
+ |WITH (
+ | 'connector' = 'datagen'
+ |)
+ |;
+ |""".stripMargin)
+
+ println(util.verifyExplain("""
+ |select
+ | JSON_ARRAYAGG(ARRAY[b]) AS ecu_data
+ |from kafka_raw
+ |group by
+ | TUMBLE(pt, INTERVAL '1' MINUTE)
+ | ,a
+ |;
+ |""".stripMargin))
+ }
+
+ @Test
+ def test2(): Unit = {
+ util.tableEnv.executeSql("""
+ |CREATE TEMPORARY TABLE kafka_raw(
+ | a VARCHAR
+ | ,b VARCHAR
+ | ,pt AS PROCTIME()
+ |)
+ |WITH (
+ | 'connector' = 'datagen'
+ |)
+ |;
+ |""".stripMargin)
+
+ println(util.verifyExplain("""
+ |select
+ | JSON_ARRAYAGG(ARRAY[b]) AS ecu_data
+ |from kafka_raw
+ |group by a
+ |;
+ |""".stripMargin))
+ }
+
Review Comment:
Do we need these tests? If yes, then please rename them and remove the
`println`
--
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]