utkarsharma2 commented on code in PR #36205: URL: https://github.com/apache/airflow/pull/36205#discussion_r1425309132
########## airflow/providers/databricks/hooks/databricks_sql.py: ########## @@ -243,11 +244,15 @@ def run( @staticmethod def _make_serializable(result): - """Transform the databricks Row objects into JSON-serializable lists.""" + """Transform the databricks Row objects into JSON-serializable namedtuple.""" + columns: list[str] | None = None if isinstance(result, list): - return [list(row) for row in result] + columns = result[0].__fields__ + row_object = namedtuple("Row", columns) Review Comment: The same testcase from earlier PR would still fail here, right? ``` statement = f"DESCRIBE TABLE {table.name};" hook.run(statement, parameters=parameters, handler=lambda x: x.fetchall()) ``` with this code hook.run() will return [SerializableRow(),SerializableRow(), SerializableRow()] instead of [row(), row(), row()] Since `Row` is not the same as `namedtuple` class this is still a breaking change. -- 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: commits-unsubscr...@airflow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org