luoyuxia commented on code in PR #22166:
URL: https://github.com/apache/flink/pull/22166#discussion_r1147332415
##########
flink-table/flink-sql-gateway/src/main/java/org/apache/flink/table/gateway/service/result/ResultFetcher.java:
##########
@@ -134,9 +138,22 @@ private ResultFetcher(
}
public static ResultFetcher fromTableResult(
- OperationHandle operationHandle,
- TableResultInternal tableResult,
- boolean isQueryResult) {
+ OperationHandle operationHandle, TableResult tableResult, boolean
isQueryResult) {
+ CloseableIterator<RowData> resultRows;
+ RowDataToStringConverter rowDataToStringConverter;
+ if (tableResult instanceof TableResultInternal) {
+ TableResultInternal tableResultInternal = (TableResultInternal)
tableResult;
+ resultRows = tableResultInternal.collectInternal();
+ rowDataToStringConverter =
tableResultInternal.getRowDataToStringConverter();
+ } else {
+ // sometimes, the tableResult maybe not an instance of
TableResultInternal
+ // in the case of pluggable dialect implements method
+ // ExtendedOperationExecutor#executeOperation, and it doesn't
return TableResultInternal
Review Comment:
Previous, we have `ExtendedOperationExecutor#executeOperation` marked as
`PublicEvolving`, so the result of this method should be `TableResult` which is
also marked as `PublicEvolving`. Since this interface don't require
implementer to return `TableResultInternal`, the implementer can return
anything that implements `TableResult`.
But now, I have removed `ExtendedOperationExecutor` and reverted this change.
--
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]