wangxlong commented on a change in pull request #9916:
[FLINK-14408][Table-Planner]UDF's open method is invoked to initialize when sql
is optimized in oldPlanner
URL: https://github.com/apache/flink/pull/9916#discussion_r338483002
##########
File path:
flink-table/flink-table-planner/src/main/scala/org/apache/flink/table/codegen/CodeGenerator.scala
##########
@@ -1642,6 +1643,10 @@ abstract class CodeGenerator(
s"""
|$fieldTerm.open(new
${classOf[FunctionContext].getCanonicalName}($contextTerm));
""".stripMargin
+ } else if (functionContextClass != null) {
+ s"""
+ |$fieldTerm.open(new
${functionContextClass.getCanonicalName}(parameters));
Review comment:
contextTerm is an instance of RuntimeContext with we can not get when
expression reducing, and parameters is an instance of Configuration.So we can't
use contextTerm here
----------------------------------------------------------------
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