@Evolving public enum TableCapability extends Enum<TableCapability>
Table
implementation.
Tables use Table.capabilities()
to return a set of capabilities. Each capability signals
to Spark that the table supports a feature identified by the capability. For example, returning
BATCH_READ
allows Spark to read from the table using a batch scan.
Enum Constant and Description |
---|
ACCEPT_ANY_SCHEMA
Signals that the table accepts input of any schema in a write operation.
|
BATCH_READ
Signals that the table supports reads in batch execution mode.
|
BATCH_WRITE
Signals that the table supports append writes in batch execution mode.
|
CONTINUOUS_READ
Signals that the table supports reads in continuous streaming execution mode.
|
MICRO_BATCH_READ
Signals that the table supports reads in micro-batch streaming execution mode.
|
OVERWRITE_BY_FILTER
Signals that the table can replace existing data that matches a filter with appended data in
a write operation.
|
OVERWRITE_DYNAMIC
Signals that the table can dynamically replace existing data partitions with appended data in
a write operation.
|
STREAMING_WRITE
Signals that the table supports append writes in streaming execution mode.
|
TRUNCATE
Signals that the table can be truncated in a write operation.
|
V1_BATCH_WRITE
Signals that the table supports append writes using the V1 InsertableRelation interface.
|
Modifier and Type | Method and Description |
---|---|
static TableCapability |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static TableCapability[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final TableCapability BATCH_READ
public static final TableCapability MICRO_BATCH_READ
public static final TableCapability CONTINUOUS_READ
public static final TableCapability BATCH_WRITE
Tables that return this capability must support appending data and may also support additional
write modes, like TRUNCATE
, OVERWRITE_BY_FILTER
, and
OVERWRITE_DYNAMIC
.
public static final TableCapability STREAMING_WRITE
Tables that return this capability must support appending data and may also support additional
write modes, like TRUNCATE
, OVERWRITE_BY_FILTER
, and
OVERWRITE_DYNAMIC
.
public static final TableCapability TRUNCATE
Truncating a table removes all existing rows.
See SupportsTruncate
.
public static final TableCapability OVERWRITE_BY_FILTER
See SupportsOverwriteV2
.
public static final TableCapability OVERWRITE_DYNAMIC
public static final TableCapability ACCEPT_ANY_SCHEMA
public static final TableCapability V1_BATCH_WRITE
Tables that return this capability must create a V1Write and may also support additional
write modes, like TRUNCATE
, and OVERWRITE_BY_FILTER
, but cannot support
OVERWRITE_DYNAMIC
.
public static TableCapability[] values()
for (TableCapability c : TableCapability.values()) System.out.println(c);
public static TableCapability valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null