You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by GitBox <gi...@apache.org> on 2019/12/06 03:46:39 UTC

[GitHub] [incubator-iceberg] jerryshao commented on a change in pull request #688: [ISSUE #672] Add SupportsNamespaces for 'HadoopCatalog' and 'HiveCatalog'

jerryshao commented on a change in pull request #688: [ISSUE #672] Add SupportsNamespaces for 'HadoopCatalog' and 'HiveCatalog'
URL: https://github.com/apache/incubator-iceberg/pull/688#discussion_r354652502
 
 

 ##########
 File path: api/src/main/java/org/apache/iceberg/catalog/Catalog.java
 ##########
 @@ -303,4 +304,58 @@ default boolean dropTable(TableIdentifier identifier) {
    * @throws NoSuchTableException if the table does not exist
    */
   Table loadTable(TableIdentifier identifier);
+
+
+  /**
+   * Create a namespace in the catalog.
+   *
+   * @param namespace {@link Namespace}.
+   */
+  boolean createNamespace(Namespace namespace);
+
+  /**
+   * List top-level namespaces from the catalog.
+   * <p>
+   * If an object such as a table, view, or function exists, its parent namespaces must also exist
+   * and must be returned by this discovery method. For example, if table a.b.t exists, this method
+   * must return ["a"] in the result array.
+   *
+   * @return an List of namespace {@link Namespace} names
+   */
+  List<Namespace> listNamespaces();
+
+  /**
+   * List  namespaces from the namespace.
+   * <p>
+   * For example, if table a.b.t exists, use 'SELECT NAMESPACE IN a' this method
+   * must return Namepace.of("b") {@link Namespace}.
+   *
+   * @return an List of namespace {@link Namespace} names
+   */
+  List<Namespace> listNamespaces(Namespace namespace);
+
+  /**
+   * Load metadata properties for a namespace.
+   *
+   * @param namespace a Namespace.of(name) {@link Namespace}
+   * @return a string map of properties for the given namespace
+   */
+  Map<String, String>  loadNamespaceMetadata(Namespace namespace);
+
+  /**
+   * Load metadata properties for a namespace.
+   *
+   * @param namespace a Namespace.of(name) {@link Namespace}
+   * @return true while drop success.
+   */
+  boolean dropNamespace(Namespace namespace) throws IOException;
+
+  /**
+   * Load metadata properties for a namespace.
+   *
+   * @param namespace a Namespace.of(name) {@link Namespace}
+   * @return true while alter success.
+   */
+  boolean alterNamespace(Namespace namespace);
 
 Review comment:
   This seems not align with Spark's interface, how do we change the namespace, what is the purpose of returning `boolean`?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org