Interface SupportsIndex
- All Superinterfaces:
Table
Table methods for working with index
- Since:
- 3.3.0
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
createIndex
(String indexName, NamedReference[] columns, Map<NamedReference, Map<String, String>> columnsProperties, Map<String, String> properties) Creates an index.void
Drops the index with the given name.boolean
indexExists
(String indexName) Checks whether an index exists in this table.Lists all the indexes in this table.Methods inherited from interface org.apache.spark.sql.connector.catalog.Table
capabilities, columns, name, partitioning, properties, schema
-
Field Details
-
PROP_TYPE
A reserved property to specify the index type.- See Also:
-
-
Method Details
-
createIndex
void createIndex(String indexName, NamedReference[] columns, Map<NamedReference, Map<String, throws org.apache.spark.sql.catalyst.analysis.IndexAlreadyExistsExceptionString>> columnsProperties, Map<String, String> properties) Creates an index.- Parameters:
indexName
- the name of the index to be createdcolumns
- the columns on which index to be createdcolumnsProperties
- the properties of the columns on which index to be createdproperties
- the properties of the index to be created- Throws:
org.apache.spark.sql.catalyst.analysis.IndexAlreadyExistsException
- If the index already exists.
-
dropIndex
Drops the index with the given name.- Parameters:
indexName
- the name of the index to be dropped.- Throws:
org.apache.spark.sql.catalyst.analysis.NoSuchIndexException
- If the index does not exist.
-
indexExists
Checks whether an index exists in this table.- Parameters:
indexName
- the name of the index- Returns:
- true if the index exists, false otherwise
-
listIndexes
TableIndex[] listIndexes()Lists all the indexes in this table.
-