snuyanzin commented on code in PR #28323:
URL: https://github.com/apache/flink/pull/28323#discussion_r3362306397
##########
flink-table/flink-table-planner/src/test/java/org/apache/flink/table/planner/plan/stream/sql/ProcessTableFunctionTest.java:
##########
@@ -126,11 +133,27 @@ void testUnknownScalarArg() {
@Test
void testTypedRowSemanticTableIgnoringColumnNames() {
util.addTemporarySystemFunction("f",
TypedRowSemanticTableFunction.class);
- // function expects <STRING name, INT score>
- // but table is <STRING name, INT different>
+ // Function expects <STRING s, INT i> but table is <STRING name, INT
different>
util.verifyRelPlan("SELECT * FROM f(u => TABLE t_name_diff, i => 1)");
}
+ @Test
+ void testTypedSetSemanticTableForwardingOriginalColumnName() {
+ util.addTemporarySystemFunction("f",
TypedSetSemanticTableFunction.class);
+ // Function expects <STRING s, INT i> but table is <STRING name, INT
different>.
+ // The partition key is a valid pass-through column and its name
should be preserved.
+ util.verifyRelPlan("SELECT * FROM f(u => TABLE t_name_diff PARTITION
BY name, i => 1)");
Review Comment:
may be not for this PR, however probably we need to add more tests for
functions with non first `TABLE` args since they are parsed differently as was
noticed within https://issues.apache.org/jira/browse/CALCITE-7575
--
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]