Github user suez1224 commented on a diff in the pull request: https://github.com/apache/flink/pull/6121#discussion_r193637621 --- Diff: flink-libraries/flink-table/src/test/scala/org/apache/flink/table/expressions/validation/ScalarFunctionsValidationTest.scala --- @@ -98,16 +98,45 @@ class ScalarFunctionsValidationTest extends ScalarTypesTestBase { testSqlApi("TIMESTAMPADD(YEAR, 1.0, timestamp '2016-02-24 12:42:25')", "2016-06-16") } - @Test(expected = classOf[CodeGenException]) + @Test(expected = classOf[ValidationException]) def testDOWWithTimeWhichIsUnsupported(): Unit = { testSqlApi("EXTRACT(DOW FROM TIME '12:42:25')", "0") } - @Test(expected = classOf[CodeGenException]) + @Test(expected = classOf[ValidationException]) def testDOYWithTimeWhichIsUnsupported(): Unit = { testSqlApi("EXTRACT(DOY FROM TIME '12:42:25')", "0") } + def testExtractFromTimeZeroResult(unit: TimeUnit): Unit = { --- End diff -- Let's make this method private.
---