itholic opened a new pull request, #38673:
URL: https://github.com/apache/spark/pull/38673
### What changes were proposed in this pull request?
This PR proposes to support `bool` type for `SparkSession.builder.config`
when building the new `SparkSession`.
### Why are the changes needed?
Currently, Python `bool` type `True` or `False` is not working correctly,
since JVM side only treat the String type of "true" or "false" as a valid
option value.
So, this PR basically fix the current behavior as below:
**Before**
```python
>>> s1 = spark.builder.config("spark.sql.pyspark.jvmStacktrace.enabled",
True).getOrCreate()
>>> s1.conf.get("spark.sql.pyspark.jvmStacktrace.enabled")
'True' # invalid value, no effect for options.
```
**After**
```python
>>> s1 = spark.builder.config("spark.sql.pyspark.jvmStacktrace.enabled",
True).getOrCreate()
>>> s1.conf.get("spark.sql.pyspark.jvmStacktrace.enabled")
'true' # the lower case "true" only valid for options.
```
### Does this PR introduce _any_ user-facing change?
No.
### How was this patch tested?
Unittest added.
--
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]