You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2022/12/15 06:30:52 UTC

[GitHub] [airflow] uranusjr commented on a diff in pull request #28191: Add custom pickling hooks to LazyXComAccess

uranusjr commented on code in PR #28191:
URL: https://github.com/apache/airflow/pull/28191#discussion_r1049260185


##########
airflow/models/xcom.py:
##########
@@ -723,6 +723,20 @@ def __eq__(self, other: Any) -> bool:
             return all(x == y for x, y in z)
         return NotImplemented
 
+    def __getstate__(self) -> Any:
+        # We don't want to get into the trouble to pickle the entire SQLAlchemy

Review Comment:
   Ah, the root issue here is that SQLAlchemy objects don’t pickle well out of the box, so the big effort comes from we need to implement _custom logic_ for every thing in a SQLAlchemy query (e.g. filters, order_bys, hints). I’ll add this to the comments to clarify.



-- 
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-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org