wzhero1 opened a new pull request, #800:
URL: https://github.com/apache/flink-agents/pull/800
## What
Polish `docs/content/docs/development/integrate_with_flink.md` per #777
(found
during integrate_with_flink doc verification, #743).
- **Overview grammar**: "By integrate agent with flink ..." → "By integrating
agents with Flink DataStream/Table".
- **Self-contained snippets** (Python + Java, DataStream + Table): replace
bare
`from_source(...)` / `fromSource(...)` / `from_elements(...)` /
`fromValues(...)`
with concrete calls; define `YourPojo` (a valid Flink POJO),
`MyKeySelector`,
and `RowKeySelector`; add the missing imports; and link each section to a
runnable quickstart example.
- **Java "always nested row" comment**: corrected — the agent output is
exposed
as a single anonymous column `f0`; declare `f0` with the agent's output
type
(scalar for scalar output, nested `ROW(...)` only for composite). Matches
the
flat `column("f0", DataTypes.STRING())` in
`FlinkIntegrationTest.testFromTableToTable`.
- **Python vs Java column naming**: documented the difference — Python names
output columns via the `RowTypeInfo` field names passed to `to_table()`,
while
Java's `toTable(Schema)` wraps the agent output as a single `f0` column
(it calls `fromDataStream(DataStream<Object>, schema)` internally).
## Test plan
- [x] Both Java snippets compile against Flink 2.2.0 (JDK 11), `javac` clean.
- [x] Python snippets `py_compile` clean; `MyKeySelector()`, the
`ExternalTypeInfo(RowTypeInfo(...))`
and `Schema...build()` constructors run on pyflink 2.2.1 (output_type
↔ schema consistent).
- [x] All four linked example files exist; no bare `(...)` left in
executable code.
- [x] Hugo docs-site renders clean (no shortcode leaks; tabs + both code
blocks + hint + links verified).
Closes #777
--
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]