Class SelectColumnWithRespectedBarriers

java.lang.Object
io.deephaven.engine.table.impl.select.SelectColumnWithRespectedBarriers
All Implemented Interfaces:
ConcurrencyControl<Selectable>, Selectable, SelectColumn

public class SelectColumnWithRespectedBarriers extends Object
A SelectColumn that respects the given barriers.
  • Field Details

    • inner

      protected final SelectColumn inner
      The select column that is being wrapped.
  • Method Details

    • addRespectedBarriers

      public static SelectColumn addRespectedBarriers(SelectColumn toWrap, Object... respectedBarriers)
      Return a possibly new SelectColumn that respects the given barriers.
      Parameters:
      toWrap - SelectColumn to wrap
      respectedBarriers - the barriers to respect
      Returns:
      a new select colum that respects the given barriers.
    • removeRespectedBarriers

      public static SelectColumn removeRespectedBarriers(SelectColumn toWrap, Set<Object> respectBarriersToRemove)
      Return a possibly new SelectColumn that does not respect the given barriers.
      Parameters:
      toWrap - SelectColumn to wrap
      respectBarriersToRemove - the barriers to remove from toWrap's respected barriers. The set of barriers should implement contains using object reference equality (i.e. identity, not Object.equals(Object)).
      Returns:
      a SelectColumn that does not respect the given barriers
    • copy

      public SelectColumn copy()
      Description copied from interface: SelectColumn
      Create a copy of this SelectColumn.
      Returns:
      an independent copy of this SelectColumn.
    • respectedBarriers

      public Object[] respectedBarriers()
      Specified by:
      respectedBarriers in interface Selectable
      Returns:
      the barriers this selectable respects
    • initInputs

      public List<String> initInputs(@NotNull @NotNull TrackingRowSet rowSet, @NotNull @NotNull Map<String,? extends ColumnSource<?>> columnsOfInterest)
      Description copied from interface: SelectColumn
      Initialize the column from the provided set of underlying columns and row set.
      Specified by:
      initInputs in interface SelectColumn
      Parameters:
      rowSet - the base row set
      columnsOfInterest - the input columns
      Returns:
      a list of columns on which the result of this is dependent
    • initDef

      public List<String> initDef(@NotNull @NotNull Map<String,ColumnDefinition<?>> columnDefinitionMap)
      Description copied from interface: SelectColumn
      Initialize any internal column definitions from the provided initial. Any formulae will be compiled immediately using the QueryCompiler in the current ExecutionContext.
      Specified by:
      initDef in interface SelectColumn
      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
    • initDef

      public List<String> initDef(@NotNull @NotNull Map<String,ColumnDefinition<?>> columnDefinitionMap, @NotNull @NotNull QueryCompilerRequestProcessor compilationRequestProcessor)
      Description copied from interface: SelectColumn
      Initialize any internal column definitions from the provided initial. A compilation request consumer is provided to allow for deferred compilation of expressions that belong to the same query.

      Compilations must be resolved before using this SelectColumn.

      Specified by:
      initDef in interface SelectColumn
      Parameters:
      columnDefinitionMap - the starting set of column definitions; valid for this call only
      compilationRequestProcessor - a consumer to submit compilation requests; valid for this call only
      Returns:
      a list of columns on which the result of this is dependent
    • getReturnedType

      public Class<?> getReturnedType()
      Description copied from interface: SelectColumn
      Get the data type stored in the resultant column.
      Specified by:
      getReturnedType in interface SelectColumn
      Returns:
      the type
    • getReturnedComponentType

      public Class<?> getReturnedComponentType()
      Description copied from interface: SelectColumn
      Get the data component type stored in the resultant column.
      Specified by:
      getReturnedComponentType in interface SelectColumn
      Returns:
      the component type
    • getColumns

      public List<String> getColumns()
      Description copied from interface: SelectColumn
      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.
      Specified by:
      getColumns in interface SelectColumn
      Returns:
      the columns used in this SelectColumn
    • getColumnArrays

      public List<String> getColumnArrays()
      Description copied from interface: SelectColumn
      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.
      Specified by:
      getColumnArrays in interface SelectColumn
      Returns:
      the list of column arrays used
    • getDataView

      @NotNull public @NotNull ColumnSource<?> getDataView()
      Description copied from interface: SelectColumn
      Get a ColumnSource that can be used to access the data on demand.
      Specified by:
      getDataView in interface SelectColumn
      Returns:
      a ColumnSource
    • getLazyView

      @NotNull public @NotNull ColumnSource<?> getLazyView()
      Description copied from interface: SelectColumn
      Returns a lazily computed view of this column.
      Specified by:
      getLazyView in interface SelectColumn
      Returns:
      a lazily computed column source
    • getName

      public String getName()
      Description copied from interface: SelectColumn
      Get the name of the resultant column.
      Specified by:
      getName in interface SelectColumn
      Returns:
      the name of the column
    • getMatchPair

      public MatchPair getMatchPair()
      Description copied from interface: SelectColumn
      Get a MatchPair for this column, if applicable.
      Specified by:
      getMatchPair in interface SelectColumn
      Returns:
      the MatchPair for this column, if applicable.
    • newDestInstance

      public WritableColumnSource<?> newDestInstance(long size)
      Description copied from interface: SelectColumn
      Create a new WritableColumnSource. The returned column source must be capable of handling updates.
      Specified by:
      newDestInstance in interface SelectColumn
      Parameters:
      size - A hint as to the number of rows that will be used
      Returns:
      a new WritableColumnSource
    • newFlatDestInstance

      public WritableColumnSource<?> newFlatDestInstance(long size)
      Description copied from interface: SelectColumn
      Create a new immutable WritableColumnSource. The returned column source should be flat, and need not handle updates.
      Specified by:
      newFlatDestInstance in interface SelectColumn
      Parameters:
      size - A hint as to the number of rows that will be used
      Returns:
      a new WritableColumnSource
    • isRetain

      public boolean isRetain()
      Specified by:
      isRetain in interface SelectColumn
      Returns:
    • validateSafeForRefresh

      public void validateSafeForRefresh(@NotNull @NotNull BaseTable<?> sourceTable)
      Description copied from interface: SelectColumn
      Validate that this SelectColumn is safe to use in the context of the provided sourceTable.
      Specified by:
      validateSafeForRefresh in interface SelectColumn
      Parameters:
      sourceTable - the source table
    • isStateless

      public boolean isStateless()
      Description copied from interface: SelectColumn
      Returns true if this column is stateless (i.e. one row does not depend on the order of evaluation for another row).
      Specified by:
      isStateless in interface SelectColumn
    • isParallelizable

      public boolean isParallelizable()
      Description copied from interface: SelectColumn
      Returns true if this column may be parallelized.

      Even if this method returns true, if the column is not stateless, the engine does not parallelize evaluation. This situation can occur, for example if a Python formula is werapped by a StatelessSelectColumn. Therefore, this method should report true if the column can be parallelized independent of statelessness.

      Even if a column is not parallelizable, the engine may choose to evaluate it out-of-order and may not evaluate all rows individually.

      Specified by:
      isParallelizable in interface SelectColumn
      Returns:
      true if this column may be parallelized
    • hasVirtualRowVariables

      public boolean hasVirtualRowVariables()
      Description copied from interface: SelectColumn
      Returns true if this column uses row virtual offset columns of i, ii or k.
      Specified by:
      hasVirtualRowVariables in interface SelectColumn
    • recomputeOnModifiedRow

      public boolean recomputeOnModifiedRow()
      Description copied from interface: SelectColumn
      Should we ignore modified column sets, and always re-evaluate this column when the row changes?
      Specified by:
      recomputeOnModifiedRow in interface SelectColumn
      Returns:
      true if this column should be evaluated on every row modification
    • newColumn

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

      public Expression expression()
      Description copied from interface: Selectable
      The expression.
      Specified by:
      expression in interface Selectable
      Specified by:
      expression in interface SelectColumn
      Returns:
      the expression
    • hasConstantArrayAccess

      public boolean hasConstantArrayAccess()
      Specified by:
      hasConstantArrayAccess in interface SelectColumn
    • hasConstantValue

      public boolean hasConstantValue()
      Specified by:
      hasConstantValue in interface SelectColumn
    • maybeGetSourceColumn

      public Optional<SourceColumn> maybeGetSourceColumn()
      Specified by:
      maybeGetSourceColumn in interface SelectColumn
    • maybeGetFormulaColumn

      public Optional<FormulaColumn> maybeGetFormulaColumn()
      Specified by:
      maybeGetFormulaColumn in interface SelectColumn
    • declaredBarriers

      public Object[] declaredBarriers()
      Specified by:
      declaredBarriers in interface Selectable
      Returns:
      the barriers this selectable declares