Add entity name overlap tests
- Dominant language
- Java
- Stars
- 2.1k
- Forks
- 522
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 137
Description
Following up on the discussion in #4148 (related to #4108), it seems valuable to add generic entity name collision tests to `polaris-tests`.
Previous work on this from @Subham-KRLX (class `PolarisRestCatalogIntegrationBase`):
```
@Test
public void testCreateTableNameThatCollidesWithNamespace() {
Assumptions.assumeThat(testNamespaceTableNameCollision()).isTrue();
Namespace parentNamespace = Namespace.of("ns1");
restCatalog.createNamespace(parentNamespace);
restCatalog.createNamespace(Namespace.of("ns1", "clash"));
assertThatThrownBy(
() ->
restCatalog
.buildTable(TableIdentifier.of(parentNamespace, "clash"), SCHEMA)
.create())
.isInstanceOf(AlreadyExistsException.class)
.hasMessageContaining("already exists");
}
```
Each name within a namespaces should only map to at most one entity type (Table, (nested) Namespace, View, etc.)
Contributor guide
Research direction
Start with PolarisRestCatalogIntegrationBase and the existing testCreateTableNameThatCollidesWithNamespace example in polaris-tests. Add generic collision coverage for Table, nested Namespace, View, and other named entities; done when a name cannot map to more than one entity type and conflicting creation reports AlreadyExistsException.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- databases, testing
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 58/100