Skip to content

Add entity name overlap tests #4168

@dimas-b

Description

@dimas-b

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 withing a namespaces should only map to at most one entity type (Table, (nested) Namespace, View, etc.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions