hvanhovell opened a new pull request #28223: [SPARK-31450][SQL] Make 
ExpressionEncoder thread-safe
URL: https://github.com/apache/spark/pull/28223
 
 
   ### What changes were proposed in this pull request?
   This PR moves the `ExpressionEncoder.toRow` and `ExpressionEncoder.fromRow` 
functions into their own function objects(`ExpressionEncoder.Serializer` & 
`ExpressionEncoder.Deserializer`). This effectively makes the 
`ExpressionEncoder` stateless, thread-safe and (more) reusable. The function 
objects are not thread safe, however they are documented as such and should be 
used in a more limited scope (making it easier to reason about thread safety).
   
   ### Why are the changes needed?
   ExpressionEncoders are not thread-safe. We had various (nasty) bugs because 
of this.
   
   ### Does this PR introduce any user-facing change?
   No.
   
   ### How was this patch tested?
   Existing tests.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to