Hi all,

Issue [4168] asks for tests checking that a name within a namespace
maps to at most one entity (table, view, generic table or nested
namespace).

Writing them showed that this only holds partly today, and the fix in
[4190] changes behavior, so I'd like to agree on the approach here
first.

Today, table vs. view and table vs. generic table collisions are
rejected with 409. But namespace vs. any table-like entity collisions
are not checked at all, because the metastore uniqueness key includes
the entity type. Such collisions are only blocked by accident, by the
location-overlap check.

[4190] rejects creating, registering or renaming to a name already
used by a different kind of entity under the same parent, with 409
AlreadyExistsException. Existing collisions are left untouched on
upgrade. The check is a read-before-write in the catalog layer, so
concurrent creates can still race.

Questions for the community:

1. Is strict sibling-name uniqueness the behavior we want? It is a
behavior change, and some existing tests currently assume tables and
namespaces may share a name. Does anyone see an upgrade concern?

2. Should this be enforced atomically by the metastore, as Robert
suggested, or resolved up front through the PolarisResolutionManifest,
as Dmitri suggested? Or can we merge the preflight approach first and
track atomic enforcement as a follow-up?

Thanks,
Alex

[4168]: https://github.com/apache/polaris/issues/4168
[4190]: https://github.com/apache/polaris/pull/4190

Reply via email to