lihaosky commented on code in PR #26583: URL: https://github.com/apache/flink/pull/26583#discussion_r2108249999
########## flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/functions/sql/ml/SqlMLPredictTableFunction.java: ########## @@ -61,9 +78,16 @@ public boolean argumentMustBeScalar(int ordinal) { @Override protected RelDataType inferRowType(SqlOperatorBinding opBinding) { - // TODO: FLINK-37780 output type based on table schema and model output schema - // model output schema to be available after integrated with SqlExplicitModelCall - return opBinding.getOperandType(1); + final RelDataTypeFactory typeFactory = opBinding.getTypeFactory(); + final RelDataType inputRowType = opBinding.getOperandType(0); + final RelDataType modelOutputRowType = opBinding.getOperandType(1); + + return typeFactory + .builder() + .kind(inputRowType.getStructKind()) + .addAll(inputRowType.getFieldList()) Review Comment: Yes. I have a test case for this: https://github.com/apache/flink/pull/26583/files#diff-f6cf1751f150530409425ff9ada80d1cf32c44d1558b20fa6cf64664525ec998R138-R154. OK. I will allow conflict names -- 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: issues-unsubscr...@flink.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org