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
Modifier and TypeInterfaceDescriptionstatic final class
A NamespaceChange to remove a namespace property.static final class
A NamespaceChange to set a namespace property. -
Method Summary
Modifier and TypeMethodDescriptionstatic NamespaceChange
removeProperty
(String property) Create a NamespaceChange for removing a namespace property.static NamespaceChange
setProperty
(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
-