Interface TransformableTableMap
- All Known Subinterfaces:
TableMap
,TableMapProxyHandler.TableMapProxy
- All Known Implementing Classes:
FilteredTableMap
,LastByTableImportState.ResultTableMap
,LocalTableMap
,TableMapClient
,TableMapImpl
,TableMapSupplier
public interface TransformableTableMap
This is used by TableMap and TableMapProxyHandlers to expose the merge()
operation to users.
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
TransformableTableMap.AsTableBuilder
Builder object for a TableMapProxy. -
Method Summary
Modifier and Type Method Description default Table
asTable()
Execute asTable with the default builder options.Table
asTable(boolean strictKeys, boolean allowCoalesce, boolean sanityCheckJoins)
Create a Table out of this TableMap's values.default TransformableTableMap.AsTableBuilder
asTableBuilder()
Create a builder object for calling asTable without having to specify all of the parameters.TableMap
asTableMap()
If you're a TableMap return this, otherwise if you're a Proxy return the underlying TableMap.Table
merge()
Merges all of the component tables into a single Table.
-
Method Details
-
merge
Table merge()Merges all of the component tables into a single Table.- Returns:
- all of our component tables merged into a single Table.
-
asTableMap
TableMap asTableMap()If you're a TableMap return this, otherwise if you're a Proxy return the underlying TableMap.- Returns:
- a TableMap representation of this object
-
asTable
Create a Table out of this TableMap's values.Creates a proxy object that in many respects acts like a Table, you can perform many of the table operations on it, which are then applied using
TableMap.transformTables(java.util.function.Function)
orTableMap.transformTablesWithMap(TableMap, BiFunction)
if the right hand side of an operation is another TableMap.The returned table acts as if it were an uncoalesced table; when two of our Proxy objects are operated on together, e.g., by a
Table.join(com.illumon.iris.db.tables.Table)
) operation, then tables with identical keys are used. If strictKeys is set, an error occurs if the two TableMaps do not have identical keySets.Supported operations include those which return a
Table
,LongSizedDataStructure.size()
,Table.getDefinition()
and operations to retrieve attributes. Operations which retrieve data (such asTable.getIndex()
} orTable.getColumn(int)
require a coalesce operation. If allowCoalesce is not set to true, then the coalescing operations will fail with anIllegalArgumentException
.- Parameters:
strictKeys
- if we should fail when our RHS TableMap does not have the same keySetallowCoalesce
- if we should allow this TableMap to be automatically coalesced into a tablesanityCheckJoins
- if we should sanity check join keys, meaning that we should refuse to perform any joins if the join keys would span two segments of the TableMap. This option is safer, but requires additional work on the query engine to perform the safety checks.- Returns:
- a Table object that performs operations by segment
-
asTable
Execute asTable with the default builder options.- Returns:
- a Table object that performs operations by segment
-
asTableBuilder
Create a builder object for calling asTable without having to specify all of the parameters.- Returns:
- an AsTableBuilder
-