org.apache.flink.table.client.gateway.local.result.MaterializedResult Java Examples

The following examples show how to use org.apache.flink.table.client.gateway.local.result.MaterializedResult. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: LocalExecutor.java    From Flink-CEPplus with Apache License 2.0 5 votes vote down vote up
@Override
public TypedResult<Integer> snapshotResult(SessionContext session, String resultId, int pageSize) throws SqlExecutionException {
	final DynamicResult<?> result = resultStore.getResult(resultId);
	if (result == null) {
		throw new SqlExecutionException("Could not find a result with result identifier '" + resultId + "'.");
	}
	if (!result.isMaterialized()) {
		throw new SqlExecutionException("Invalid result retrieval mode.");
	}
	return ((MaterializedResult<?>) result).snapshot(pageSize);
}
 
Example #2
Source File: LocalExecutor.java    From Flink-CEPplus with Apache License 2.0 5 votes vote down vote up
@Override
public List<Row> retrieveResultPage(String resultId, int page) throws SqlExecutionException {
	final DynamicResult<?> result = resultStore.getResult(resultId);
	if (result == null) {
		throw new SqlExecutionException("Could not find a result with result identifier '" + resultId + "'.");
	}
	if (!result.isMaterialized()) {
		throw new SqlExecutionException("Invalid result retrieval mode.");
	}
	return ((MaterializedResult<?>) result).retrievePage(page);
}
 
Example #3
Source File: LocalExecutor.java    From flink with Apache License 2.0 5 votes vote down vote up
@Override
public TypedResult<Integer> snapshotResult(SessionContext session, String resultId, int pageSize) throws SqlExecutionException {
	final DynamicResult<?> result = resultStore.getResult(resultId);
	if (result == null) {
		throw new SqlExecutionException("Could not find a result with result identifier '" + resultId + "'.");
	}
	if (!result.isMaterialized()) {
		throw new SqlExecutionException("Invalid result retrieval mode.");
	}
	return ((MaterializedResult<?>) result).snapshot(pageSize);
}
 
Example #4
Source File: LocalExecutor.java    From flink with Apache License 2.0 5 votes vote down vote up
@Override
public List<Row> retrieveResultPage(String resultId, int page) throws SqlExecutionException {
	final DynamicResult<?> result = resultStore.getResult(resultId);
	if (result == null) {
		throw new SqlExecutionException("Could not find a result with result identifier '" + resultId + "'.");
	}
	if (!result.isMaterialized()) {
		throw new SqlExecutionException("Invalid result retrieval mode.");
	}
	return ((MaterializedResult<?>) result).retrievePage(page);
}
 
Example #5
Source File: LocalExecutor.java    From flink with Apache License 2.0 5 votes vote down vote up
@Override
public TypedResult<Integer> snapshotResult(String sessionId, String resultId, int pageSize) throws SqlExecutionException {
	final DynamicResult<?> result = resultStore.getResult(resultId);
	if (result == null) {
		throw new SqlExecutionException("Could not find a result with result identifier '" + resultId + "'.");
	}
	if (!result.isMaterialized()) {
		throw new SqlExecutionException("Invalid result retrieval mode.");
	}
	return ((MaterializedResult<?>) result).snapshot(pageSize);
}
 
Example #6
Source File: LocalExecutor.java    From flink with Apache License 2.0 5 votes vote down vote up
@Override
public List<Row> retrieveResultPage(String resultId, int page) throws SqlExecutionException {
	final DynamicResult<?> result = resultStore.getResult(resultId);
	if (result == null) {
		throw new SqlExecutionException("Could not find a result with result identifier '" + resultId + "'.");
	}
	if (!result.isMaterialized()) {
		throw new SqlExecutionException("Invalid result retrieval mode.");
	}
	return ((MaterializedResult<?>) result).retrievePage(page);
}