junmuz opened a new pull request, #29531:
URL: https://github.com/apache/flink/pull/29531
## What is the purpose of the change
Fixes FLINK-41040. When the State Processing API encounters BinaryRowData,
StateValueConverter fails with an error
`UnsupportedOperationException: Cannot access field by either public member
or getter function: f0`
## Brief change log
• Add a conversion path for RowData using field getters derived from the
target RowType.
• Cache field getters per row type in a transient, lazily initialized
cache.
• Copy fields into a fresh GenericRowData with RowKind.INSERT, preserving
nulls and filling missing fields with null.
• Add five regression tests covering binary rows and existing generic-row
conversion behavior.
## Verifying this change
Added StateValueConverterTest covering binary state keys, composite binary
rows containing boolean and timestamp fields, null fields, nested binary rows,
and generic-row normalization with missing fields.
### Validation performed:
• Compiled the converter and tests with Java 17 using --release 11.
• Ran the five tests directly through JUnit 5 using existing Flink build
artifacts: four fail against the original converter, and all five pass with the
fix.
• Manually verified by running against a state containing BinaryRowData
## 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): yes, limited
to State Processing API row conversion; field getters are cached per row type.
- 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?
- [x] Yes (please specify the tool below)
Generated-by: Codex (GPT-6)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]