viirya commented on a change in pull request #34774:
URL: https://github.com/apache/spark/pull/34774#discussion_r760887767
##########
File path: python/pyspark/sql/session.py
##########
@@ -915,23 +916,100 @@ def prepare(obj):
df._schema = struct
return df
- def sql(self, sqlQuery: str) -> DataFrame:
+ def sql(self, sqlQuery: str, **kwargs: Any) -> DataFrame:
"""Returns a :class:`DataFrame` representing the result of the given
query.
+ When ``kwargs`` is specified, this method formats the given string by
using the Python
+ standard formatter.
.. versionadded:: 2.0.0
+ Parameters
+ ----------
+ sqlQuery : str
+ SQL query string.
+ kwargs : dict
+ Other variables that the user want to set that can be referenced
in the query
Review comment:
nit: s/want/wants/
--
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]