dramaticlly commented on code in PR #8194:
URL: https://github.com/apache/iceberg/pull/8194#discussion_r1298897651


##########
core/src/main/java/org/apache/iceberg/TableProperties.java:
##########
@@ -365,4 +365,7 @@ private TableProperties() {}
 
   public static final String UPSERT_ENABLED = "write.upsert.enabled";
   public static final boolean UPSERT_ENABLED_DEFAULT = false;
+
+  public static final String UNIQUE_LOCATION = "location.unique";

Review Comment:
   I think it might be catalog dependent, but commonly when table was created, 
the iceberg metadata gets written into its folder. 
   
   table `db.tbl` gets created usually means catalog will create following 
structure on file system
   
   ```
   .
   └── prefix (0)
       └── db.db (1)
           └── table (2)
               ├── data (3)
               └── metadata (4)
                   └── 00000-fad97b4a-ffea-4707-b9cc-d083017bf482.metadata.json 
   ```
   
   So currently if we check directory is empty help guard against the case 
where create tables at some existing table location. I believe with this PR, 
create a new table at location 0,1,2,4 will throw exception as exception since 
location is already in use but create at 3 will succeed if original table was 
created empty.



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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to