EPL now supports
optional types. An
optional is a value that may be a value of some other specified EPL type, or empty and thus have no value. This is useful for mapping to
null values in other languages such as Java, or for results or fields which may be missing a value. See
optional for more information.
optional values can be extracted using the new
ifpresent statement. This statement is used to check if one or more values are empty. It unpacks the values into new local variables and conditionally executes a block of code. See
Defining conditional logic with the ifpresent statement and The ifpresent statement for more information.
The connectivity plug-ins can now handle values of
optional type. This means that an empty
data_t or a
null value in Java will translate to/from an empty optional. See also
Map contents used by the apama.eventMap host plug-in.
The Apama event parser libraries for Java and .NET have been improved to support events with optional fields. A new class OptionalFieldType (accessible via FieldTypes.Optional) has been added to represent the optional field type. For complete information about this class, refer to the description of