HyukjinKwon opened a new pull request, #46295:
URL: https://github.com/apache/spark/pull/46295

   ### What changes were proposed in this pull request?
   
   This PR proposes to warn that `samplingRatio` and `verifySchema` are not 
supported with Spark Connect.
   
   ### Why are the changes needed?
   
   For better compatibility in Spark Connect.
   
   ### Does this PR introduce _any_ user-facing change?
   
   Yes, it shows a warning to the end users when they use those. For now, it 
complains that there's no such argument that `createDataFrame` can take.
   
   ### How was this patch tested?
   
   Manually tested as below:
   
   ```bash
   bin/pyspark --remote local
   ```
   
   ```python
   >>> spark.createDataFrame([1,2,3], samplingRatio=0.5)
   /.../pyspark/sql/connect/session.py:416: UserWarning: 'samplingRatio' is 
ignored. It is not supported with Spark Connect.
     warnings.warn("'samplingRatio' is ignored. It is not supported with Spark 
Connect.")
   DataFrame[_1: bigint]
   >>> spark.createDataFrame([1,2,3], verifySchema=True)
   /.../pyspark/sql/connect/session.py:419: UserWarning: 'verifySchema' is 
ignored. It is not supported with Spark Connect.
     warnings.warn("'verifySchema' is ignored. It is not supported with Spark 
Connect.")
   DataFrame[_1: bigint]
   >>> spark.createDataFrame([1,2,3])
   DataFrame[_1: bigint]
   ```
   
   ### 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-unsubscr...@spark.apache.org

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


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

Reply via email to