hussein-awala commented on code in PR #37761:
URL: https://github.com/apache/airflow/pull/37761#discussion_r1510101326
##########
airflow/models/taskinstance.py:
##########
@@ -3120,19 +3120,13 @@ def xcom_pull(
session=session,
)
- # NOTE: Since we're only fetching the value field and not the whole
- # class, the @recreate annotation does not kick in. Therefore we need
to
- # call XCom.deserialize_value() manually.
-
# We are only pulling one single task.
if (task_ids is None or isinstance(task_ids, str)) and not
isinstance(map_indexes, Iterable):
- first = query.with_entities(
- XCom.run_id, XCom.task_id, XCom.dag_id, XCom.map_index,
XCom.value
- ).first()
+ first = query.one_or_none()
if first is None: # No matching XCom at all.
return default
if map_indexes is not None or first.map_index < 0:
- return XCom.deserialize_value(first)
+ return first.value
query = query.order_by(None).order_by(XCom.map_index.asc())
return LazyXComAccess.build_from_xcom_query(query)
Review Comment:
I will try to find a solution b/c for `LazyXComAccess`
--
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]