public interface IndexedTable extends ReferenceCountedObject, Closeable
IndexedTableJoinable, and its main purpose is to participate in joins.| Modifier and Type | Interface and Description |
|---|---|
static interface |
IndexedTable.Index
Indexes support fast lookups on key columns.
|
static interface |
IndexedTable.Reader
Readers support reading values out of any column.
|
| Modifier and Type | Method and Description |
|---|---|
IndexedTable.Index |
columnIndex(int column)
Returns the index for a particular column.
|
IndexedTable.Reader |
columnReader(int column)
Returns a reader for a particular column.
|
default byte[] |
computeCacheKey()
Computes a
byte[] key for the table that can be used for computing cache keys for join operations. |
default boolean |
isCacheable()
Returns whether this indexed table can be cached for the join operations
|
Set<String> |
keyColumns()
Returns the columns of this table that have indexes.
|
default ColumnSelectorFactory |
makeColumnSelectorFactory(ReadableOffset offset,
boolean descending,
Closer closer)
This method allows a table to directly provide an optimized
ColumnSelectorFactory for
IndexedTableJoinMatcher to create selectors. |
int |
numRows()
Returns the number of rows in this table.
|
RowSignature |
rowSignature()
Returns the signature of this table, which includes all key columns (as well as other columns that can be
selected, but are not keys).
|
String |
version()
Returns the version of this table, used to compare against when loading a new version of the table
|
acquireReferencesString version()
RowSignature rowSignature()
int numRows()
IndexedTable.Index columnIndex(int column)
rowSignature().IndexedTable.Reader columnReader(int column)
rowSignature(). Don't forget to close your IndexedTable.Reader when finished reading, to clean up any
resources.@Nullable default ColumnSelectorFactory makeColumnSelectorFactory(ReadableOffset offset, boolean descending, Closer closer)
ColumnSelectorFactory for
IndexedTableJoinMatcher to create selectors. If this method returns null, the default
IndexedTableColumnSelectorFactory, which creates IndexedTableDimensionSelector or
IndexedTableColumnValueSelector as appropriate, both backed with a columnReader(int), will be used
instead.default byte[] computeCacheKey()
byte[] key for the table that can be used for computing cache keys for join operations.
see JoinableFactory.computeJoinCacheKey(org.apache.druid.query.DataSource, org.apache.druid.segment.join.JoinConditionAnalysis){@link - IAE} if caching is not supporteddefault boolean isCacheable()
Copyright © 2011–2022 The Apache Software Foundation. All rights reserved.