private Viewable handleSimpleSelect(Viewable view,
ResultSetProcessor resultSetProcessor,
AgentInstanceContext agentInstanceContext)
{
Viewable finalView = view;
// Add filter view that evaluates the filter expression
if (statementSpec.getFilterRootNode() != null)
{
FilterExprView filterView = new FilterExprView(statementSpec.getFilterRootNode().getExprEvaluator(), agentInstanceContext);
finalView.addView(filterView);
finalView = filterView;
}
// for ordered deliver without output limit/buffer
if (!statementSpec.getOrderByList().isEmpty() && (statementSpec.getOutputLimitSpec() == null)) {
SingleStreamDispatchView bf = new SingleStreamDispatchView();
agentInstanceContext.getEpStatementAgentInstanceHandle().setOptionalDispatchable(bf);
finalView.addView(bf);
finalView = bf;
}
com.espertech.esper.view.View selectView = outputProcessViewFactory.makeView(resultSetProcessor, agentInstanceContext);
finalView.addView(selectView);
finalView = selectView;
return finalView;
}