potiuk commented on code in PR #40751:
URL: https://github.com/apache/airflow/pull/40751#discussion_r1692899100
##########
airflow/providers/common/sql/hooks/sql.py:
##########
@@ -202,9 +204,28 @@ def placeholder(self):
)
return self._placeholder
+ @property
+ def connection(self) -> Connection:
+ if self._connection is None:
+ self._connection = self.get_connection(self.get_conn_id())
+ return deepcopy(self._connection)
Review Comment:
Interesting approach. I think I don't see any big problem except that it
will be a Connection ORM object that gets copied and I am not sure what happens
in this case and whether there is a problem with some memory leaks and
references potentially?
--
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]