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
  • Method Details

    • setProperty

      static NamespaceChange setProperty(String property, String value)
      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 name
      value - the new property value
      Returns:
      a NamespaceChange for the addition
    • removeProperty

      static NamespaceChange removeProperty(String property)
      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