[hotfix][runtime] Reject raw bytes from PyFlink inputs - #1075
Merged
wenjin272 merged 1 commit intoAug 31, 2026
Conversation
Validate PyFlink value type information before building the agent operator so only the supported pickled representation reaches Python deserialization. Add regression coverage for pickled, explicit, and malformed input types. Generated-by: OpenAI Codex 0.144.5 (GPT-5) Co-authored-by: Codex <codex@openai.com>
This was referenced Aug 31, 2026
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: N/A (hotfix)
Purpose of change
Python agent execution expects input values to use PyFlink's default pickle representation, but this contract was not enforced at the Java bridge. As a result, explicitly typed inputs could reach the bridge in an unsupported representation.
This change validates the PyFlink keyed-stream input type before constructing the agent operator. It accepts values described by
PickledByteArrayTypeInfoand rejects raw byte-array and other explicitly typed values with an actionable error. The Row-field validation is shared by the existing key check and the newvalue check.
Tests
mvn --batch-mode --no-transfer-progress -pl runtime -am testPrimitiveArrayTypeInfo, while default Python objects usePickledByteArrayTypeInfo.git diff --checkAPI
No public APIs are changed. Unsupported raw byte-array inputs now fail early with guidance to convert them through a Python operator using the default pickle output type.
Documentation
doc-neededdoc-not-neededdoc-includedWas this patch authored or co-authored using generative AI tooling?
Generated-by: OpenAI Codex 0.144.5 (GPT-5)