potiuk commented on code in PR #28006:
URL: https://github.com/apache/airflow/pull/28006#discussion_r1036444297
##########
airflow/providers/snowflake/hooks/snowflake.py:
##########
@@ -369,15 +369,19 @@ def run(
with closing(self.get_conn()) as conn:
self.set_autocommit(conn, autocommit)
- # SnowflakeCursor does not extend ContextManager, so we have to
ignore mypy error here
- with closing(conn.cursor(DictCursor)) as cur: # type:
ignore[type-var]
Review Comment:
We made some assumptions about the API - they were neither maintained, not
documented and they were implicit - for example generic transfer. And they
"assumed" that the DBApi Hook behaves like`dbapi`.
So WE were doing the "have cake and eat it too" . On one hand we wanted the
hooks to behave in the same way, on the other, we allowed them to behave
differently.
Luckily, with this change and milions of tests around this, that time will
be over.
I added the parameter to return dictionary (and single test covering it).
Should be enough, because the only difference is the type of returned entities.
Looking fortward to the approval :)
--
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]