nchammas opened a new pull request #34606: URL: https://github.com/apache/spark/pull/34606
### What changes were proposed in this pull request? https://github.com/apache/spark/blob/2fe9af8b2b91d0a46782dd6fff57eca8609be105/python/pyspark/ml/common.py#L99 `_java2py()` uses a deprecated method to create a SparkSession. This triggers a warning: https://github.com/apache/spark/blob/007afbbde9b128fc22c133035ad52239943a7290/python/pyspark/sql/context.py#L162-L165 This PR updates `_java2py()` so it creates a SparkSession using the builder. ### Why are the changes needed? Non-deprecated internal methods should not invoke deprecated methods that trigger user-visible warnings. ### Does this PR introduce _any_ user-facing change? Yes, this PR eliminates a user-facing deprecation warning, e.g. when invoking ML methods. ### How was this patch tested? Manual testing. -- 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]
