JingsongLi commented on a change in pull request #11215:
[FLINK-16275][table-planner-blink] AggsHandlerCodeGenerator can fail …
URL: https://github.com/apache/flink/pull/11215#discussion_r384350350
##########
File path:
flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/planner/codegen/agg/AggsHandlerCodeGenerator.scala
##########
@@ -333,6 +333,10 @@ class AggsHandlerCodeGenerator(
val functionName = newName(name)
+ // make sure we can get the RuntimeContext properly
+ val openCode =
ctx.reuseOpenCode().replaceAll("\\(getRuntimeContext\\(\\)\\)",
Review comment:
I think we should avoid some codes like replace string in code generation.
It may brings some potential bugs in future.
----------------------------------------------------------------
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