Skip to content

Commit 968ea3f

Browse files
committed
Fix doc typo, add defaultNamespace method.
1 parent 7aad9aa commit 968ea3f

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

sql/catalyst/src/main/java/org/apache/spark/sql/catalog/v2/NamespaceChange.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
* <pre>
2424
* import NamespaceChange._
2525
* val catalog = Catalogs.load(name)
26-
* catalog.namespaces.alterNamespace(ident,
26+
* catalog.alterNamespace(ident,
2727
* setProperty("prop", "value"),
2828
* removeProperty("other_prop")
2929
* )

sql/catalyst/src/main/java/org/apache/spark/sql/catalog/v2/SupportsNamespaces.java

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,20 @@
3737
*/
3838
public interface SupportsNamespaces extends CatalogPlugin {
3939

40+
/**
41+
* Return a default namespace for the catalog.
42+
* <p>
43+
* When this catalog is set as the current catalog, the namespace returned by this method will be
44+
* set as the current namespace.
45+
* <p>
46+
* The namespace returned by this method is not required to exist.
47+
*
48+
* @return a multi-part namespace
49+
*/
50+
default String[] defaultNamespace() {
51+
return new String[0];
52+
}
53+
4054
/**
4155
* List top-level namespaces from the catalog.
4256
* <p>

0 commit comments

Comments
 (0)