You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "hackergin (via GitHub)" <gi...@apache.org> on 2023/09/21 18:33:17 UTC
[GitHub] [flink] hackergin commented on a diff in pull request #23438: [FLINK-33119][table] The pojo result returned be procedure should be Row of fields in the pojo instead of whole pojo object
hackergin commented on code in PR #23438:
URL: https://github.com/apache/flink/pull/23438#discussion_r1333458365
##########
flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/operations/PlannerCallProcedureOperation.java:
##########
@@ -277,15 +297,20 @@ static final class CallProcedureResultProvider implements ResultProvider {
private final DataStructureConverter<Object, Object> converter;
private final RowDataToStringConverter toStringConverter;
+
+ // a converter to convert internal RowData to Row
+ private final @Nullable RowRowConverter rowConverter;
private final Object[] result;
public CallProcedureResultProvider(
DataStructureConverter<Object, Object> converter,
RowDataToStringConverter toStringConverter,
+ RowRowConverter rowConverter,
Review Comment:
```suggestion
@Nullable RowRowConverter rowConverter,
```
##########
flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/operations/PlannerCallProcedureOperation.java:
##########
@@ -237,6 +249,14 @@ private TableResultInternal procedureResultToTableResult(
tableResultType = DataTypes.ROW(DataTypes.FIELD("result", tableResultType));
}
+ RowRowConverter rowConverter = null;
+ // if the output is struct type,
+ // we need a row converter to convert the struct value to Row
Review Comment:
The comments here are a bit confusing. Does RowRowConverter convert RowData and Row, not Struct value?
--
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-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org