hequn8128 commented on a change in pull request #9865: [FLINK-14212][python] 
Support no-argument Python UDFs.
URL: https://github.com/apache/flink/pull/9865#discussion_r333858302
 
 

 ##########
 File path: 
flink-table/flink-table-planner-blink/src/test/scala/org/apache/flink/table/planner/plan/rules/logical/ExpressionReductionRulesTest.scala
 ##########
 @@ -46,4 +47,21 @@ class ExpressionReductionRulesTest extends TableTestBase {
     util.verifyPlan("SELECT myUdf(1) FROM MyTable")
   }
 
+  @Test
+  def testExpressionReductionWithPythonUDF(): Unit = {
+    util.addFunction("PyUdf", MockedPythonUDFWithoutArguments)
+    util.addFunction("MyUdf", Func1)
+    util.verifyPlan("SELECT PyUdf(), MyUdf(1) FROM MyTable")
+  }
+}
+
+object MockedPythonUDFWithoutArguments extends ScalarFunction {
 
 Review comment:
   Check both deterministic and non-deterministic python udfs?

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to