potiuk commented on code in PR #36205:
URL: https://github.com/apache/airflow/pull/36205#discussion_r1433977482
##########
airflow/providers/databricks/hooks/databricks_sql.py:
##########
@@ -241,13 +267,23 @@ def run(
else:
return results
- @staticmethod
- def _make_serializable(result):
- """Transform the databricks Row objects into JSON-serializable
lists."""
- if isinstance(result, list):
- return [list(row) for row in result]
- elif isinstance(result, Row):
- return list(result)
+ def _make_common_data_structure(
+ self, result: list[T] | T | None
+ ) -> list[T] | T | list[tuple] | tuple | None:
Review Comment:
As explained already in previous discussions I plan to add it in a follow up
PR - together with ADR detailing some more of it. I think we should take a few
more steps to clarify it and I even have issue defined here and assigned to me:
https://github.com/apache/airflow/issues/36224
Perfect is an enemy of good. I suggest we complete this thing now and then
add typing as seperate PR.
Is that ok @bolkedebruin ? Can we do it this way and not circle back the
same comment in this PR?
--
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]