[docs] Polish integrate_with_flink doc: self-contained snippets and language-scoped notes#800
Merged
wenjin272 merged 1 commit intoJun 8, 2026
Conversation
…anguage-scoped notes - Fix Overview grammar: "By integrating agents with Flink DataStream/Table". - Make the Python/Java DataStream and Table snippets self-contained: define YourPojo / MyKeySelector / RowKeySelector, replace bare "..." sources with concrete calls, add the real imports, and link to runnable examples. - Correct the misleading Java "always a nested row" comment: the agent output is exposed as a single anonymous column f0; nest as ROW only for composite output (matches FlinkIntegrationTest.testFromTableToTable's flat f0 STRING). - Document the Python/Java output-column naming difference (named RowTypeInfo fields vs the Java f0 default). Closes apache#777
96ce94d to
bb65aaa
Compare
wenjin272
approved these changes
Jun 8, 2026
wenjin272
left a comment
Contributor
There was a problem hiding this comment.
LGTM.
Regarding point four in #777, I believe we should reconsider the API design in the next release to align the Python and Java implementations and improve usability as much as possible. However, for version 0.3, providing a clear explanation in the documentation should be sufficient.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Linked issue: #777
Purpose of change
Doc-quality follow-ups for
docs/content/docs/development/integrate_with_flink.md, found during integrate_with_flink doc verification (#743):Flink).from_source(...)/fromSource(...)/from_elements(...)/fromValues(...)ellipses with concrete calls; defineYourPojo(a valid Flink POJO),MyKeySelector, andRowKeySelector; add the missing imports (ExternalTypeInfo,RowTypeInfo,BasicTypeInfo,Schema,DataTypes,KeySelector, ...); and link each section to a runnable quickstart example.f0; declaref0with the agent's output type (a scalar type for scalar output, a nestedROW(...)only for composite output). Matches the flatcolumn("f0", DataTypes.STRING())inFlinkIntegrationTest.testFromTableToTable.RowTypeInfofield names passed toto_table(), while Java'stoTable(Schema)exposes the agent output as a singlef0column (it callsfromDataStream(DataStream<Object>, schema)internally).Tests
Documentation-only change; no runtime impact. Verified manually:
javacclean; the POJO/KeySelector helpers as static nested classes, the pipeline fragments as methods).py_compileclean;MyKeySelector(),ExternalTypeInfo(RowTypeInfo([...], ["result"])), andSchema.new_builder().column("result", DataTypes.INT()).build()constructed on pyflink 2.2.1 (output_type↔schemaconsistent); imports run-checked in the venv.(...)left in executable code.API
No public API changes.
Documentation
doc-neededdoc-not-neededdoc-includedCloses #777