use of org.apache.flink.table.api.internal.TableResultInternal in project flink by apache.
the class LocalExecutor method executeQuery.
@Override
public ResultDescriptor executeQuery(String sessionId, QueryOperation query) throws SqlExecutionException {
final TableResultInternal tableResult = executeOperation(sessionId, query);
final SessionContext context = getSessionContext(sessionId);
final ReadableConfig config = context.getReadableConfig();
final DynamicResult result = resultStore.createResult(config, tableResult);
checkArgument(tableResult.getJobClient().isPresent());
String jobId = tableResult.getJobClient().get().getJobID().toString();
// store the result under the JobID
resultStore.storeResult(jobId, result);
return new ResultDescriptor(jobId, tableResult.getResolvedSchema(), result.isMaterialized(), config, tableResult.getRowDataToStringConverter());
}
Aggregations