Interface BlockLoader.OptionalColumnAtATimeReader

All Known Implementing Classes:
AbstractTSDBDocValuesProducer.BaseDenseNumericValues, AbstractTSDBDocValuesProducer.BaseSortedDocValues, AbstractTSDBDocValuesProducer.TSDBBinaryDocValues
Enclosing interface:
BlockLoader

public static interface BlockLoader.OptionalColumnAtATimeReader
An interface for readers that attempt to load all document values in a column-at-a-time fashion.

Unlike BlockLoader.ColumnAtATimeReader, implementations may return null if they are unable to load the requested values, for example due to unsupported underlying data. This allows callers to optimistically try optimized loading strategies first, and fall back if necessary.

  • Method Summary

    Modifier and Type
    Method
    Description
    default org.apache.lucene.search.DocIdSetIterator
    tryContainsIterator(org.apache.lucene.util.BytesRef containsTerm)
    Returns a DocIdSetIterator that matches documents whose value contains the given term, or null if this optimization is not supported by the underlying data.
    tryRead(BlockLoader.BlockFactory factory, BlockLoader.Docs docs, int offset, boolean nullsFiltered, BlockDocValuesReader.ToDouble toDouble, boolean toInt, boolean binaryMultiValuedFormat)
    Attempts to read the values of all documents in docs Returns null if unable to load the values.
  • Method Details

    • tryRead

      @Nullable BlockLoader.Block tryRead(BlockLoader.BlockFactory factory, BlockLoader.Docs docs, int offset, boolean nullsFiltered, BlockDocValuesReader.ToDouble toDouble, boolean toInt, boolean binaryMultiValuedFormat) throws IOException
      Attempts to read the values of all documents in docs Returns null if unable to load the values.
      Parameters:
      nullsFiltered - if true, then target docs are guaranteed to have a value for the field. see BlockLoader.ColumnAtATimeReader.read(BlockFactory, Docs, int, boolean)
      toDouble - a function to convert long values to double, or null if no conversion is needed/supported
      toInt - whether to convert to int in case int block / vector is needed
      binaryMultiValuedFormat - whether the multi-valued binary format is used (CustomBinaryDocValuesField).
      Throws:
      IOException
    • tryContainsIterator

      default org.apache.lucene.search.DocIdSetIterator tryContainsIterator(org.apache.lucene.util.BytesRef containsTerm) throws IOException
      Returns a DocIdSetIterator that matches documents whose value contains the given term, or null if this optimization is not supported by the underlying data.
      Throws:
      IOException