@NotThreadSafe public class Table extends Object
Modifier and Type | Field and Description |
---|---|
static long |
FIRST_VERSION |
Modifier and Type | Method and Description |
---|---|
void |
addPartitions(Table.AddTablePartitionsEntry entry)
Add partitions to the current table.
|
static Table |
create(Database database,
Table.AddTableEntry entry) |
static Table |
create(Database database,
UdbTable udbTable,
Table previousTable) |
String |
getName() |
Partition |
getPartition(String spec) |
List<Partition> |
getPartitions() |
long |
getPreviousVersion() |
Schema |
getSchema() |
List<ColumnStatisticsInfo> |
getStatistics() |
Table.AddTableEntry |
getTableJournalProto() |
List<Table.AddTablePartitionsEntry> |
getTablePartitionsJournalProto() |
List<TransformPlan> |
getTransformPlans(TransformDefinition definition)
Returns a list of plans to transform the table, according to the transformation definition.
|
long |
getVersion() |
boolean |
shouldSync(UdbTable udbTable) |
TableInfo |
toProto() |
public static final long FIRST_VERSION
public static Table create(Database database, UdbTable udbTable, @Nullable Table previousTable)
database
- the databaseudbTable
- the udb tablepreviousTable
- the previous table, or null
if creating first version of tablenull
if there
no changes in the udb tablepublic static Table create(Database database, Table.AddTableEntry entry)
database
- the databaseentry
- the add table journal entrypublic void addPartitions(Table.AddTablePartitionsEntry entry)
entry
- the add table partitions entrypublic String getName()
public Partition getPartition(String spec)
spec
- the partition specpublic Schema getSchema()
public List<ColumnStatisticsInfo> getStatistics()
public long getVersion()
public long getPreviousVersion()
public List<TransformPlan> getTransformPlans(TransformDefinition definition) throws IOException
definition
- the transformation definitionTransformPlan
to transform this tableIOException
public boolean shouldSync(UdbTable udbTable)
udbTable
- the udb table to check againstpublic TableInfo toProto()
public Table.AddTableEntry getTableJournalProto()
public List<Table.AddTablePartitionsEntry> getTablePartitionsJournalProto()
Copyright © 2023. All Rights Reserved.