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:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]