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

Reply via email to