Interface SelectColumn

All Superinterfaces:
Selectable
All Known Subinterfaces:
FormulaColumn
All Known Implementing Classes:
AbstractFormulaColumn, DhFormulaColumn, FormulaColumnPython, FunctionalColumn, MultiSourceFunctionalColumn, NullSelectColumn, ReinterpretedColumn, SourceColumn, SwitchColumn, TableTransformationColumn

public interface SelectColumn extends Selectable
The interface for a query table to perform retrieve values from a column for select like operations.
  • Field Details

    • ZERO_LENGTH_SELECT_COLUMN_ARRAY

      static final SelectColumn[] ZERO_LENGTH_SELECT_COLUMN_ARRAY
      Convenient static final instance of a zero length Array of SelectColumns for use in toArray calls.
  • Method Details

    • of

      static SelectColumn of(Selectable selectable)
    • from

      static SelectColumn[] from(Selectable... selectables)
    • from

      static SelectColumn[] from(Collection<? extends Selectable> selectables)
    • copyFrom

      static SelectColumn[] copyFrom(SelectColumn[] selectColumns)
    • copyFrom

      static Collection<SelectColumn> copyFrom(Collection<SelectColumn> selectColumns)
    • 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 set
      columnsOfInterest - the input columns
      Returns:
      a list of columns on which the result of this is dependent
    • initDef

      List<String> initDef(Map<String,ColumnDefinition<?>> columnDefinitionMap)
      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, or QueryCompiler usage needs to be resolved within initDef. Implementations must be idempotent. Implementations that want to hold on to the columnDefinitionMap must make a defensive copy.
    • getReturnedType

      Class<?> getReturnedType()
      Get the data type stored in the resultant column.
      Returns:
      the type
    • getColumns

      List<String> 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

      List<String> 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

      @NotNull @NotNull ColumnSource<?> getDataView()
      Get a ColumnSource that can be used to access the data on demand.
      Returns:
      a ColumnSource
    • getLazyView

      @NotNull @NotNull 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

      WritableColumnSource<?> newDestInstance(long size)
      Create a new WritableColumnSource. 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

      WritableColumnSource<?> newFlatDestInstance(long size)
      Create a new immutable WritableColumnSource. 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

      default void validateSafeForRefresh(BaseTable<?> sourceTable)
      Validate that this SelectColumn is 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

      default ColumnName newColumn()
      Description copied from interface: Selectable
      The new column name, to be added to the new table.
      Specified by:
      newColumn in interface Selectable
      Returns:
      the new column name
    • expression

      default Expression expression()
      Description copied from interface: Selectable
      The expression.
      Specified by:
      expression in interface Selectable
      Returns:
      the expression