I'm OK with passing more through the interface. It's helpful in some use cases. That said, we should clearly distinguish which parameters are required and which are optional. Also, it's important to keep things consistent across methods, such as between lookupEntity and lookupEntities.
>From what I understand, the entity ID is required, while the other parameters can be optional. Can we enforce these constraints consistently across both methods? Yufei On Wed, Mar 26, 2025 at 3:58 PM Eric Maynard <eric.w.mayn...@gmail.com> wrote: > This is more of an interface design question... I tend to think passing > more information down into the persistence layer is a good thing. So if > providing catalog ID, entity type, maybe even subtype, etc. can help the > persistence layer, we shouldn't be afraid to pass it down. > > One other thing worth calling out -- there is an implied uniqueness > constraint on (parent ID, entity type, entity name) as well as on entity > ID. > > On Wed, Mar 26, 2025 at 2:07 PM Honah J. <hon...@apache.org> wrote: > > > Thanks for the clarification! Just to confirm — even though the entityId > is > > globally unique, we’ll still require catalogId + entityId at the > > persistence API level to perform an entity lookup now and in the future, > > correct? > > > > On Wed, Mar 26, 2025 at 1:45 PM Dennis Huo <huoi...@gmail.com> wrote: > > > > > Correct, the entityId must be unique across all types. > > > > > > On Wed, Mar 26, 2025 at 12:30 PM Eric Maynard < > eric.w.mayn...@gmail.com> > > > wrote: > > > > > > > I believe that entity ID by itself is meant to be a unique > identifier. > > > > > > > > On Wed, Mar 26, 2025 at 12:27 PM Honah J. <hon...@apache.org> wrote: > > > > > > > > > Hi folks, > > > > > > > > > > I have a question about what constitutes a unique identifier for an > > > > entity > > > > > in Polaris in the future. > > > > > > > > > > Right now, `lookupEntity` takes catalogId, entityId, and typeCode, > > > > > following a recent refactoring (in a PR > > > > > <https://github.com/apache/polaris/pull/1112>). On the other hand, > > > > > `lookupEntities` currently takes a list of PolarisEntityId, which > > only > > > > > includes catalogId and entityId, and is assumed to represent unique > > > > > entities. > > > > > > > > > > I understand the refactoring is still in progress, but I’d like to > > > > clarify > > > > > the intended direction: > > > > > Will the unique identifier eventually include typeCode as well? Or > do > > > we > > > > > still consider catalogId + entityId sufficient for uniqueness, with > > > > > typeCode used solely for lookup optimization? > > > > > > > > > > Best regards, > > > > > Honah (Jonas) > > > > > > > > > > > > > > >