You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "nija-at (via GitHub)" <gi...@apache.org> on 2024/03/25 13:52:03 UTC

[PR] [SPARK-47544][PYSPARK] SparkSession builder method is incompatible with vs code intellisense [spark]

nija-at opened a new pull request, #45700:
URL: https://github.com/apache/spark/pull/45700

   ### What changes were proposed in this pull request?
   
   VS Code's intellisense is unable to detect the methods and properties of
   `SparkSession.builder`. A video is worth a thousand words:
   [video](https://github.com/apache/spark/assets/16217941/e611e7e7-8760-4d9f-aa6c-9d4bd519d516).
   
   Adjust the implementation for better compatibility with the IDE.
   
   ### Why are the changes needed?
   
   Compatibility with IDE tooling.
   
   ### Does this PR introduce _any_ user-facing change?
   
   No.
   
   ### How was this patch tested?
   
   Built the wheel file locally and tested on local IDE.
   See the 
   [video](https://github.com/apache/spark/assets/16217941/429b06dd-44a7-4d13-a551-c2b72c326c1e)
   whilst using vs code.
   
   Confirmed the same works for Pycharm.
   
   Further confirmed that the Pydocs for these methods are unaffected.
   
   ### Was this patch authored or co-authored using generative AI tooling?
   
   No.
   


-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Re: [PR] [SPARK-47544][PYTHON] SparkSession builder method is incompatible with visual studio code intellisense [spark]

Posted by "HyukjinKwon (via GitHub)" <gi...@apache.org>.
HyukjinKwon commented on PR #45700:
URL: https://github.com/apache/spark/pull/45700#issuecomment-2019247226

   Let's fix up the linter though:
   
   ```
   python/pyspark/sql/session.py:502: error: Incompatible return value type (got "pyspark.sql.connect.session.SparkSession", expected "pyspark.sql.session.SparkSession")  [return-value]
   python/pyspark/sql/session.py:507: error: Incompatible return value type (got "pyspark.sql.connect.session.SparkSession", expected "pyspark.sql.session.SparkSession")  [return-value]
   python/pyspark/sql/session.py:563: error: Incompatible return value type (got "pyspark.sql.connect.session.SparkSession", expected "pyspark.sql.session.SparkSession")  [return-value]
   python/pyspark/sql/session.py:581: error: Incompatible types in assignment (expression has type "classproperty", variable has type "Builder")  [assignment]
   python/pyspark/sql/connect/session.py:240: error: Incompatible types in assignment (expression has type "classproperty", variable has type "Builder")  [assignment]
   Found 5 errors in 2 files (checked 991 source files)
   ```


-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Re: [PR] [SPARK-47544][PYTHON] SparkSession builder method is incompatible with visual studio code intellisense [spark]

Posted by "dongjoon-hyun (via GitHub)" <gi...@apache.org>.
dongjoon-hyun closed pull request #45700: [SPARK-47544][PYTHON] SparkSession builder method is incompatible with visual studio code intellisense
URL: https://github.com/apache/spark/pull/45700


-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org