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

    https://github.com/apache/spark/pull/17077#discussion_r110542103
  
    --- Diff: python/pyspark/sql/readwriter.py ---
    @@ -545,6 +545,57 @@ def partitionBy(self, *cols):
             self._jwrite = self._jwrite.partitionBy(_to_seq(self._spark._sc, 
cols))
             return self
     
    +    @since(2.2)
    +    def bucketBy(self, numBuckets, *cols):
    +        """Buckets the output by the given columns on the file system.
    --- End diff --
    
    Regarding style I had  a similar exchange with @jkbradley lately 
(https://github.com/apache/spark/pull/17218#pullrequestreview-29059063).  If a 
single convention is desired a believe it should be documented and the 
remaining docstrings should be adjusted. Personally I am indifferent thought 
PEP 8 and PEP 257 seem to prefer this convention over placing opening quotes in 
a separate line.
    
    >  you might just want to copy that.
    
    Do you mean 
[this](https://github.com/apache/spark/blob/364b0db75308ddd346b4ab1e032680e8eb4c1753/sql/core/src/main/scala/org/apache/spark/sql/DataFrameWriter.scala#L183-L186)?
 I wonder if should rather document that it is allowed only with `saveAsTable`. 
What do you think?
    
     


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