ddebowczyk92 opened a new pull request, #41616:
URL: https://github.com/apache/beam/pull/41616

   Follow-up to https://github.com/apache/beam/pull/41158.
   
   Flink's heap and batch keyed state backends back `MapState` with a Java 
`Map`, so `FlinkMapState` and `FlinkSetState` compared keys by `Object#equals` 
instead of their encoded value (failing for coders where 
`!consistentWithEquals()`, such as `byte[]` or reflect `AvroCoder` POJOs), and 
rejected `null` keys with `NullableCoder`.
   
   Wrap map keys and set elements in a `StructuralKey` backed by 
`Coder#structuralValue` when `!coder.consistentWithEquals() || coder instanceof 
NullableCoder` (including in `EarlyBinder`). Coders that are already 
`consistentWithEquals()` store raw keys unchanged to preserve savepoint 
compatibility.
   
   <!--
   
   Thank you for your contribution! Follow this checklist to help us 
incorporate your contribution quickly and easily:
   
    - [ ] If this contribution is large, please file an Apache [Individual 
Contributor License Agreement](https://www.apache.org/licenses/icla.pdf).
    - [ ] Replace these instructions with a description of your change and why 
you have made it.
    - [ ] Mention the appropriate issue in your description (for example: 
`addresses #123` or `fixes #456`).
    - [ ] Update `CHANGES.md` with noteworthy changes.
   
   See [CONTRIBUTING.md]() for more details.
   
   -->
   


-- 
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]

  • [PR] [Flink] Use Coder#structu... ddebowczyk92 (via GitHub) via github

Reply via email to