Closed benedeki closed 1 year ago
Bonus
Please change the signature of the method register
to return True
if the actual registration happened or False
if it has happened in an earlier call.
(I think it's such a small change, no point creating a dedicated ticket to it)
Background
Currently
OnlyOncePerSparkSession
can be instantiated only when provided withSparkSession
. This turns out to be limiting for classes that needs to be created before Spark is available.Feature
register
method public, while keeping the feature that actual registration happens only once perSparkSession
Up to consideration if to make the
SparkSession
parameter of the old constructor explicit, to avoid confusion when the (auto-) registration happened and when not. On the other hand that would create a breaking change for all current users.