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/09/09 21:41:06 UTC

[GitHub] [incubator-iceberg] xabriel commented on a change in pull request #458: Add metadata tables for path-based tables

xabriel commented on a change in pull request #458: Add metadata tables for path-based tables
URL: https://github.com/apache/incubator-iceberg/pull/458#discussion_r322467774
 
 

 ##########
 File path: core/src/main/java/org/apache/iceberg/hadoop/HadoopTables.java
 ##########
 @@ -60,12 +66,51 @@ public HadoopTables(Configuration conf) {
   public Table load(String location) {
     TableOperations ops = newTableOps(location);
     if (ops.current() == null) {
-      throw new NoSuchTableException("Table does not exist at location: " + location);
+      // try to resolve a metadata table, which we encode as URI fragments
+      // e.g. hdfs:///warehouse/my_table#snapshots
+      int hashIndex = location.lastIndexOf('#');
+      if (hashIndex != -1 && location.length() - 1 != hashIndex) {
 
 Review comment:
   @chenjunjiedada can you elaborate on why a regex would be better?

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