Hyukjin Kwon created SPARK-61846:
------------------------------------

             Summary: Export is_remote_only from pyspark, make the serializers 
and both ResourceProfile classes PySpark's, and give the modules the names that 
PySpark's doctests use
                 Key: SPARK-61846
                 URL: https://issues.apache.org/jira/browse/SPARK-61846
             Project: Spark
          Issue Type: Bug
          Components: Connect
    Affects Versions: connect-rust-4.4.0
            Reporter: Hyukjin Kwon


Close small gaps of the Python drop-in against pyspark-client 4.3.0:

- "from pyspark import is_remote_only" raises ImportError; upstream's 
pyspark/__init__.py imports it (and sys).
- pyspark.serializers.SpecialLengths lacks START_OF_INIT_MESSAGE (-8), which 
the vendored pyspark.messages.socket.spark_socket_message_receiver reads. 
serializers.py is otherwise upstream's file.
- pyspark.sql.connect.resource.profile.ResourceProfile is the classic 
pyspark.resource.ResourceProfile, and both take (_exec_req=None, 
_task_req=None). PySpark has two classes: 
pyspark.resource.ResourceProfile(_java_resource_profile=None, _exec_req=None, 
_task_req=None) and the connect class ResourceProfile(exec_req=None, 
task_req=None), which creates the profile on the server through 
SparkSession.client._create_profile.
- The official doctests of the Spark Connect modules take a module's namespace 
as their globals, and need names there that the drop-in's modules lack: Row, 
StructType and StorageLevel in pyspark.sql.dataframe, StorageLevel in 
pyspark.sql.catalog and pyspark.sql.connect.catalog, and sys in 
pyspark.sql.connect.functions.builtin. Importing 
pyspark.sql.connect.streaming.readwriter also has to load 
pyspark.sql.connect.readwriter, whose namespace the stream reader's doctests 
read.




--
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