[SPARK-49978][R]Move sparkR deprecation warning to package attach time #48482
+31
−6
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What changes were proposed in this pull request?
Previously, the output deprecation warning happens in the
spark.sessionfunction, in this PR, we move it to the.onAttachfunction so it will be triggered whenever library is attachedWhy are the changes needed?
I believe having the warning message on attach time have the following benefits:
sparkR.sessionfunction, it is more intuitive for the warning to show up on attach time instead of waiting til later timesparkR.sessionis called, but the new warning message will only show up once even if user run multiplelibrary/requirecommandsDoes this PR introduce any user-facing change?
Yes
library/requirefunction)How was this patch tested?
Just a simple migration change, will rely on existing pre/post-merge check, and this existing test
Also did manual testing(see previous section for screenshot)
Was this patch authored or co-authored using generative AI tooling?
No