Interface SelectColumn
- All Superinterfaces:
Selectable
- All Known Subinterfaces:
FormulaColumn
- All Known Implementing Classes:
AbstractFormulaColumn,DhFormulaColumn,FormulaColumnPython,FunctionalColumn,MultiSourceFunctionalColumn,NullSelectColumn,ReinterpretedColumn,SourceColumn,SwitchColumn,TableTransformationColumn
The interface for a query table to perform retrieve values from a column for select like operations.
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final SelectColumn[]Convenient static final instance of a zero length Array of SelectColumns for use in toArray calls. -
Method Summary
Modifier and TypeMethodDescriptioncopy()Create a copy of this SelectColumn.static SelectColumn[]copyFrom(SelectColumn[] selectColumns) static Collection<SelectColumn>copyFrom(Collection<SelectColumn> selectColumns) default ExpressionThe expression.static SelectColumn[]from(Selectable... selectables) static SelectColumn[]from(Collection<? extends Selectable> selectables) Get a list of the names of column arrays used in this SelectColumn.Get a list of the names of columns used in this SelectColumn.@NotNull ColumnSource<?>Get aColumnSourcethat can be used to access the data on demand.@NotNull ColumnSource<?>Returns a lazily computed view of this column.Get a MatchPair for this column, if applicable.getName()Get the name of the resultant column.Class<?>Get the data type stored in the resultant column.initDef(Map<String, ColumnDefinition<?>> columnDefinitionMap) Initialize any internal column definitions from the provided initial.initInputs(TrackingRowSet rowSet, Map<String, ? extends ColumnSource<?>> columnsOfInterest) Initialize the column from the provided set of underlying columns and row set.booleanisRetain()booleanReturns true if this column is stateless (i.e.default ColumnNameThe new column name, to be added to the new table.newDestInstance(long size) Create a newWritableColumnSource.newFlatDestInstance(long size) Create a newimmutableWritableColumnSource.static SelectColumnof(Selectable selectable) default voidvalidateSafeForRefresh(BaseTable<?> sourceTable) Validate that thisSelectColumnis safe to use in the context of the provided sourceTable.
-
Field Details
-
ZERO_LENGTH_SELECT_COLUMN_ARRAY
Convenient static final instance of a zero length Array of SelectColumns for use in toArray calls.
-
-
Method Details
-
of
-
from
-
from
-
copyFrom
-
copyFrom
-
initInputs
List<String> initInputs(TrackingRowSet rowSet, Map<String, ? extends ColumnSource<?>> columnsOfInterest) Initialize the column from the provided set of underlying columns and row set.- Parameters:
rowSet- the base row setcolumnsOfInterest- the input columns- Returns:
- a list of columns on which the result of this is dependent
-
initDef
Initialize any internal column definitions from the provided initial.- Parameters:
columnDefinitionMap- the starting set of column definitions; valid for this call only- Returns:
- a list of columns on which the result of this is dependent
- ApiNote:
- Any
QueryLibrary,QueryScope, orQueryCompilerusage needs to be resolved within initDef. Implementations must be idempotent. Implementations that want to hold on to thecolumnDefinitionMapmust make a defensive copy.
-
getReturnedType
Class<?> getReturnedType()Get the data type stored in the resultant column.- Returns:
- the type
-
getColumns
Get a list of the names of columns used in this SelectColumn. Behavior is undefined if none of the init* methods have been called yet.- Returns:
- the columns used in this SelectColumn
-
getColumnArrays
Get a list of the names of column arrays used in this SelectColumn. Behavior is undefined if none of the init* methods have been called yet.- Returns:
- the list of column arrays used
-
getDataView
Get aColumnSourcethat can be used to access the data on demand.- Returns:
- a
ColumnSource
-
getLazyView
Returns a lazily computed view of this column.- Returns:
- a lazily computed column source
-
getName
String getName()Get the name of the resultant column.- Returns:
- the name of the column
-
getMatchPair
MatchPair getMatchPair()Get a MatchPair for this column, if applicable.- Returns:
-
newDestInstance
Create a newWritableColumnSource. The returned column source must be capable of handling updates.- Parameters:
size- A hint as to the number of rows that will be used- Returns:
- a new
WritableColumnSource
-
newFlatDestInstance
Create a newimmutableWritableColumnSource. The returned column source should be flat, and need not handle updates.- Parameters:
size- A hint as to the number of rows that will be used- Returns:
- a new
WritableColumnSource
-
isRetain
boolean isRetain()- Returns:
-
validateSafeForRefresh
Validate that thisSelectColumnis safe to use in the context of the provided sourceTable.- Parameters:
sourceTable- the source table
-
isStateless
boolean isStateless()Returns true if this column is stateless (i.e. one row does not depend on the order of evaluation for another row). -
copy
SelectColumn copy()Create a copy of this SelectColumn.- Returns:
- an independent copy of this SelectColumn.
-
newColumn
Description copied from interface:SelectableThe new column name, to be added to the new table.- Specified by:
newColumnin interfaceSelectable- Returns:
- the new column name
-
expression
Description copied from interface:SelectableThe expression.- Specified by:
expressionin interfaceSelectable- Returns:
- the expression
-