use of com.alibaba.maxgraph.compiler.optimizer.OperatorListManager in project GraphScope by alibaba.
the class TimelyExecutor method prepare.
@Override
public void prepare(String prepareId, TimelyQuery timelyQuery, ExecuteConfig executeConfig) {
QueryFlowManager queryFlowManager = timelyQuery.getQueryFlowManager();
checkArgument(queryFlowManager.checkValidPrepareFlow(), "There's no argument for prepare statement");
try {
if (statementStore.checkExist(prepareId)) {
throw new RuntimeException("PREPARE " + prepareId + " fail for the same name statement has been exist.");
}
QueryFlowOuterClass.QueryFlow queryFlow = queryFlowManager.getQueryFlow().setQueryId(prepareId).build();
rpcConnector.prepare(queryFlow, this.isAsyncGrpc);
OperatorListManager operatorListManager = queryFlowManager.getOperatorListManager();
statementStore.save(prepareId, new PrepareStoreEntity(operatorListManager.getPrepareEntityList(), operatorListManager.getLabelManager(), queryFlowManager.getResultValueType(), queryFlow));
logger.info("PREPARE " + prepareId + " success");
} catch (Exception e) {
throw new RuntimeException(e);
}
}
Aggregations