Interface NamespaceChange
- All Known Implementing Classes:
NamespaceChange.RemoveProperty,NamespaceChange.SetProperty
@Evolving
public interface NamespaceChange
NamespaceChange subclasses represent requested changes to a namespace. These are passed to
SupportsNamespaces.alterNamespace(java.lang.String[], org.apache.spark.sql.connector.catalog.NamespaceChange...). For example,
import NamespaceChange._
val catalog = Catalogs.load(name)
catalog.alterNamespace(ident,
setProperty("prop", "value"),
removeProperty("other_prop")
)
- Since:
- 3.0.0
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classA NamespaceChange to remove a namespace property.static final classA NamespaceChange to set a namespace property. -
Method Summary
Static MethodsModifier and TypeMethodDescriptionstatic NamespaceChangeremoveProperty(String property) Create a NamespaceChange for removing a namespace property.static NamespaceChangesetProperty(String property, String value) Create a NamespaceChange for setting a namespace property.
-
Method Details
-
setProperty
Create a NamespaceChange for setting a namespace property.If the property already exists, it will be replaced with the new value.
- Parameters:
property- the property namevalue- the new property value- Returns:
- a NamespaceChange for the addition
-
removeProperty
Create a NamespaceChange for removing a namespace property.If the property does not exist, the change will succeed.
- Parameters:
property- the property name- Returns:
- a NamespaceChange for the addition
-