StreamTypeService typeService = new StreamTypeServiceImpl(streamEventTypes, streamNames, EPStatementStartMethodHelperUtil.getHasIStreamOnly(isNamedWindow, unmaterializedViewChain), services.getEngineURI(), false);
ViewResourceDelegateUnverified viewResourceDelegateUnverified = new ViewResourceDelegateUnverified();
// Validate views that require validation, specifically streams that don't have
// sub-views such as DB SQL joins
HistoricalViewableDesc historicalViewableDesc = new HistoricalViewableDesc(numStreams);
for (int stream = 0; stream < historicalEventViewables.length; stream++)
{
HistoricalEventViewable historicalEventViewable = historicalEventViewables[stream];
if (historicalEventViewable == null) {
continue;
}
historicalEventViewable.validate(services.getEngineImportService(),
typeService,
statementContext.getMethodResolutionService(),
statementContext.getTimeProvider(),
statementContext.getVariableService(), evaluatorContextStmt,
services.getConfigSnapshot(), services.getSchedulingService(), services.getEngineURI(),
statementSpec.getSqlParameters(),
statementContext.getEventAdapterService(), statementContext.getStatementName(), statementContext.getStatementId(), statementContext.getAnnotations());
historicalViewableDesc.setHistorical(stream, historicalEventViewable.getRequiredStreams());
if (historicalEventViewable.getRequiredStreams().contains(stream))
{
throw new ExprValidationException("Parameters for historical stream " + stream + " indicate that the stream is subordinate to itself as stream parameters originate in the same stream");
}
}