public final class FilterSpecCompiler extends Object
Modifier and Type | Field and Description |
---|---|
static String |
PROPERTY_NAME_BOOLEAN_EXPRESSION
Assigned for filter parameters that are based on boolean expression and not on
any particular property name.
|
Constructor and Description |
---|
FilterSpecCompiler() |
Modifier and Type | Method and Description |
---|---|
static FilterSpecCompiled |
build(List<ExprNode> validatedNodes,
EventType eventType,
String eventTypeName,
PropertyEvalSpec optionalPropertyEvalSpec,
LinkedHashMap<String,Pair<EventType,String>> taggedEventTypes,
LinkedHashMap<String,Pair<EventType,String>> arrayEventTypes,
StreamTypeService streamTypeService,
String optionalStreamName,
StatementContext stmtContext,
Collection<Integer> assignedTypeNumberStack) |
static FilterSpecCompiled |
buildNoStmtCtx(List<ExprNode> validatedFilterNodes,
EventType eventType,
String eventTypeName,
PropertyEvalSpec optionalPropertyEvalSpec,
LinkedHashMap<String,Pair<EventType,String>> taggedEventTypes,
LinkedHashMap<String,Pair<EventType,String>> arrayEventTypes,
StreamTypeService streamTypeService,
String optionalStreamName,
Collection<Integer> assignedTypeNumberStack,
ExprEvaluatorContext exprEvaluatorContext,
int statementId,
String statementName,
Annotation[] annotations,
ContextDescriptor contextDescriptor,
EngineImportService engineImportService,
EventAdapterService eventAdapterService,
FilterBooleanExpressionFactory filterBooleanExpressionFactory,
TimeProvider timeProvider,
VariableService variableService,
TableService tableService,
ConfigurationInformation configurationInformation,
NamedWindowMgmtService namedWindowMgmtService,
StatementExtensionSvcContext statementExtensionSvcContext) |
static FilterSpecCompiled |
makeFilterSpec(EventType eventType,
String eventTypeName,
List<ExprNode> filterExpessions,
PropertyEvalSpec optionalPropertyEvalSpec,
LinkedHashMap<String,Pair<EventType,String>> taggedEventTypes,
LinkedHashMap<String,Pair<EventType,String>> arrayEventTypes,
StreamTypeService streamTypeService,
String optionalStreamName,
StatementContext statementContext,
Collection<Integer> assignedTypeNumberStack)
Factory method for compiling filter expressions into a filter specification
for use with filter service.
|
static List<ExprNode> |
validateAllowSubquery(ExprNodeOrigin exprNodeOrigin,
List<ExprNode> exprNodes,
StreamTypeService streamTypeService,
StatementContext statementContext,
LinkedHashMap<String,Pair<EventType,String>> taggedEventTypes,
LinkedHashMap<String,Pair<EventType,String>> arrayEventTypes)
Validates expression nodes and returns a list of validated nodes.
|
public static final String PROPERTY_NAME_BOOLEAN_EXPRESSION
Keeping this artificial property name is a simplification as optimized filter parameters generally keep a property name.
public static FilterSpecCompiled makeFilterSpec(EventType eventType, String eventTypeName, List<ExprNode> filterExpessions, PropertyEvalSpec optionalPropertyEvalSpec, LinkedHashMap<String,Pair<EventType,String>> taggedEventTypes, LinkedHashMap<String,Pair<EventType,String>> arrayEventTypes, StreamTypeService streamTypeService, String optionalStreamName, StatementContext statementContext, Collection<Integer> assignedTypeNumberStack) throws ExprValidationException
eventType
- is the filtered-out event typeeventTypeName
- is the name of the event typefilterExpessions
- is a list of filter expressionstaggedEventTypes
- is a map of stream names (tags) and event types availablearrayEventTypes
- is a map of name tags and event type per tag for repeat-expressions that generate an array of eventsstreamTypeService
- is used to set rules for resolving propertiesoptionalStreamName
- - the stream name, if providedoptionalPropertyEvalSpec
- - specification for evaluating propertiesstatementContext
- context for statementassignedTypeNumberStack
- type numbers assignedExprValidationException
- if the expression or type validations failedpublic static FilterSpecCompiled build(List<ExprNode> validatedNodes, EventType eventType, String eventTypeName, PropertyEvalSpec optionalPropertyEvalSpec, LinkedHashMap<String,Pair<EventType,String>> taggedEventTypes, LinkedHashMap<String,Pair<EventType,String>> arrayEventTypes, StreamTypeService streamTypeService, String optionalStreamName, StatementContext stmtContext, Collection<Integer> assignedTypeNumberStack) throws ExprValidationException
ExprValidationException
public static FilterSpecCompiled buildNoStmtCtx(List<ExprNode> validatedFilterNodes, EventType eventType, String eventTypeName, PropertyEvalSpec optionalPropertyEvalSpec, LinkedHashMap<String,Pair<EventType,String>> taggedEventTypes, LinkedHashMap<String,Pair<EventType,String>> arrayEventTypes, StreamTypeService streamTypeService, String optionalStreamName, Collection<Integer> assignedTypeNumberStack, ExprEvaluatorContext exprEvaluatorContext, int statementId, String statementName, Annotation[] annotations, ContextDescriptor contextDescriptor, EngineImportService engineImportService, EventAdapterService eventAdapterService, FilterBooleanExpressionFactory filterBooleanExpressionFactory, TimeProvider timeProvider, VariableService variableService, TableService tableService, ConfigurationInformation configurationInformation, NamedWindowMgmtService namedWindowMgmtService, StatementExtensionSvcContext statementExtensionSvcContext) throws ExprValidationException
ExprValidationException
public static List<ExprNode> validateAllowSubquery(ExprNodeOrigin exprNodeOrigin, List<ExprNode> exprNodes, StreamTypeService streamTypeService, StatementContext statementContext, LinkedHashMap<String,Pair<EventType,String>> taggedEventTypes, LinkedHashMap<String,Pair<EventType,String>> arrayEventTypes) throws ExprValidationException
exprNodes
- is the nodes to validatestreamTypeService
- is provding type information for each streamtaggedEventTypes
- pattern tagged typesarrayEventTypes
- event types that provide array valuesstatementContext
- contextexprNodeOrigin
- originExprValidationException
- for validation errors