Interface Selectable
- All Superinterfaces:
ConcurrencyControl<Selectable>
- All Known Subinterfaces:
FormulaColumn,SelectColumn
- All Known Implementing Classes:
AbstractFormulaColumn,ColumnName,DhFormulaColumn,FormulaColumnPython,FunctionalColumn,FunctionalColumnLong,MultiSourceFunctionalColumn,NullSelectColumn,ReinterpretedColumn,SelectColumnWithDeclaredBarriers,SelectColumnWithRespectedBarriers,SourceColumn,SwitchColumn,TableTransformationColumn
Expression.-
Method Summary
Modifier and TypeMethodDescriptiondefault Object[]The expression.static List<Selectable>static List<Selectable>from(Collection<String> values) default BooleanisSerial()The new column name, to be added to the new table.static Selectableof(ColumnName newColumn, Expression expression) static Selectabledefault Object[]default SelectablewithDeclaredBarriers(Object... declaredBarriers) Designates the filter/selectable as declaring the specified barrier object(s).default SelectablewithRespectedBarriers(Object... respectedBarriers) Specifies that the filter/selectable should respect the ordering constraints of the given barriers.default SelectableApplies serial concurrency control to the expression.
-
Method Details
-
of
-
parse
-
from
-
from
-
newColumn
ColumnName newColumn()The new column name, to be added to the new table.- Returns:
- the new column name
-
expression
Expression expression()The expression.- Returns:
- the expression
-
respectedBarriers
- Returns:
- the barriers this selectable respects
-
declaredBarriers
- Returns:
- the barriers this selectable declares
-
isSerial
- Returns:
- null if this Selectable has no opinion on whether it is serial (so the system default should be used), false if this Selectable can be reordered within a column, or true if this Selectable must be evaluated in order
-
withSerial
Description copied from interface:ConcurrencyControlApplies serial concurrency control to the expression.The serial wrapped filter/selectable is guaranteed to process exactly the set of rows as if any prior filters/selectables were applied, but it will do so in a serial manner. If this is a filter, then the expression will not evaluate additional rows or skip rows that future filters may eliminate. Take care when selecting marking filters/selectables as serial, as the operation will not be able to take advantage of powerful optimizations.
- Concurrency impact: The expression will never be invoked concurrently with itself.
- Intra-expression ordering impact: Rows are evaluated sequentially in row set order.
-
Inter-expression ordering impact: For a filter, serial acts as an absolute reordering barrier, ensuring that no parts of a filter are executed out of order relative to this serial wrapper.
For selectables, additional ordering constraints are controlled by the value of the
QueryTable.SERIAL_SELECT_IMPLICIT_BARRIERS. This is set by the propertyQueryTable.serialSelectImplicitBarriers(defaulting to the value ofQueryTable.statelessSelectByDefault).If
QueryTable.SERIAL_SELECT_IMPLICIT_BARRIERSis false, then no additional ordering between selectable expressions is imposed. As with every select or update call, if column B references column A, then the necessary inputs from column A are evaluated before column B is evaluated. To impose further ordering constraints, use barriers.If
QueryTable.SERIAL_SELECT_IMPLICIT_BARRIERSis true, then a serial selectable is an absolute barrier with respect to all other serial selectables. This prohibits serial selectables from being evaluated concurrently, permitting them to access global state. Selectables that are not serial may be reordered with respect to a serial selectable.
- Specified by:
withSerialin interfaceConcurrencyControl<Selectable>- Returns:
- a new instance of T with serial concurrency control applied.
-
withDeclaredBarriers
Description copied from interface:ConcurrencyControlDesignates the filter/selectable as declaring the specified barrier object(s).A barrier does not affect concurrency but imposes an ordering constraint for the filters or selectables that respect the same barrier. When a filter/selectable is marked as respecting a barrier object, it indicates that the respecting filter/selectable will be executed entirely after the filter/selectable declaring the barrier.
Each barrier must be unique and declared by at most one filter. Object
equalsandObject.hashCode()hashCode will be used to determine uniqueness and identification of barrier objects.- Specified by:
withDeclaredBarriersin interfaceConcurrencyControl<Selectable>- Parameters:
declaredBarriers- the unique barrier object identifiers- Returns:
- a new instance of T with the declaredBarriers applied
-
withRespectedBarriers
Description copied from interface:ConcurrencyControlSpecifies that the filter/selectable should respect the ordering constraints of the given barriers.Filters that define a barrier (using
ConcurrencyControl.withDeclaredBarriers(Object...)) will be executed entirely before filters/selectables that respect that barrier.It is an error to respect a barrier that has not already been defined per the natural left to right ordering of filters/selectables at the operation level. This is to minimize the risk of user error as the API is loosely typed.
Object
equalsandObject.hashCode()hashCode will be used to identify which barriers are respected.- Specified by:
withRespectedBarriersin interfaceConcurrencyControl<Selectable>- Parameters:
respectedBarriers- the unique barrier object identifiers to respect- Returns:
- a new instance of T with the respects barrier rule applied
-