utkarsharma2 commented on code in PR #32319:
URL: https://github.com/apache/airflow/pull/32319#discussion_r1250224162
##########
airflow/providers/odbc/hooks/odbc.py:
##########
@@ -211,3 +211,10 @@ def get_sqlalchemy_connection(
engine = self.get_sqlalchemy_engine(engine_kwargs=engine_kwargs)
cnx = engine.connect(**(connect_kwargs or {}))
return cnx
+
+ @staticmethod
+ def _make_serializable(result: list[pyodbc.Row]) -> list[tuple]:
+ """Transform the pyodbc.Row objects returned from a SQL command into
+ JSON-serializable objects.
+ """
+ return [tuple(row) for row in result]
Review Comment:
I think this would be a breaking change for existing users, they would
expect the return value to be `list[pyodbc.Row]` and not `list[tuple]`. Maybe
we can change the type based on a bool flag?
--
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]