anigos commented on code in PR #8194:
URL: https://github.com/apache/iceberg/pull/8194#discussion_r1285016724
##########
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:
Got you @dramaticlly ! :)
This part looks ok but one question for @RussellSpitzer too as you said
Russell we need to check if the directory is empty as well but assume someone
just have cerated a table and that has nothing yet but it will get incoming
records? I mean existing location isn't that enough by this check? There could
be timely situation where I have created a table and from next week that table
will get data and actually that location is in use.
```
if
(Boolean.parseBoolean(tableProperties.get(TableProperties.UNIQUE_LOCATION))) {
boolean alreadyExists = ops.io().newInputFile(baseLocation).exists();
if (alreadyExists) {
throw new AlreadyExists
```
--
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]