Github user yjshen commented on a diff in the pull request:
https://github.com/apache/spark/pull/7926#discussion_r36268013
--- Diff: python/pyspark/sql/readwriter.py ---
@@ -77,7 +77,7 @@ def schema(self, schema):
def option(self, key, value):
"""Adds an input option for the underlying data source.
"""
- self._jreader = self._jreader.option(key, value)
+ self._jreader = self._jreader.option(key, str(value).lower())
--- End diff --
Can I do this way? Above the definition of `class DataFrameReader(object):`
```python
def to_str(value):
"""
A wrapper over str(), but convert bool values to lower case string
"""
if isinstance(value, bool):
return str(value).lower()
else:
return str(value)
```
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]