[FLINK-39839][table] Supports timeout in AsyncTableFunction#28310
Open
yuchengxin wants to merge 3 commits into
Open
[FLINK-39839][table] Supports timeout in AsyncTableFunction#28310yuchengxin wants to merge 3 commits into
yuchengxin wants to merge 3 commits into
Conversation
Collaborator
fe32aff to
618a847
Compare
Co-Authored-By: Claude Code <noreply@anthropic.com> AI-Model: claude-opus-4-7 AI-Contributed/Feature: 0/0 AI-Contributed/UT: 19/19
The AsyncTableFunction section in the Chinese UDF docs was still
verbatim English even though the surrounding sections (in particular
AsyncScalarFunction directly above) had already been translated. Bring
this section in line by translating the prose, headings, and inline
code comments while preserving every {{< ref >}} shortcode and Java
identifier. The Chinese phrasing is reworked into idiomatic Chinese
rather than a word-for-word rendering, keeping the technical meaning
identical to the English original.
Co-Authored-By: Claude Code <noreply@anthropic.com>
AI-Model: claude-opus-4-7
AI-Contributed/Feature: 32/32
AI-Contributed/UT: 0/0
…Function
The new "Custom Timeout Handling" subsection covers:
- when the handler is invoked vs. the default TimeoutException;
- the required signature parity with eval(), and how overloads are
resolved;
- the synchronous-completion requirement enforced by codegen
(future.isDone() check after the call), and why issuing another
async call or spawning a thread inside the handler is unsafe;
- exception transparency (sync throws are forwarded);
- the framework guarantees on top of the convention: missing handler
falls back to TimeoutException, incompatible signatures fail fast
at planning with a ValidationException, and emptyList() drops the
row for an INNER lookup join while padding NULL for a LEFT OUTER
lookup join;
- a worked example mirroring the BackgroundFunction sample directly
above.
Both EN and ZH copies of the section receive the same content; the
Chinese version is rewritten in idiomatic Chinese rather than translated
literally.
Co-Authored-By: Claude Code <noreply@anthropic.com>
AI-Model: claude-opus-4-7
AI-Contributed/Feature: 99/99
AI-Contributed/UT: 0/0
a8ae168 to
d5e1117
Compare
Contributor
Author
|
@flinkbot run azure |
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.
What is the purpose of the change
This pull request introduces a user-defined timeout handler for AsyncTableFunction. When an async invocation exceeds the configured timeout, the framework now dispatches to a matching
timeout method on the function so users can return a fallback row or surface a domain-specific exception, instead of unconditionally failing the record (or the job) with the default
TimeoutException. The mechanism is wired through both call sites that consume AsyncTableFunction today — async lookup join and async correlate (table-function lateral join).
Brief change log
empty-collection fallback semantics).
generic type as eval, remaining params are lookup keys with the same types and order) are checked at registration time.
short-circuits with IllegalStateException), and propagates synchronous exceptions to the downstream ResultFuture.
Verifying this change
This change added tests and can be verified as follows:
etc.).
multiple eval/timeout pairs.
path for both lookup join (INNER and LEFT OUTER) and async correlate, asserting that fallback rows, NULL-padded rows and user-thrown exceptions surface as documented.
Does this pull request potentially affect one of the following parts:
without a timeout method are unaffected)
timed-out record)
Documentation
docs for AsyncTableFunction lookup-join timeouts can be added in a follow-up doc-only commit if the reviewers prefer.
Was generative AI tooling used to co-author this PR?
Generated-by: Claude Code (claude-opus-4-7)