}
if (command instanceof ProcedureContainer) {
if (command instanceof StoredProcedure) {
StoredProcedure proc = (StoredProcedure)command;
if (CoreConstants.SYSTEM_ADMIN_MODEL.equals(modelName)) {
TupleSource result = handleSystemProcedures(context, proc);
if (result != null) {
return result;
}
} else if (proc.getGroup().isGlobalTable()) {
return handleCachedProcedure(context, proc);
}
return null; //it's not a stored procedure we want to handle
}
GroupSymbol group = ((ProcedureContainer)command).getGroup();
if (!group.isTempGroupSymbol()) {
return null;
}
final String groupKey = group.getNonCorrelationName().toUpperCase();
final TempTable table = contextStore.getOrCreateTempTable(groupKey, command, bufferManager, false);
if (command instanceof Insert) {
Insert insert = (Insert)command;
TupleSource ts = insert.getTupleSource();
if (ts == null) {
List<Object> values = new ArrayList<Object>(insert.getValues().size());
for (Expression expr : (List<Expression>)insert.getValues()) {
values.add(Evaluator.evaluate(expr));
}