Skip to content

Conversation

@bijanhoule
Copy link
Contributor

This PR is intended to resolve an issue with DynamoDbCatalog.dropNamespace() -- the dynamoDB delete fails as the conditionExpression evaluates to e.g. attribute_exists(my_db), rather than attribute_exists(namespace).

Example namespace record in dynamo:

{
 "identifier": "NAMESPACE",
 "namespace": "my_db",
 "updated_at": 1628190933466,
 "created_at": 1628190933466,
 "v": "0203ec48-317b-4197-9712-4a7c91b5c91a",
 "p.owner": "bijan"
}

@jackye1995 - can you confirm this change makes sense / is what was intended?
@danielcweeks

@jackye1995
Copy link
Contributor

can you also add the following integration test?

  @Test
  public void testDropNamespace() {
    Namespace namespace = Namespace.of(genRandomName());
    catalog.createNamespace(namespace);
    catalog.dropNamespace(namespace);
    GetItemResponse response = dynamo.getItem(GetItemRequest.builder()
        .tableName(catalogTableName)
        .key(DynamoDbCatalog.namespacePrimaryKey(namespace))
        .build());
    Assert.assertFalse("namespace must not exist", response.hasItem());
  }

@bijanhoule
Copy link
Contributor Author

can you also add the following integration test?

...

Good call, thank you! Added

@rdblue rdblue merged commit e0b20d4 into apache:master Sep 13, 2021
@rdblue
Copy link
Contributor

rdblue commented Sep 13, 2021

Thanks for fixing this, @bijanhoule!

@rdblue rdblue added this to the Java 0.12.1 Release milestone Oct 20, 2021
kbendick pushed a commit to kbendick/iceberg that referenced this pull request Oct 26, 2021
kbendick pushed a commit to kbendick/iceberg that referenced this pull request Oct 27, 2021
izchen pushed a commit to izchen/iceberg that referenced this pull request Dec 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants