public class CatalogV2Util
extends Object
Constructor and Description |
---|
CatalogV2Util() |
Modifier and Type | Method and Description |
---|---|
static scala.collection.immutable.Map<String,String> |
applyNamespaceChanges(scala.collection.immutable.Map<String,String> properties,
scala.collection.Seq<NamespaceChange> changes)
Apply properties changes to a map and return the result.
|
static java.util.Map<String,String> |
applyNamespaceChanges(java.util.Map<String,String> properties,
scala.collection.Seq<NamespaceChange> changes)
Apply properties changes to a Java map and return the result.
|
static scala.collection.immutable.Map<String,String> |
applyPropertiesChanges(scala.collection.immutable.Map<String,String> properties,
scala.collection.Seq<TableChange> changes)
Apply properties changes to a map and return the result.
|
static java.util.Map<String,String> |
applyPropertiesChanges(java.util.Map<String,String> properties,
scala.collection.Seq<TableChange> changes)
Apply properties changes to a Java map and return the result.
|
static StructType |
applySchemaChanges(StructType schema,
scala.collection.Seq<TableChange> changes,
scala.Option<String> tableProvider,
String statementType)
Apply schema changes to a schema and return the result.
|
static scala.collection.immutable.Map<String,String> |
convertTableProperties(org.apache.spark.sql.catalyst.plans.logical.TableSpec t) |
static Table |
getTable(CatalogPlugin catalog,
Identifier ident,
scala.Option<org.apache.spark.sql.catalyst.analysis.TimeTravelSpec> timeTravelSpec) |
static TableCatalog |
getTableProviderCatalog(SupportsCatalogOptions provider,
org.apache.spark.sql.connector.catalog.CatalogManager catalogManager,
CaseInsensitiveStringMap options) |
static boolean |
isSessionCatalog(CatalogPlugin catalog) |
static scala.Option<UnboundFunction> |
loadFunction(CatalogPlugin catalog,
Identifier ident) |
static scala.Option<org.apache.spark.sql.catalyst.analysis.NamedRelation> |
loadRelation(CatalogPlugin catalog,
Identifier ident) |
static scala.Option<Table> |
loadTable(CatalogPlugin catalog,
Identifier ident,
scala.Option<org.apache.spark.sql.catalyst.analysis.TimeTravelSpec> timeTravelSpec) |
static scala.collection.Seq<String> |
NAMESPACE_RESERVED_PROPERTIES()
The list of reserved namespace properties, which can not be removed or changed directly by
the syntax:
{{
ALTER NAMESPACE ...
|
static Column[] |
structTypeToV2Columns(StructType schema)
Converts a StructType to DS v2 columns, which decodes the StructField metadata to v2 column
comment and default value or generation expression.
|
static scala.collection.Seq<String> |
TABLE_RESERVED_PROPERTIES()
The list of reserved table properties, which can not be removed or changed directly by
the syntax:
{{
ALTER TABLE ...
|
static StructType |
v2ColumnsToStructType(Column[] columns)
Converts DS v2 columns to StructType, which encodes column comment and default value to
StructField metadata.
|
static scala.collection.immutable.Map<String,String> |
withDefaultOwnership(scala.collection.immutable.Map<String,String> properties) |
public static scala.collection.Seq<String> TABLE_RESERVED_PROPERTIES()
They need specific syntax to modify
public static scala.collection.Seq<String> NAMESPACE_RESERVED_PROPERTIES()
They need specific syntax to modify
public static scala.collection.immutable.Map<String,String> applyNamespaceChanges(scala.collection.immutable.Map<String,String> properties, scala.collection.Seq<NamespaceChange> changes)
properties
- (undocumented)changes
- (undocumented)public static java.util.Map<String,String> applyNamespaceChanges(java.util.Map<String,String> properties, scala.collection.Seq<NamespaceChange> changes)
properties
- (undocumented)changes
- (undocumented)public static scala.collection.immutable.Map<String,String> applyPropertiesChanges(scala.collection.immutable.Map<String,String> properties, scala.collection.Seq<TableChange> changes)
properties
- (undocumented)changes
- (undocumented)public static java.util.Map<String,String> applyPropertiesChanges(java.util.Map<String,String> properties, scala.collection.Seq<TableChange> changes)
properties
- (undocumented)changes
- (undocumented)public static StructType applySchemaChanges(StructType schema, scala.collection.Seq<TableChange> changes, scala.Option<String> tableProvider, String statementType)
schema
- (undocumented)changes
- (undocumented)tableProvider
- (undocumented)statementType
- (undocumented)public static scala.Option<Table> loadTable(CatalogPlugin catalog, Identifier ident, scala.Option<org.apache.spark.sql.catalyst.analysis.TimeTravelSpec> timeTravelSpec)
public static Table getTable(CatalogPlugin catalog, Identifier ident, scala.Option<org.apache.spark.sql.catalyst.analysis.TimeTravelSpec> timeTravelSpec)
public static scala.Option<UnboundFunction> loadFunction(CatalogPlugin catalog, Identifier ident)
public static scala.Option<org.apache.spark.sql.catalyst.analysis.NamedRelation> loadRelation(CatalogPlugin catalog, Identifier ident)
public static boolean isSessionCatalog(CatalogPlugin catalog)
public static scala.collection.immutable.Map<String,String> convertTableProperties(org.apache.spark.sql.catalyst.plans.logical.TableSpec t)
public static scala.collection.immutable.Map<String,String> withDefaultOwnership(scala.collection.immutable.Map<String,String> properties)
public static TableCatalog getTableProviderCatalog(SupportsCatalogOptions provider, org.apache.spark.sql.connector.catalog.CatalogManager catalogManager, CaseInsensitiveStringMap options)
public static StructType v2ColumnsToStructType(Column[] columns)
columns
- (undocumented)public static Column[] structTypeToV2Columns(StructType schema)
schema
- (undocumented)