Class FrameReader

java.lang.Object
org.apache.druid.frame.read.FrameReader

public class FrameReader extends Object
Embeds the logic to read frames with a given RowSignature. Can be shared by multiple threads, to encourage reuse of column and field readers.
  • Method Details

    • create

      public static FrameReader create(RowSignature signature)
      Create a reader for frames with a given RowSignature. The signature must exactly match the frames to be read, or else behavior is undefined.
      Parameters:
      signature - signature used to generate the reader
    • signature

      public RowSignature signature()
    • columnCapabilities

      @Nullable public ColumnCapabilities columnCapabilities(Frame frame, String columnName)
      Returns capabilities for a particular column in a particular frame.

      Preferred over RowSignature.getColumnCapabilities(String) when reading a particular frame, because this method has more insight into what's actually going on with that specific frame (nulls, multivalue, etc). The RowSignature version is based solely on type.

    • makeCursorFactory

      public CursorFactory makeCursorFactory(Frame frame)
      Create a CursorFactory for the given frame.
    • makeComparisonWidget

      public FrameComparisonWidget makeComparisonWidget(Frame frame, List<KeyColumn> keyColumns)
      Create a FrameComparisonWidget for the given frame.

      Only possible for row-based frames. The provided sortColumns must be a prefix of signature().