dstandish commented on code in PR #26942:
URL: https://github.com/apache/airflow/pull/26942#discussion_r992755416
##########
airflow/www/views.py:
##########
@@ -3574,23 +3574,28 @@ def datasets_summary(self):
count_query = session.query(func.count(DatasetModel.id))
+ has_event_filters = bool(updated_before or updated_after)
+
query = (
session.query(
DatasetModel.id,
DatasetModel.uri,
func.max(DatasetEvent.timestamp).label("last_dataset_update"),
-
func.count(distinct(DatasetEvent.id)).label("total_updates"),
+
func.count(func.sum(func.case(DatasetEvent.id.is_not(None), 1, else_=0))).label(
Review Comment:
when no event filters, we do a left join, so event may be null, though
dataset exists, so total updates should be _zero_, hence this case when
--
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]