jerryshao opened a new pull request, #14967:
URL: https://github.com/apache/gravitino/pull/14967

   ### What changes were proposed in this pull request?
   
   - `Domain#listMembers` / `GET /api/metalakes/{m}/domains/{d}/objects` now 
return, by default, the objects that directly carry the backing tag of the 
domain or a visible subdomain: leaves, catalogs and schemas. A tagged catalog 
or schema is returned once; its type tells clients it includes its children. 
Relations are `DIRECT` (own assignment) or `VIA_SUBDOMAIN` (a visible 
subdomain's assignment), with no per-leaf effective-tag resolution.
   - Add an `expand` option (REST `expand=true`, 
`DomainMemberFilter.Builder#withExpand`, Python 
`DomainMemberFilter(expand=True)`, MCP `list_domain_members(expand=...)`) that 
keeps the previous behavior: expand catalogs and schemas into recorded leaves 
with `DIRECT` / `INHERITED` / `VIA_SUBDOMAIN` relations.
   - Add `DomainMember.CONTAINER_TYPES` (`CATALOG`, `SCHEMA`). The `types` 
filter accepts them without `expand` and rejects them with `expand`. 
`SUPPORTED_TYPES` and object-to-domain lookup stay leaf-only.
   - Update the docs and the OpenAPI spec.
   
   ### Why are the changes needed?
   
   Expanding every tagged catalog and schema into leaves and resolving 
effective tags for each leaf is slow on large catalogs. Callers that only need 
to know what is tagged into a domain now get the tagged objects directly. Leaf 
expansion remains available with `expand=true`.
   
   Fix: #14966
   
   ### Does this PR introduce _any_ user-facing change?
   
   Yes. The default member listing returns direct assignments, including 
catalogs and schemas, without `INHERITED` relations. Pass `expand=true` for the 
previous leaf expansion. New: REST `expand` query parameter, 
`DomainMemberFilter#expand`, `DomainMember.CONTAINER_TYPES`, Python `expand`, 
MCP `expand`.
   
   ### How was this patch tested?
   
   - Unit tests for the resolver in both modes (tagged catalog, tagged schema, 
directly tagged leaf, subdomain assignment, valued binding, filters), the 
filter, REST, authorization filtering of catalog and schema members (including 
a hidden subdomain), the Java and Python clients, and the MCP tool.
   - `TestDomainManager` covers both modes against the H2 store.
   - `DomainIT` and the Python integration test check the default mode and opt 
into `expand` for inheritance cases.
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to