[Feature] Render a flat RowTypeInfo output schema as JSON Schema

Aperta
#1,256 2 commenti 0 reazioni 1 assegnatario Vedi su GitHub

I maintainer di solito rispondono entro 2 giorni

@sangkyoonnam ci sta già lavorando.

Dal 16/10/2026.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
35/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
java, python
Ambito
ai, api

Direzione di ricerca

Start at BaseChatModelConnection.chat in the Java connections, where the Javadoc describes skipping a RowTypeInfo schema, and compare the Python path that takes a pydantic model. Trace where the prompt uses the type's toString() or str() form, since that is the part to replace with a JSON Schema object. Done means a flat RowTypeInfo renders as a schema with all fields required and additionalProperties false in both languages, and the guide and Javadoc match. Nested or non-basic types must keep today's behavior.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

feature priority/major
Search before asking
  • I searched in the issues and found nothing similar.
Description

@wenjin272 suggested this on #1129.

A RowTypeInfo output schema never gets native structured output today:

  • The native connections accept only a POJO class (Java) or a pydantic model (Python), so they skip a RowTypeInfo.
  • The prompt path describes the schema with the type's string form (toString() in Java, str() in Python), not JSON Schema.
  • The Java BaseChatModelConnection.chat Javadoc calls the skip a permanent fallback.

Proposal: render a flat RowTypeInfo (basic field types only) as a JSON Schema object, in both languages:

  • every field required
  • additionalProperties: false

Use it in two steps:

  1. In the prompt, in place of the string form.
  2. As the native schema, so AUTO and NATIVE work for a RowTypeInfo. The connections currently take a class, so this step needs them to accept a schema document as well.

A nested or non-basic RowTypeInfo keeps today's behavior. The guide and the Javadoc above are updated to match.

Are you willing to submit a PR?
  • I'm willing to submit a PR!
Lingua principale
Java
Stelle
497
Fork
193
Merge medio
2g 21h
PR unite (30g)
68

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di apache/flink-agents

Tutte le issue di apache/flink-agents

Issue simili

Altre issue su Java

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.