[doc] Document the Python memory value contract and its divergence from Java#840
Merged
Conversation
…om Java Python memory values cross the Pemja boundary into Flink state, so only recursively checkpoint-stable values survive checkpoint/restore. The docs previously advertised Java POJO/Kryo support for Python and showed an example storing a Pydantic model. Split "Supported Value Types" into a Java contract (primitives, collections, POJOs, Kryo, MemoryObject) and a Python contract (None/bool/int/float/str, list, dict[str, ...], nested MemoryObject), name the rejected Python types, note bytes is not yet supported, and show the materialize-on-write / reconstruct-on-read pattern. The Java tab is unchanged. Follows apache#839, which added the set()-time validator that enforces this Python contract. This closes part of apache#723.
1 task
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: #723
Purpose of change
Document the Python memory value contract and why it diverges from Java. The docs previously told Python users they could store Java POJOs and Kryo "general class types" and showed an example storing a Pydantic model — but Python memory values cross the Pemja boundary into Flink state, so only recursively checkpoint-stable values survive checkpoint/restore.
This splits the "Supported Value Types" section into a Java contract (broad: primitives, collections, POJOs, Kryo,
MemoryObject) and a Python contract (None,bool,int,float,str,list,dictwithstrkeys, and nestedMemoryObject), names the rejected Python types, notes thatbytesis not yet supported, and shows the materialize-on-write / reconstruct-on-read pattern (model.model_dump(mode="json")↔Model.model_validate(...)). The Java tab and examples are unchanged.This follows up #839, which added the
set()-time validator that enforces this Python contract. It should merge after #839.Tests
Documentation only; no code change.
API
No API change.
Documentation
doc-neededdoc-not-neededdoc-included