Class AbstractFrameRowsAndColumns

java.lang.Object
org.apache.druid.query.rowsandcols.concrete.AbstractFrameRowsAndColumns
All Implemented Interfaces:
Closeable, AutoCloseable, FrameRowsAndColumns, RowsAndColumns, CloseableShapeshifter
Direct Known Subclasses:
ColumnBasedFrameRowsAndColumns, RowBasedFrameRowsAndColumns

public abstract class AbstractFrameRowsAndColumns extends Object implements FrameRowsAndColumns, AutoCloseable, CloseableShapeshifter
  • Constructor Details

    • AbstractFrameRowsAndColumns

      public AbstractFrameRowsAndColumns(Frame frame, @Nullable RowSignature signature)
  • Method Details

    • getFrame

      public Frame getFrame()
      Description copied from interface: FrameRowsAndColumns
      Returns the frame.
      Specified by:
      getFrame in interface FrameRowsAndColumns
    • hasSignature

      public boolean hasSignature()
    • getSignature

      public RowSignature getSignature()
      Description copied from interface: FrameRowsAndColumns
      Returns a signature, which may or may not be available.
      Specified by:
      getSignature in interface FrameRowsAndColumns
    • getColumnNames

      public Collection<String> getColumnNames()
      Description copied from interface: RowsAndColumns
      The set of column names available from the RowsAndColumns
      Specified by:
      getColumnNames in interface RowsAndColumns
      Returns:
      The set of column names available from the RowsAndColumns
    • numRows

      public int numRows()
      Description copied from interface: RowsAndColumns
      The number of rows in the RowsAndColumns object
      Specified by:
      numRows in interface RowsAndColumns
      Returns:
      the integer number of rows
    • as

      @Nullable public <T> T as(Class<T> clazz)
      Description copied from interface: RowsAndColumns
      Asks the RowsAndColumns 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 RowsAndColumns object about whether it can offer a meaningful optimization of the semantic interface. If a RowsAndColumns 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 CloseableShapeshifter
      Specified by:
      as in interface RowsAndColumns
      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.
    • close

      public void close()
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object