dawidwys commented on a change in pull request #11280: [FLINK-16377][table]
Support inline user defined functions in expression dsl
URL: https://github.com/apache/flink/pull/11280#discussion_r397735247
##########
File path:
flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/planner/expressions/PlannerExpressionConverter.scala
##########
@@ -37,16 +37,29 @@ import _root_.scala.collection.JavaConverters._
class PlannerExpressionConverter private extends
ApiExpressionVisitor[PlannerExpression] {
override def visit(call: CallExpression): PlannerExpression = {
- translateCall(call.getFunctionDefinition, call.getChildren.asScala)
+ val definition = call.getFunctionDefinition
+ translateCall(
+ definition, call.getChildren.asScala,
+ () => if (definition.getKind == FunctionKind.AGGREGATE ||
+ definition.getKind == FunctionKind.TABLE_AGGREGATE) {
Review comment:
Not sure if I get which part you don't like about the indentation. Did you
mean:
```
translateCall(
definition, call.getChildren.asScala,
() =>
if (definition.getKind == FunctionKind.AGGREGATE ||
definition.getKind == FunctionKind.TABLE_AGGREGATE) {
ApiResolvedAggregateCallExpression(call)
} else {
ApiResolvedCallExpression(call)
})
```
----------------------------------------------------------------
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