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 2021/09/01 09:11:32 UTC

[GitHub] [iceberg] bijanhoule commented on a change in pull request #3035: AWS: update DynamoDbCatalog.dropNamespace attr check

bijanhoule commented on a change in pull request #3035:
URL: https://github.com/apache/iceberg/pull/3035#discussion_r699703887



##########
File path: aws/src/main/java/org/apache/iceberg/aws/dynamodb/DynamoDbCatalog.java
##########
@@ -248,7 +248,7 @@ public boolean dropNamespace(Namespace namespace) throws NamespaceNotEmptyExcept
       dynamo.deleteItem(DeleteItemRequest.builder()
           .tableName(awsProperties.dynamoDbTableName())
           .key(namespacePrimaryKey(namespace))
-          .conditionExpression("attribute_exists(" + namespace + ")")
+          .conditionExpression("attribute_exists(" + DynamoDbCatalog.COL_NAMESPACE + ")")

Review comment:
       Good question -- I'm not 100% sure, there may be edge cases that I'm not aware of.
   
   I think that removing the `conditionExpression` might involve tweaking the exception handling [below](https://github.com/apache/iceberg/pull/3035/files#diff-76f1ec8211667ffbb03d3c237f7edff00812ccffb5b71b7d000989526e1bebd9R254) as well, I wouldn't expect the `ConditionalCheckFailedException` to be thrown any more. 




-- 
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: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org