Github user wuchong commented on a diff in the pull request: https://github.com/apache/flink/pull/4200#discussion_r124457542 --- Diff: flink-libraries/flink-table/src/test/scala/org/apache/flink/table/ExpressionReductionTest.scala --- @@ -422,4 +423,50 @@ class ExpressionReductionTest extends TableTestBase { util.verifyTable(result, expected) } + @Test(expected = classOf[NullPointerException]) + def testReduceDeterministicUDF(): Unit = { + val util = streamTestUtil() + val table = util.addTable[(Int, Long, String)]("MyTable", 'a, 'b, 'c) + + // if isDeterministic = true, will cause a Calcite NPE, which will be fixed in [CALCITE-1860] + val result = table + .select('a, 'b, 'c, DeterministicNullFunc() as 'd) + .where("d.isNull") + .select('a, 'b, 'c) + + val expected: String = "" --- End diff -- We should set the expected value here to make sure the test can pass once we reopen it.
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---