Class RowBasedIndexBuilder
- java.lang.Object
-
- org.apache.druid.segment.join.table.RowBasedIndexBuilder
-
public class RowBasedIndexBuilder extends Object
Utility class for creatingIndexedTable.Index
instances. Its main role is to decide which kind of implementation to use.
-
-
Constructor Summary
Constructors Constructor Description RowBasedIndexBuilder(ColumnType keyType)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RowBasedIndexBuilder
add(Object key)
Add a key to the index.IndexedTable.Index
build()
Create the index.
-
-
-
Constructor Detail
-
RowBasedIndexBuilder
public RowBasedIndexBuilder(ColumnType keyType)
-
-
Method Detail
-
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.
-
-