You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2020/02/13 20:02:45 UTC
[GitHub] [spark] DavidToneian commented on a change in pull request #27553:
[PYSPARK][DOCS] [MINOR]Changed `:func:` to `:attr:` Sphinx roles,
fixed links in documentation of `Data{Frame, Stream}{Reader, Writer}`.
DavidToneian commented on a change in pull request #27553: [PYSPARK][DOCS] [MINOR]Changed `:func:` to `:attr:` Sphinx roles, fixed links in documentation of `Data{Frame,Stream}{Reader,Writer}`.
URL: https://github.com/apache/spark/pull/27553#discussion_r379089002
##########
File path: python/pyspark/sql/readwriter.py
##########
@@ -616,7 +616,7 @@ def jdbc(self, url, table, column=None, lowerBound=None, upperBound=None, numPar
class DataFrameWriter(OptionUtils):
"""
Interface used to write a :class:`DataFrame` to external storage systems
- (e.g. file systems, key-value stores, etc). Use :func:`DataFrame.write`
+ (e.g. file systems, key-value stores, etc). Use :attr:`DataFrame.write`
Review comment:
`DataFrame.write` is defined as a function decorated with `@property`, and as such behaves as an attribute, rather than a function. Indeed, one needs to write e.g. `df.write.saveAsTable('foo')` rather than `df.write().saveAsTable('foo')`; the latter will not work.
Changing `func` to `attr` makes Sphinx render `DataFrame.write` correctly, instead of misleadingly rendering `DataFrame.write()` in the documentation.
I've double-checked the resulting documentation, looks fine to me.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org