uranusjr commented on a change in pull request #21630:
URL: https://github.com/apache/airflow/pull/21630#discussion_r810835682
##########
File path: airflow/providers/presto/hooks/presto.py
##########
@@ -112,8 +112,20 @@ def get_isolation_level(self) -> Any:
def _strip_sql(sql: str) -> str:
return sql.strip().rstrip(';')
+ @overload
+ def get_records(self, sql: str = "", parameters: Optional[dict] = None):
+ """Get a set of records from Presto
+ :param sql: SQL statement to be executed.
+ :param parameters: The parameters to render the SQL query with.
+ """
+ ...
Review comment:
```suggestion
"""Get a set of records from Presto.
:param sql: SQL statement to be executed.
:param parameters: The parameters to render the SQL query with.
"""
```
One blank line after the first line in the docstring. (See [PEP
257](https://www.python.org/dev/peps/pep-0257/))
The `...` part is only needed so the function is not empty, but we already
have a docstring here and don’t need it.
##########
File path: airflow/providers/presto/hooks/presto.py
##########
@@ -112,8 +112,20 @@ def get_isolation_level(self) -> Any:
def _strip_sql(sql: str) -> str:
return sql.strip().rstrip(';')
+ @overload
+ def get_records(self, sql: str = "", parameters: Optional[dict] = None):
+ """Get a set of records from Presto
+ :param sql: SQL statement to be executed.
+ :param parameters: The parameters to render the SQL query with.
+ """
+ ...
+
+ @overload
def get_records(self, sql: str = "", parameters: Optional[dict] = None,
hql: str = ""):
- """Get a set of records from Presto"""
+ ...
Review comment:
What does this overload do?
--
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]