Skip to content

[FLINK-40289][docs] Clarify watermark requirements in Window Top-N examples - #28874

Open
ipsyer wants to merge 1 commit into
apache:masterfrom
ipsyer:agent/flink-40289-window-topn-watermark
Open

[FLINK-40289][docs] Clarify watermark requirements in Window Top-N examples#28874
ipsyer wants to merge 1 commit into
apache:masterfrom
ipsyer:agent/flink-40289-window-topn-watermark

Conversation

@ipsyer

@ipsyer ipsyer commented Aug 2, 2026

Copy link
Copy Markdown

What is the purpose of the change

The Window Top-N examples display final results for two tumbling windows, but the example input does not advance the watermark far enough to close the second window in unbounded streaming mode.

With the documented watermark strategy, the maximum event timestamp 08:17 produces a watermark of approximately 08:16:59. Therefore, the [08:10, 08:20) window remains open, and its final Window Top-N result is not emitted.

This change clarifies the execution conditions required to reproduce the displayed results.

JIRA: https://issues.apache.org/jira/browse/FLINK-40289

Brief change log

  • Add an informational note after the Window Top-N SQL example.
  • Explain that bounded input closes the remaining windows at the end of input.
  • Explain that unbounded streaming input requires subsequent records to advance the watermark past the window end.
  • Apply the same clarification to the English and Chinese documentation.
  • Keep the existing SQL examples and result tables unchanged.
  • A follow-up backport to release-1.20 will be submitted separately.

Verifying this change

This is a documentation-only change. No tests were added.

The watermark behavior was manually verified using the documented input:

  • The maximum event timestamp is 2020-04-15 08:17:00.000.
  • With a one-second watermark delay, the watermark reaches approximately 2020-04-15 08:16:59.000.
  • The [08:00, 08:10) window closes.
  • The [08:10, 08:20) window remains open in unbounded streaming mode unless subsequent records advance the watermark past its end.
  • The information blocks are placed outside the SQL code fences in both the English and Chinese documentation.

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
  • The serializers: no
  • The runtime per-record code paths (performance sensitive): no
  • Anything that affects deployment or recovery: 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; this PR clarifies existing documentation

Was generative AI tooling used to co-author this PR?
  • Yes (OpenAI Codex)

Generated-by: OpenAI Codex

@flinkbot

flinkbot commented Aug 2, 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

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