Class RowBasedIndexBuilder

java.lang.Object
org.apache.druid.segment.join.table.RowBasedIndexBuilder

public class RowBasedIndexBuilder extends Object
Utility class for creating IndexedTable.Index instances. Its main role is to decide which kind of implementation to use.
  • Constructor Details

    • RowBasedIndexBuilder

      public RowBasedIndexBuilder(ColumnType keyType)
  • Method Details

    • add

      public RowBasedIndexBuilder add(@Nullable Object key)
      Add a key to the index. This must be called exactly once per row, even for null values or values that are the wrong type, because the builder keeps an internal row-number counter. The builder will handle both nulls and mismatched types, so callers do not need to worry about this.
    • build

      public IndexedTable.Index build()
      Create the index. After calling this, the state of the builder is undefined, and you should discard it.