Hi all, I think we need to harmonize the null handling behavior across all endpoints.
The PR [6204] changes the behavior for UpdateCatalogRequest, but as someone pointed out [2], this creates an inconsistency with other endpoints. Another PR [6268] is also attempting to modify the null handling behavior for other endpoints. Thanks, Alex [1]: https://github.com/apache/polaris/pull/6204#issuecomment-7259701128 [6204]: https://github.com/apache/polaris/pull/6204 [6268]: https://github.com/apache/polaris/pull/6268 On Tue, Dec 1, 2026 at 2:46 AM Yufei Gu <[email protected]> wrote: > > Thanks Indhumathi for fixing this. +1 on the proposal and approved the PR. > My only concern is that a client serializing an empty map by default could > still accidentally clear the catalog’s properties. But this PR doesn't make > it worse. Ideally we could have a separate operation for property cleanup. > It's likely another PR. > > Yufei > > > On Sat, Nov 28, 2026 at 5:08 AM vignesh a <[email protected]> wrote: >> >> Hi all, >> >> I looked at [1]. +1 from me, omitted vs empty. >> getProperties returning null is fine. >> >> Thanks, >> Vignesh >> >> [1] https://github.com/apache/polaris/pull/6204/ >> >> On Fri, 27 Nov 2026 at 19:49, Alex Dutra via dev <[email protected]> >> wrote: >> >> > Hi Indhumathi, >> > >> > As commented on the PR, I'm +1 on the proposed approach. >> > >> > Thanks, >> > Alex >> > >> > On Thu, Nov 26, 2026 at 9:47 AM Jean-Baptiste Onofré <[email protected]> >> > wrote: >> > > >> > > Hi Indhumathi, >> > > >> > > Thanks for starting this thread on the mailing list, good summary of >> > #6204. >> > > >> > > +1 from me on the proposed semantics: >> > > >> > > - For omitted/null, we should keep existing properties unchanged. >> > > - {}, clear properties (preserving default-base-location and reserved >> > > properties as handled by PolarisAdminService.updateCatalog). >> > > - non-empty map should replace existing properties. >> > > >> > > This matches the documented contract on UpdateCatalogRequest in >> > > spec/polaris-management-service.yml ("Any fields which are required in >> > > the Catalog will remain unaltered if omitted from the contents of this >> > > Update request"), and aligns with the existing != null checks in >> > > PolarisAdminService.updateCatalog and >> > > PolarisServiceImpl.validateCatalogProperties. Unlike >> > > UpdatePrincipalRequest, UpdatePrincipalRoleRequest, and >> > > UpdateCatalogRoleRequest, where properties is marked required, >> > > UpdateCatalogRequest intentionally allows omitting properties (e.g. >> > > for storage-only updates), so distinguishing omitted/null from {} is >> > > important. >> > > >> > > One minor check: it's worth to verify that type: [object, "null"] also >> > > generates cleanly with the Python client generator >> > > (client/python/generate_clients.py), even though the CLI current >> > > passes catalog.properties.to_dict() explicitly. >> > > >> > > About nullable getProperties() in polaris-api-manangement-model, it >> > > looks acceptable to me. >> > > Setting openApiNullable=false is consistent with >> > > polaris-api-catalog-service and semantic-models, and scoping the >> > > nullable type to UpdateCatalogRequest.properties keeps all other >> > > generated models in polaris-api-management-model unchanged. >> > > >> > > Regards >> > > JB >> > > >> > > On Thu, Nov 26, 2026 at 8:06 AM Indhumathi Muthu Murugesh via dev >> > > <[email protected]> wrote: >> > > > >> > > > Hi all, >> > > > >> > > > I would like feedback on a proposed behavior change in the management >> > API, >> > > > currently outlined in PR-6204 < >> > https://github.com/apache/polaris/pull/6204/> >> > > > . >> > > > >> > > > *Problem:* >> > > > An UpdateCatalogRequest that omits properties (for example, when >> > updating >> > > > only storageConfigInfo) currently *removes all catalog properties >> > *except >> > > > default-base-location. Because the generated Java model replaces an >> > absent >> > > > properties field with an empty map, the server cannot distinguish >> > between >> > > > an omitted field and {}. Consequently, it replaces the properties with >> > an >> > > > empty map in both cases. However, the spec specifies that fields >> > required >> > > > in Catalog should "remain unaltered if omitted," and properties is a >> > > > required field. >> > > > >> > > > *Proposed Semantics (as discussed in the PR):* >> > > > >> > > > - Absent (or null): Properties remain unchanged. >> > > > - {}: Properties are cleared. >> > > > - Non-empty map: Replaces the current properties. >> > > > >> > > > With this change, only requests that omit properties will behave >> > > > differently: currently, they clear the properties, but after the >> > change, >> > > > they will preserve them. Requests sending {} or a non-empty map will >> > > > continue to behave as before. >> > > > >> > > > *Implementation Details:* >> > > > >> > > > - In polaris-management-service.yml, UpdateCatalogRequest.properties >> > is >> > > > updated to type: [object, "null"] with a description of the semantics >> > above. >> > > > - The management model generator sets openApiNullable=false (aligning >> > > > with polaris-catalog-service and semantic-models). >> > > > - No template changes are required; UpdateCatalogRequest is the only >> > > > generated class affected. >> > > > - The existing getProperties() != null check in PolarisAdminService >> > will >> > > > then work as intended. >> > > > >> > > > *Java API Impact:* >> > > > UpdateCatalogRequest.getProperties() in polaris-api-management-model >> > will >> > > > now return null when the field is omitted. In-repo readers already >> > check >> > > > for null, and an entry has been added to the Upgrade Notes in the >> > changelog. >> > > > >> > > > *Alternative Considered:* >> > > > Treating {} the same as omitted was considered, but rejected in the PR >> > > > discussion because it would leave no way to explicitly clear the >> > properties. >> > > > >> > > > *Questions for the Team:* >> > > > >> > > > 1. Are there any concerns with the proposed semantics above? >> > > > 2. Is the nullable getProperties() return value acceptable for the >> > > > published model? >> > > > >> > > > Thanks, >> > > > Indhumathi >> >
