Hyukjin Kwon created SPARK-61769:
------------------------------------

             Summary: Make pyspark.sql.SparkSession PySpark's classic class, 
the builder of the Connect session PySpark Connect's, and the Connect functions 
of their own modules, as in PySpark
                 Key: SPARK-61769
                 URL: https://issues.apache.org/jira/browse/SPARK-61769
             Project: Spark
          Issue Type: Improvement
          Components: Connect
    Affects Versions: connect-rust-4.3.0
            Reporter: Hyukjin Kwon


In the drop-in, pyspark.sql.SparkSession is the native class of the Connect 
session, so isinstance(spark, pyspark.sql.SparkSession) is True and 
SparkSession.builder.getOrCreate() without a URL returns the active session, 
where PySpark 4.3.0 gives False and raises CONNECT_URL_NOT_SET. This makes 
pyspark.sql.SparkSession PySpark's classic class (Apache Spark's 
pyspark/sql/session.py as it is), whose builder makes the session with the 
builder of pyspark.sql.connect.session.SparkSession, which becomes PySpark 
Connect's (no SPARK_REMOTE, SESSION_NEED_CONN_STR_OR_BUILDER, 
remote(location)). It also gives the functions of pyspark.sql.connect.functions 
and the class of cogroup their pyspark.sql.connect modules, and ships PySpark's 
py.typed and typing stubs.



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

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

Reply via email to