twalthr 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_r397271315
##########
File path:
flink-table/flink-table-planner-blink/src/main/java/org/apache/flink/table/planner/expressions/converter/ExpressionConverter.java
##########
@@ -71,18 +72,26 @@
public class ExpressionConverter implements ExpressionVisitor<RexNode> {
private static final List<CallExpressionConvertRule>
FUNCTION_CONVERT_CHAIN = Arrays.asList(
- new ScalarFunctionConvertRule(),
+ new LegacyScalarFunctionConvertRule(),
+ new UserDefinedFunctionConvertRule(),
new OverConvertRule(),
new DirectConvertRule(),
new CustomizedConvertRule()
);
private final RelBuilder relBuilder;
private final FlinkTypeFactory typeFactory;
+ private final DataTypeFactory dataTypeFactory;
public ExpressionConverter(RelBuilder relBuilder) {
this.relBuilder = relBuilder;
this.typeFactory = (FlinkTypeFactory)
relBuilder.getRexBuilder().getTypeFactory();
+ this.dataTypeFactory = relBuilder.getCluster()
Review comment:
Use `org.apache.flink.table.planner.utils.ShortcutUtils` for readability.
----------------------------------------------------------------
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