lihaosky commented on code in PR #27108:
URL: https://github.com/apache/flink/pull/27108#discussion_r2497157033
##########
flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/expressions/converter/ExpressionConverter.java:
##########
@@ -235,27 +255,96 @@ public RexNode visit(TypeLiteralExpression typeLiteral) {
}
@Override
- public RexNode visit(Expression other) {
+ public RexNode visit(TableReferenceExpression tableRef) {
+ final LogicalType tableArgType =
tableRef.getOutputDataType().getLogicalType();
+ final RelDataType rowType = typeFactory.buildRelNodeRowType((RowType)
tableArgType);
+ final int[] partitionKeys;
+ if (tableRef.getQueryOperation() instanceof PartitionQueryOperation) {
+ final PartitionQueryOperation partitionOperation =
+ (PartitionQueryOperation) tableRef.getQueryOperation();
+ partitionKeys = partitionOperation.getPartitionKeys();
+ } else {
+ partitionKeys = new int[0];
+ }
+ final RexTableArgCall tableArgCall =
+ new RexTableArgCall(rowType, inputStack.size(), partitionKeys,
new int[0]);
+ inputStack.add(relBuilder.build());
Review Comment:
Created https://issues.apache.org/jira/browse/FLINK-38638
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]