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/03/19 06:25:24 UTC

[GitHub] [incubator-iceberg] prodeezy commented on a change in pull request #134: Adding Drop and Rename APIs to Tables interface.

prodeezy commented on a change in pull request #134: Adding Drop and Rename APIs to Tables interface.
URL: https://github.com/apache/incubator-iceberg/pull/134#discussion_r266743654
 
 

 ##########
 File path: hive/src/main/java/com/netflix/iceberg/hive/HiveTables.java
 ##########
 @@ -53,20 +56,42 @@ public Table create(Schema schema, String tableIdentifier) {
 
   @Override
   public Table create(Schema schema, PartitionSpec spec, Map<String, String> properties, String tableIdentifier) {
-    List<String> parts = DOT.splitToList(tableIdentifier);
-    if (parts.size() == 2) {
-      return create(schema, spec, properties, parts.get(0), parts.get(1));
-    }
-    throw new UnsupportedOperationException("Could not parse table identifier: " + tableIdentifier);
+    final List<String> parts = parseTableIdentifier(tableIdentifier);
+    return create(schema, spec, properties, parts.get(0), parts.get(1));
   }
 
   @Override
   public Table load(String tableIdentifier) {
-    List<String> parts = DOT.splitToList(tableIdentifier);
-    if (parts.size() == 2) {
-      return load(parts.get(0), parts.get(1));
+    final List<String> parts = parseTableIdentifier(tableIdentifier);
+    return load(parts.get(0), parts.get(1));
+  }
+
+  @Override
+  public void drop(String tableIdentifier) {
+    final List<String> parts = parseTableIdentifier(tableIdentifier);
+    try {
+      getClient().drop_table(parts.get(0), parts.get(1), false);
 
 Review comment:
   the ` boolean deleteData` can be bubbled up as a flag to the api so caller can choose to enforce data deletion. 

----------------------------------------------------------------
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