Joffreybvn commented on PR #36205:
URL: https://github.com/apache/airflow/pull/36205#issuecomment-1866182609

   The result input of `_make_common _data_structure` is the output of the 
[handler()](https://github.com/apache/airflow/blob/280b8b30061af2dec60ac83f9fafb92b3f0663c1/airflow/providers/databricks/hooks/databricks_sql.py#L243C58-L243C65)
 function. Which can be injected by the user, to potentially do more than 
*fetchone()* or *fetchall()* (e.g. to transform Row into dicts ?).  IMO, user 
should not transform data there, but `T` and `list[T]` represent the potential, 
already transformed data structure.
   
   But if we consider `T` and `list[T]` are pyodbc.Row in the ODBC provider, 
and databricks.sql.Row in Databricks' one, then we don't even need complex 
`isinstance` checks. And we can indeed easily return tuple/list[tuple] only. 
That simplify the current implementation, things become less ambiguous - which 
is great !
   
   But we'll break worflows of users doing bad stuff in the handler. And a 
[breaking change a bit too 
aggressive](https://github.com/apache/airflow/pull/36161#pullrequestreview-1779199804)
 was the root cause of this PR. Totally fine to do the change, as long as we 
are aware of that.
   
   Thus I'll modify this PR (doing it quickly today), 


-- 
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]

Reply via email to