JDarDagran commented on code in PR #41034:
URL: https://github.com/apache/airflow/pull/41034#discussion_r1692691085


##########
airflow/lineage/hook.py:
##########
@@ -106,7 +130,13 @@ def add_input_dataset(
             scheme=scheme, uri=uri, dataset_kwargs=dataset_kwargs, 
dataset_extra=dataset_extra
         )
         if dataset:
-            self.inputs.append((dataset, context))
+            key = self._generate_key(dataset, context)
+            if key not in self._inputs:
+                self._inputs[key] = (dataset, context)
+                self._input_counts[key] = 1
+            else:
+                self._input_counts[key] += 1
+                self._inputs[key] = (dataset, context)

Review Comment:
   Even if the context has changed we keep the same object in the same process 
- there would be no need to reassign.



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