Class LimitedColumn

java.lang.Object
org.apache.druid.query.rowsandcols.column.LimitedColumn
All Implemented Interfaces:
Column

public class LimitedColumn extends Object implements Column
  • Constructor Details

    • LimitedColumn

      public LimitedColumn(Column column, int start, int end)
  • Method Details

    • toAccessor

      @Nonnull public ColumnAccessor toAccessor()
      Description copied from interface: Column
      Returns the column as a ColumnAccessor. Semantically, this would be equivalent to calling Column.as(ColumnAccessor.class). However, being able to implement this interface is part of the explicit contract of implementing this interface, so instead of relying on Column.as(java.lang.Class<? extends T>) which allows for returning null, we define a top-level method that should never return null.
      Specified by:
      toAccessor in interface Column
      Returns:
      a ColumnAccessor representation of the column, this should never return null.
    • as

      @Nullable public <T> T as(Class<? extends T> clazz)
      Description copied from interface: Column
      Asks the Column to return itself as a concrete implementation of a specific interface. The interface asked for will tend to be a semantically-meaningful interface. This method allows the calling code to interrogate the Column object about whether it can offer a meaningful optimization of the semantic interface. If a Column cannot do anything specifically optimal for the interface requested, it should return null instead of trying to come up with its own default implementation.
      Specified by:
      as in interface Column
      Type Parameters:
      T - The interface that the calling code wants a concrete implementation of
      Parameters:
      clazz - A class object representing the interface that the calling code wants a concrete implementation of
      Returns:
      A concrete implementation of the interface, or null if there is no meaningful optimization to be had through a local implementation of the interface.