tchakib commented on issue #23605: URL: https://github.com/apache/airflow/issues/23605#issuecomment-1122437916
I had the same problem here is the query generated by the db.py script > https://github.com/apache/airflow/blob/v2-3-stable/airflow/utils/db.py#L1115 ``` SELECT count(*) AS count_1 FROM (SELECT rendered_task_instance_fields.dag_id AS dag_id, rendered_task_instance_fields.task_id AS task_id, rendered_task_instance_fields.execution_date AS execution_date, rendered_task_instance_fields.rendered_fields AS rendered_fields, rendered_task_instance_fields.k8s_pod_yaml AS k8s_pod_yaml FROM rendered_task_instance_fields WHERE NOT (EXISTS (SELECT 1 FROM task_instance INNER JOIN dag_run ON rendered_task_instance_fields.dag_id = task_instance.dag_id AND dag_run.run_id = task_instance.run_id AND rendered_task_instance_fields.execution_date = dag_run.execution_date WHERE rendered_task_instance_fields.dag_id = task_instance.dag_id AND rendered_task_instance_fields.task_id = task_instance.task_id))) AS anon_1; ``` it seems to me that the query should be generated as below ``` SELECT count(*) AS count_1 FROM (SELECT rendered_task_instance_fields.dag_id AS dag_id, rendered_task_instance_fields.task_id AS task_id, rendered_task_instance_fields.execution_date AS execution_date, rendered_task_instance_fields.rendered_fields AS rendered_fields, rendered_task_instance_fields.k8s_pod_yaml AS k8s_pod_yaml FROM rendered_task_instance_fields WHERE NOT (EXISTS (SELECT 1 FROM task_instance INNER JOIN dag_run ON dag_run.run_id = task_instance.run_id INNER JOIN rendered_task_instance_fields ON rendered_task_instance_fields.dag_id = task_instance.dag_id AND rendered_task_instance_fields.execution_date = dag_run.execution_date WHERE rendered_task_instance_fields.dag_id = task_instance.dag_id AND rendered_task_instance_fields.task_id = task_instance.task_id))) AS anon_1; ``` I wonder if it concerns version 5.7 ? -- 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]
