Interface TruncatableTable
- All Known Subinterfaces:
SupportsDelete,SupportsDeleteV2
Represents a table which can be atomically truncated.
- Since:
- 3.2.0
-
Method Summary
Modifier and TypeMethodDescriptiondefault CustomTaskMetric[]Returns an array of custom metrics which are collected with values at the driver side only.default CustomMetric[]Returns an array of supported custom metrics with name and description.booleanTruncate a table by removing all rows from the table atomically.default booleantruncateTable(CaseInsensitiveStringMap options) Truncate a table with per-statement options from aDELETE ... WITH (key=value)clause.Methods inherited from interface org.apache.spark.sql.connector.catalog.Table
capabilities, columns, constraints, id, name, partitioning, properties, schema, version
-
Method Details
-
truncateTable
boolean truncateTable()Truncate a table by removing all rows from the table atomically.- Returns:
- true if a table was truncated successfully otherwise false
- Since:
- 3.2.0
-
truncateTable
Truncate a table with per-statement options from aDELETE ... WITH (key=value)clause.The default implementation ignores
optionsand delegates totruncateTable(), which preserves backward compatibility for connectors that do not need per-statement options.- Parameters:
options- per-statement options from theWITHclause; empty if none were given- Returns:
- true if the table was truncated successfully, false otherwise
- Since:
- 4.3.0
-
supportedCustomMetrics
Returns an array of supported custom metrics with name and description. By default it returns empty array.- Since:
- 4.2.0
-
reportDriverMetrics
Returns an array of custom metrics which are collected with values at the driver side only. Note that these metrics must be included in the supported custom metrics reported by `supportedCustomMetrics`.- Since:
- 4.2.0
-