Package org.apache.iceberg.spark
Class SparkCachedTableCatalog
java.lang.Object
org.apache.iceberg.spark.SparkCachedTableCatalog
- All Implemented Interfaces:
org.apache.spark.sql.connector.catalog.CatalogPlugin,org.apache.spark.sql.connector.catalog.FunctionCatalog,org.apache.spark.sql.connector.catalog.TableCatalog
public class SparkCachedTableCatalog
extends Object
implements org.apache.spark.sql.connector.catalog.TableCatalog
An internal table catalog that is capable of loading tables from a cache.
-
Field Summary
Fields inherited from interface org.apache.spark.sql.connector.catalog.TableCatalog
OPTION_PREFIX, PROP_COMMENT, PROP_EXTERNAL, PROP_IS_MANAGED_LOCATION, PROP_LOCATION, PROP_OWNER, PROP_PROVIDER -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionalterTable(org.apache.spark.sql.connector.catalog.Identifier ident, org.apache.spark.sql.connector.catalog.TableChange... changes) createTable(org.apache.spark.sql.connector.catalog.Identifier ident, org.apache.spark.sql.types.StructType schema, org.apache.spark.sql.connector.expressions.Transform[] partitions, Map<String, String> properties) booleandropTable(org.apache.spark.sql.connector.catalog.Identifier ident) voidinitialize(String catalogName, org.apache.spark.sql.util.CaseInsensitiveStringMap options) voidinvalidateTable(org.apache.spark.sql.connector.catalog.Identifier ident) default booleanisExistingNamespace(String[] namespace) default booleanisFunctionNamespace(String[] namespace) default org.apache.spark.sql.connector.catalog.Identifier[]listFunctions(String[] namespace) org.apache.spark.sql.connector.catalog.Identifier[]listTables(String[] namespace) default org.apache.spark.sql.connector.catalog.functions.UnboundFunctionloadFunction(org.apache.spark.sql.connector.catalog.Identifier ident) loadTable(org.apache.spark.sql.connector.catalog.Identifier ident) loadTable(org.apache.spark.sql.connector.catalog.Identifier ident, long timestampMicros) name()booleanpurgeTable(org.apache.spark.sql.connector.catalog.Identifier ident) voidrenameTable(org.apache.spark.sql.connector.catalog.Identifier oldIdent, org.apache.spark.sql.connector.catalog.Identifier newIdent) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.spark.sql.connector.catalog.CatalogPlugin
defaultNamespaceMethods inherited from interface org.apache.spark.sql.connector.catalog.FunctionCatalog
functionExistsMethods inherited from interface org.apache.spark.sql.connector.catalog.TableCatalog
capabilities, createTable, tableExists, useNullableQuerySchema
-
Constructor Details
-
SparkCachedTableCatalog
public SparkCachedTableCatalog()
-
-
Method Details
-
listTables
- Specified by:
listTablesin interfaceorg.apache.spark.sql.connector.catalog.TableCatalog
-
loadTable
public SparkTable loadTable(org.apache.spark.sql.connector.catalog.Identifier ident) throws org.apache.spark.sql.catalyst.analysis.NoSuchTableException - Specified by:
loadTablein interfaceorg.apache.spark.sql.connector.catalog.TableCatalog- Throws:
org.apache.spark.sql.catalyst.analysis.NoSuchTableException
-
loadTable
public SparkTable loadTable(org.apache.spark.sql.connector.catalog.Identifier ident, String version) throws org.apache.spark.sql.catalyst.analysis.NoSuchTableException - Specified by:
loadTablein interfaceorg.apache.spark.sql.connector.catalog.TableCatalog- Throws:
org.apache.spark.sql.catalyst.analysis.NoSuchTableException
-
loadTable
public SparkTable loadTable(org.apache.spark.sql.connector.catalog.Identifier ident, long timestampMicros) throws org.apache.spark.sql.catalyst.analysis.NoSuchTableException - Specified by:
loadTablein interfaceorg.apache.spark.sql.connector.catalog.TableCatalog- Throws:
org.apache.spark.sql.catalyst.analysis.NoSuchTableException
-
invalidateTable
public void invalidateTable(org.apache.spark.sql.connector.catalog.Identifier ident) - Specified by:
invalidateTablein interfaceorg.apache.spark.sql.connector.catalog.TableCatalog
-
createTable
public SparkTable createTable(org.apache.spark.sql.connector.catalog.Identifier ident, org.apache.spark.sql.types.StructType schema, org.apache.spark.sql.connector.expressions.Transform[] partitions, Map<String, String> properties) throws org.apache.spark.sql.catalyst.analysis.TableAlreadyExistsException- Specified by:
createTablein interfaceorg.apache.spark.sql.connector.catalog.TableCatalog- Throws:
org.apache.spark.sql.catalyst.analysis.TableAlreadyExistsException
-
alterTable
public SparkTable alterTable(org.apache.spark.sql.connector.catalog.Identifier ident, org.apache.spark.sql.connector.catalog.TableChange... changes) - Specified by:
alterTablein interfaceorg.apache.spark.sql.connector.catalog.TableCatalog
-
dropTable
public boolean dropTable(org.apache.spark.sql.connector.catalog.Identifier ident) - Specified by:
dropTablein interfaceorg.apache.spark.sql.connector.catalog.TableCatalog
-
purgeTable
public boolean purgeTable(org.apache.spark.sql.connector.catalog.Identifier ident) throws UnsupportedOperationException - Specified by:
purgeTablein interfaceorg.apache.spark.sql.connector.catalog.TableCatalog- Throws:
UnsupportedOperationException
-
renameTable
public void renameTable(org.apache.spark.sql.connector.catalog.Identifier oldIdent, org.apache.spark.sql.connector.catalog.Identifier newIdent) - Specified by:
renameTablein interfaceorg.apache.spark.sql.connector.catalog.TableCatalog
-
initialize
public void initialize(String catalogName, org.apache.spark.sql.util.CaseInsensitiveStringMap options) - Specified by:
initializein interfaceorg.apache.spark.sql.connector.catalog.CatalogPlugin
-
name
- Specified by:
namein interfaceorg.apache.spark.sql.connector.catalog.CatalogPlugin
-
isFunctionNamespace
-
isExistingNamespace
-
listFunctions
default org.apache.spark.sql.connector.catalog.Identifier[] listFunctions(String[] namespace) throws org.apache.spark.sql.catalyst.analysis.NoSuchNamespaceException - Specified by:
listFunctionsin interfaceorg.apache.spark.sql.connector.catalog.FunctionCatalog- Throws:
org.apache.spark.sql.catalyst.analysis.NoSuchNamespaceException
-
loadFunction
default org.apache.spark.sql.connector.catalog.functions.UnboundFunction loadFunction(org.apache.spark.sql.connector.catalog.Identifier ident) throws org.apache.spark.sql.catalyst.analysis.NoSuchFunctionException - Specified by:
loadFunctionin interfaceorg.apache.spark.sql.connector.catalog.FunctionCatalog- Throws:
org.apache.spark.sql.catalyst.analysis.NoSuchFunctionException
-