potiuk commented on code in PR #23971:
URL: https://github.com/apache/airflow/pull/23971#discussion_r924699750
##########
airflow/providers/trino/hooks/trino.py:
##########
@@ -255,32 +257,38 @@ def get_pandas_df(
@overload
def run(
self,
- sql,
+ sql: Union[str, Iterable[str]],
autocommit: bool = False,
- parameters: Optional[Tuple] = None,
+ parameters: Optional[Union[Iterable, Mapping]] = None,
handler: Optional[Callable] = None,
- ) -> None:
+ split_statements: bool = False,
+ return_last: bool = True,
+ ) -> Optional[Union[Any, List[Any]]]:
"""Execute the statement against Trino. Can be used to create views."""
@overload
def run(
self,
- sql,
+ sql: Union[str, Iterable[str]],
autocommit: bool = False,
- parameters: Optional[Tuple] = None,
+ parameters: Optional[Union[Iterable, Mapping]] = None,
handler: Optional[Callable] = None,
+ split_statements: bool = False,
+ return_last: bool = True,
hql: str = "",
- ) -> None:
+ ) -> Optional[Union[Any, List[Any]]]:
""":sphinx-autoapi-skip:"""
def run(
self,
- sql,
+ sql: Union[str, Iterable[str]],
autocommit: bool = False,
- parameters: Optional[Tuple] = None,
+ parameters: Optional[Union[Iterable, Mapping]] = None,
handler: Optional[Callable] = None,
+ split_statements: bool = False,
Review Comment:
NOW. THIS is going to be interesting. Exactly as I anticipating. Using this
PR to see how we can look at backwards compeatibility...
Exciting :). I will take a look later today :)
##########
airflow/providers/trino/hooks/trino.py:
##########
@@ -255,32 +257,38 @@ def get_pandas_df(
@overload
def run(
self,
- sql,
+ sql: Union[str, Iterable[str]],
autocommit: bool = False,
- parameters: Optional[Tuple] = None,
+ parameters: Optional[Union[Iterable, Mapping]] = None,
handler: Optional[Callable] = None,
- ) -> None:
+ split_statements: bool = False,
+ return_last: bool = True,
+ ) -> Optional[Union[Any, List[Any]]]:
"""Execute the statement against Trino. Can be used to create views."""
@overload
def run(
self,
- sql,
+ sql: Union[str, Iterable[str]],
autocommit: bool = False,
- parameters: Optional[Tuple] = None,
+ parameters: Optional[Union[Iterable, Mapping]] = None,
handler: Optional[Callable] = None,
+ split_statements: bool = False,
+ return_last: bool = True,
hql: str = "",
- ) -> None:
+ ) -> Optional[Union[Any, List[Any]]]:
""":sphinx-autoapi-skip:"""
def run(
self,
- sql,
+ sql: Union[str, Iterable[str]],
autocommit: bool = False,
- parameters: Optional[Tuple] = None,
+ parameters: Optional[Union[Iterable, Mapping]] = None,
handler: Optional[Callable] = None,
+ split_statements: bool = False,
Review Comment:
NOW. THIS is going to be interesting. Exactly as I anticipated. Using this
PR to see how we can look at backwards compeatibility...
Exciting :). I will take a look later today :)
--
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]