godfreyhe commented on a change in pull request #9349: [FLINK-13564] 
[table-planner-blink] throw exception if constant with YEAR TO MONTH resolution 
was used for group windows
URL: https://github.com/apache/flink/pull/9349#discussion_r312316102
 
 

 ##########
 File path: 
flink-table/flink-table-planner-blink/src/test/scala/org/apache/flink/table/planner/plan/stream/sql/agg/WindowAggregateTest.scala
 ##########
 @@ -85,6 +85,18 @@ class WindowAggregateTest extends TableTestBase {
     util.verifyPlanNotExpected(sql, "TUMBLE(rowtime")
   }
 
+  @Test
+  def testWindowWrongWindowParameter(): Unit = {
+    expectedException.expect(classOf[TableException])
+    expectedException.expectMessage(
+      "Only constant window intervals with millisecond resolution are 
supported")
+
+    val sqlQuery =
+      "SELECT COUNT(*) FROM MyTable GROUP BY TUMBLE(proctime, INTERVAL '2-10' 
YEAR TO MONTH)"
 
 Review comment:
   > Add one more test `INTERVAL '35' DAYS` which should work?
   
   yes, it's valid

----------------------------------------------------------------
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]


With regards,
Apache Git Services

Reply via email to