mobuchowski commented on code in PR #64843:
URL: https://github.com/apache/airflow/pull/64843#discussion_r3056392651


##########
providers/openlineage/src/airflow/providers/openlineage/utils/sql_hook_lineage.py:
##########
@@ -70,6 +71,27 @@ def emit_lineage_from_sql_extras(task_instance, sql_extras: 
list, is_successful:
     events: list[RunEvent] = []
     query_count = 0
 
+    # Build conn_id -> hook mapping before iterating. Hook instances are not 
hashable so
+    # conn_id (a plain string) is used as the @cache key throughout.
+    _hook_by_conn_id = {_get_hook_conn_id(e.context): e.context for e in 
sql_extras}

Review Comment:
   That makes sense, even if it feels like super rare situation, it won't break 
the most common use case. Updated.



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