zero323 commented on a change in pull request #34151:
URL: https://github.com/apache/spark/pull/34151#discussion_r720408924
##########
File path: python/pyspark/sql/context.py
##########
@@ -72,20 +91,25 @@ class SQLContext(object):
_instantiatedContext = None
- def __init__(self, sparkContext, sparkSession=None, jsqlContext=None):
+ def __init__(
+ self,
+ sparkContext: SparkContext,
+ sparkSession: Optional[SparkSession] = None,
+ jsqlContext: Optional[JavaObject] = None
+ ) -> None:
if sparkSession is None:
warnings.warn(
"Deprecated in 3.0.0. Use SparkSession.builder.getOrCreate()
instead.",
FutureWarning
)
self._sc = sparkContext
- self._jsc = self._sc._jsc
- self._jvm = self._sc._jvm
+ self._jsc = self._sc._jsc # type: ignore[attr-defined]
+ self._jvm = self._sc._jvm # type: ignore[attr-defined]
Review comment:
Should we add a note, that these could be removed, once `SparkContext`
is inlined?
--
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]