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

   ### What changes were proposed in this pull request?
   
   Restores the `ExternalType` variant to the `DataType` `oneOf` in 
`docs/open-api/datatype.yaml`:
   
   - moves the schema under `components.schemas` (it was misnested one level 
higher, so it wasn't a real schema);
   - fixes its example, which used a nonexistent `externalType` key instead of 
the actual `catalogString`;
   - adds `- $ref: "#/components/schemas/ExternalType"` to the `DataType` 
`oneOf`.
   
   ### Why are the changes needed?
   
   `ExternalType` is a real wire type, not internal-only. The server serializes 
it and reads it back:
   
   - `Types.ExternalType` → `Name.EXTERNAL` (`api/.../rel/types/Types.java`)
   - `writeExternalType` emits `{"type": "external", "catalogString": "..."}` 
and `readExternalType` parses it back (`common/.../json/JsonUtils.java`)
   
   It appears on the **read path** whenever a column's type originates from an 
external catalog (a `Column.type` in a table-load response is a `DataType`). 
Because the spec omitted it from the `DataType` union, this is a codegen gap 
**invisible to the linter**: a strict typed client (e.g. `progenitor`) cannot 
deserialize a table containing an external-typed column, since `external` is 
not a known `DataType` variant.
   
   `ExternalType`'s sibling fallback `UnparsedType` is already in the union — 
this simply restores the one that was dropped. The `recommended-strict` error 
count is unchanged, confirming the defect was never lint-visible.
   
   Part of #11985
   
   ### Does this PR introduce _any_ user-facing change?
   
   The `DataType` schema now documents the `external` variant it could already 
return, so generated clients and the rendered API docs cover a response shape 
the server already produces. No server behavior change; clients do not send 
external types (they arise from external catalogs on read).
   
   ### How was this patch tested?
   
   - `redocly lint --extends=recommended-strict` — error count unchanged (10 on 
this branch), no new findings.
   - `redocly bundle` — the bundled `DataType.oneOf` now contains 7 variants 
including `ExternalType`, defined under `components.schemas`, with a valid 
`catalogString` example.
   


-- 
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