Class RangeConditionFilter

java.lang.Object
io.deephaven.engine.table.impl.select.WhereFilterImpl
io.deephaven.engine.table.impl.select.RangeConditionFilter
All Implemented Interfaces:
Expression, Filter, WhereFilter, Serializable

public class RangeConditionFilter extends WhereFilterImpl
A filter for comparable types (including Instant) for Condition values:
  • LESS_THAN
  • LESS_THAN_OR_EQUAL
  • GREATER_THAN
  • GREATER_THAN_OR_EQUAL
See Also:
  • Constructor Details

    • RangeConditionFilter

      public RangeConditionFilter(String columnName, Condition condition, String value)
      Creates a RangeConditionFilter.
      Parameters:
      columnName - the column to filter
      condition - the condition for filtering
      value - a String representation of the numeric filter value
    • RangeConditionFilter

      public RangeConditionFilter(String columnName, Condition condition, String value, String expression, FormulaParserConfiguration parserConfiguration)
      Creates a RangeConditionFilter.
      Parameters:
      columnName - the column to filter
      condition - the condition for filtering
      value - a String representation of the numeric filter value
      expression - the original expression prior to being parsed
      parserConfiguration -
    • RangeConditionFilter

      public RangeConditionFilter(String columnName, String conditionString, String value, String expression, FormulaParserConfiguration parserConfiguration)
      Creates a RangeConditionFilter.
      Parameters:
      columnName - the column to filter
      conditionString - the String representation of a condition for filtering
      value - a String representation of the numeric filter value
      expression - the original expression prior to being parsed
      parserConfiguration -
  • Method Details

    • getColumns

      public List<String> getColumns()
      Description copied from interface: WhereFilter
      Get the columns required by this select filter.
      Returns:
      the columns used as input by this select filter.
    • getColumnArrays

      public List<String> getColumnArrays()
      Description copied from interface: WhereFilter
      Get the array columns required by this select filter.
      Returns:
      the columns used as array input by this select filter.
    • init

      public void init(TableDefinition tableDefinition)
      Description copied from interface: WhereFilter
      Initialize this select filter given the table definition
      Parameters:
      tableDefinition - the definition of the table that will be filtered
    • parseCharFilter

      public static char parseCharFilter(String value)
    • parseByteFilter

      public static byte parseByteFilter(String value)
    • parseShortFilter

      public static short parseShortFilter(String value)
    • parseIntFilter

      public static int parseIntFilter(String value)
    • parseLongFilter

      public static long parseLongFilter(String value)
    • filter

      @NotNull public @NotNull WritableRowSet filter(@NotNull @NotNull RowSet selection, @NotNull @NotNull RowSet fullSet, @NotNull @NotNull Table table, boolean usePrev)
      Description copied from interface: WhereFilter
      Filter selection to only matching rows.
      Parameters:
      selection - the indices that should be filtered. The selection must be a subset of fullSet, and may include rows that the engine determines need not be evaluated to produce the result. Implementations may not mutate or close selection.
      fullSet - the complete RowSet of the table to filter. The fullSet is used for calculating variables like "i" or "ii". Implementations may not mutate or close fullSet.
      table - the table to filter
      usePrev - true if previous values should be used. Implementing previous value filtering is optional, and a WhereFilter.PreviousFilteringNotSupported exception may be thrown. If a PreviousFiltering exception is thrown, then the caller must acquire the PeriodicUpdateGraph lock.
      Returns:
      The subset of selection accepted by this filter; ownership passes to the caller
    • filterInverse

      @NotNull public @NotNull WritableRowSet filterInverse(@NotNull @NotNull RowSet selection, @NotNull @NotNull RowSet fullSet, @NotNull @NotNull Table table, boolean usePrev)
      Description copied from interface: WhereFilter
      Filter selection to only non-matching rows.

      Defaults to

       
       try (final WritableRowSet regular = filter(selection, fullSet, table, usePrev)) {
           return selection.minus(regular);
       }
       
       

      Implementations are encouraged to override this when they can provide more efficient implementations.

      Parameters:
      selection - the indices that should be filtered. The selection must be a subset of fullSet, and may include rows that the engine determines need not be evaluated to produce the result. Implementations may not mutate or close selection.
      fullSet - the complete RowSet of the table to filter. The fullSet is used for calculating variables like "i" or "ii". Implementations may not mutate or close fullSet.
      table - the table to filter
      usePrev - true if previous values should be used. Implementing previous value filtering is optional, and a WhereFilter.PreviousFilteringNotSupported exception may be thrown. If a PreviousFiltering exception is thrown, then the caller must acquire the PeriodicUpdateGraph lock.
      Returns:
      The subset of selection not accepted by this filter; ownership passes to the caller
    • isSimpleFilter

      public boolean isSimpleFilter()
      Returns:
      true if this is a filter that does not require any code execution, but rather is handled entirely within the database engine.
    • setRecomputeListener

      public void setRecomputeListener(WhereFilter.RecomputeListener listener)
      Description copied from interface: WhereFilter
      Set the RecomputeListener that should be notified if results based on this filter must be recomputed.
      Parameters:
      listener - the listener to notify.
    • copy

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

      public String toString()
      Overrides:
      toString in class Object