Github user holdenk commented on a diff in the pull request:

    https://github.com/apache/spark/pull/15379#discussion_r82321597
  
    --- Diff: python/pyspark/sql/readwriter.py ---
    @@ -289,8 +289,8 @@ def text(self, paths):
             [Row(value=u'hello'), Row(value=u'this')]
             """
             if isinstance(paths, basestring):
    -            path = [paths]
    -        return 
self._df(self._jreader.text(self._spark._sc._jvm.PythonUtils.toSeq(path)))
    +            paths = [paths]
    +        return 
self._df(self._jreader.text(self._spark._sc._jvm.PythonUtils.toSeq(paths)))
    --- End diff --
    
    So I agree keeping path here kind of makes sense.
    
    Its unfortunate we didn't catch the difference in the named parameter 
difference between these reader functions back during 2.0. At this point 
changing the named parameter from paths to path we need to be a bit careful 
with incase people are using named params (if we did that we would need to add 
a version changed note and be careful). We could also have it (transitionally) 
take a kwargs work with either for a version (while updating the pydoc of 
course).


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

Reply via email to