dabla commented on code in PR #43784:
URL: https://github.com/apache/airflow/pull/43784#discussion_r1832724448
##########
providers/src/airflow/providers/ydb/hooks/ydb.py:
##########
@@ -136,10 +138,9 @@ class YDBHook(DbApiHook):
supports_autocommit: bool = True
supports_executemany: bool = True
- def __init__(self, *args, is_ddl: bool = False, use_scan_query: bool =
False, **kwargs) -> None:
+ def __init__(self, *args, is_ddl: bool = False, **kwargs) -> None:
super().__init__(*args, **kwargs)
self.is_ddl = is_ddl
- self.use_scan_query = use_scan_query
conn: Connection = self.get_connection(self.get_conn_id())
Review Comment:
I would use the self.connection property here, as this is a cached shortcut
of self.get_connection(self.get_conn_id()) which here would make the code more
readable. This is a shortcut property that has been added lately in the
DbApiHook
##########
providers/src/airflow/providers/ydb/hooks/ydb.py:
##########
@@ -136,10 +138,9 @@ class YDBHook(DbApiHook):
supports_autocommit: bool = True
supports_executemany: bool = True
- def __init__(self, *args, is_ddl: bool = False, use_scan_query: bool =
False, **kwargs) -> None:
+ def __init__(self, *args, is_ddl: bool = False, **kwargs) -> None:
super().__init__(*args, **kwargs)
self.is_ddl = is_ddl
- self.use_scan_query = use_scan_query
conn: Connection = self.get_connection(self.get_conn_id())
Review Comment:
I really like the clean up, nice work @vgvoleg
--
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]