gbloisi-openaire opened a new pull request, #42913:
URL: https://github.com/apache/spark/pull/42913

   ### What changes were proposed in this pull request?
   This PR re-enables Encoders.bean to be called against beans having read-only 
properties, that is properties that have only getters and no setter method. 
Beans with read only properties are even used in internal tests.
   Setter methods of a Java bean encoder are stored within an Option wrapper 
because they are missing in case of read-only properties. When a java bean has 
to be initialized, setter methods for the bean properties have to be called: 
this PR filters out read-only properties from that process.
   
   ### Why are the changes needed?
   The changes are required to avoid an exception to the thrown by getting the 
value of a None option object.
   
   ### Does this PR introduce _any_ user-facing change?
   No
   
   ### How was this patch tested?
   An additional regression test has been added
   
   ### Was this patch authored or co-authored using generative AI tooling?
   No
   
   @hvanhovell this is 3.4 branch port of 
[PR-42829](https://github.com/apache/spark/pull/42829)


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


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

Reply via email to