kaxil commented on PR #55589:
URL: https://github.com/apache/airflow/pull/55589#issuecomment-3427566961

   Could you please rebase and fix the static checks too please. And it would 
be trivial for MySQL specific query:
   
   ```python
   @classmethod
   def latest_item_select_object(cls, dag_id):
       from airflow.settings import engine
       
       if engine.dialect.name == 'mysql':
           # Prevent "Out of sort memory" caused by large values in cls.data 
column for MySQL. Details in https://github.com/apache/airflow/pull/55589
           latest_item_id = select(cls.id).where(cls.dag_id == 
dag_id).order_by(cls.created_at.desc()).limit(1).scalar_subquery()
           return select(cls).where(cls.id == latest_item_id)
       else:
           return select(cls).where(cls.dag_id == 
dag_id).order_by(cls.created_at.desc()).limit(1)
   ```


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