Skip to content

[BP-2.4][FLINK-41407][docs] Fix code examples in the documentation - #29896

Merged
MartijnVisser merged 1 commit into
apache:release-2.4from
MartijnVisser:FLINK-41407-BP-2.4
Nov 12, 2026
Merged

MartijnVisser merged 1 commit into
apache:release-2.4from
MartijnVisser:FLINK-41407-BP-2.4

Conversation

@MartijnVisser

Copy link
Copy Markdown
Contributor

What is the purpose of the change

Unchanged backport of #29837.

Brief change log

Verifying this change

This change is a trivial rework / code cleanup without any test coverage.

Ran the changed examples from the English and Chinese pages against release-2.4 snapshot jars, with the same results as on master. The Hugo build passes, with no new dead anchors.

Does this pull request potentially affect one of the following parts:

  • Dependencies (does it add or upgrade a dependency): no
  • The public API, i.e., is any changed class annotated with @Public(Evolving): no (only the descriptions of two @PublicEvolving SQL Gateway options change)
  • The serializers: no
  • The runtime per-record code paths (performance sensitive): no
  • Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Kubernetes/Yarn, ZooKeeper: no
  • The S3 file system connector: no

Documentation

  • Does this pull request introduce a new feature? no
  • If yes, how is the feature documented? not applicable

Was generative AI tooling used to co-author this PR?
  • Yes (please specify the tool below)

Generated-by: Claude Code (Claude Opus 5.5)

…he#29837)

Many code examples in the docs did not compile, parse or run on master,
used deprecated APIs or removed config keys, or printed results Flink
does not return.

- Java: fix examples that do not compile and replace deprecated APIs;
  call cache() on a transformation result (FLINK-30097)
- Scala: remove the tabs that use the DataStream API removed in 2.0
- SQL: fix examples that fail to parse or validate, and terminate
  multi-statement examples
- Python: fix examples that do not run
- Config: fix examples Flink rejects or ignores, deprecated keys and
  option links, and describe batch shuffle as it works since 2.0
- SQL Gateway: name sql-gateway.session.plan-cache.enabled in the plan
  cache option descriptions
- Fix printed results that differ from real output, and render the
  Docker build commands as a code block

The same changes go into docs/content.zh, translated where the section
is already in Chinese.

Generated-by: Claude Code (Claude Opus 5.5)
(cherry picked from commit 50334ae)
@flinkbot

flinkbot commented Nov 12, 2026 •

Copy link
Copy Markdown
Collaborator

CI report:

Bot commands The @flinkbot bot supports the following commands:
  • @flinkbot run azure re-run the last Azure build

@MartijnVisser
MartijnVisser merged commit d130226 into apache:release-2.4 Nov 12, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants