srowen opened a new pull request #31461:
URL: https://github.com/apache/spark/pull/31461


   ### What changes were proposed in this pull request?
   
   UserDefinedType and UDTRegistration become public Developer APIs, not 
package-private to Spark.
   
   ### Why are the changes needed?
   
   This proposes to simply open up the UserDefinedType class as a developer 
API. It was public in 1.x, but closed in 2.x for some possible redesign that 
does not seem to have happened.
   
   Other libraries have managed to define UDTs anyway by inserting shims into 
the Spark namespace, and this evidently has worked OK. But package isolation in 
Java 9+ breaks this.
   
   The logic here is mostly: this is de facto a stable API, so can at least be 
open to developers with the usual caveats about developer APIs.
   
   Open questions:
   
   - Is there in fact some important redesign that's needed before opening it? 
The comment to this effect is from 2016
   - Is this all that needs to be opened up? Like PythonUserDefinedType?
   - Should any of this be kept package-private?
   
   This was first proposed in https://github.com/apache/spark/pull/16478 though 
it was a larger change, but, the other API issues it was fixing seem to have 
been addressed already (e.g. no need to return internal Spark types). It was 
never really reviewed.
   
   My hunch is that there isn't much downside, and some upside, to just opening 
this as-is now.
   
   
   ### Does this PR introduce _any_ user-facing change?
   
   UserDefinedType becomes visible to developers to subclass.
   
   ### How was this patch tested?
   
   Existing tests; there is no change to the existing logic.


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



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

Reply via email to