pnowojski commented on a change in pull request #6614: [FLINK-9432] [table] 
Support extract timeunit: DECADE, EPOCH, ISODOW, ISOYEAR…
URL: https://github.com/apache/flink/pull/6614#discussion_r220155918
 
 

 ##########
 File path: 
flink-libraries/flink-table/src/test/scala/org/apache/flink/table/expressions/validation/ScalarFunctionsValidationTest.scala
 ##########
 @@ -108,6 +108,26 @@ class ScalarFunctionsValidationTest extends 
ScalarTypesTestBase {
     testSqlApi("EXTRACT(DOY FROM TIME '12:42:25')", "0")
   }
 
+  @Test(expected = classOf[ValidationException])
+  def testISODOWWithTimeWhichIsUnsupported(): Unit = {
 
 Review comment:
   1. please deduplicate the code in those `EXTRACT(XYZ FROM TIME t)` tests. 
Either use parametrized tests from junit4 ( 
https://stackoverflow.com/questions/4399881/parameterized-unit-tests-in-scala-with-junit4
 ), or create a for loop over units.
   2. Add expected exception message pattern like `unit .* can not be applied 
to time variable`?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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