dstandish commented on code in PR #26942:
URL: https://github.com/apache/airflow/pull/26942#discussion_r992679921
##########
airflow/www/views.py:
##########
@@ -3574,13 +3586,27 @@ def datasets_summary(self):
DatasetModel.id,
DatasetModel.uri,
)
- .filter(DatasetModel.uri.ilike(f"%{uri_pattern}%"))
.order_by(*order_by)
- .offset(offset)
- .limit(limit)
- .all()
- ]
- data = {"datasets": datasets, "total_entries": total_entries}
+ )
+
+ if updated_before or updated_after:
+ count_query = count_query.outerjoin(DatasetEvent,
DatasetEvent.dataset_id == DatasetModel.id)
Review Comment:
> Isn't that what you suggested?
I just pointed out that it was sort of ambiguous what the intention since
using outer join in combination with those filters effectively makes it an
inner join.
My the question I'm highlighting is about logic not necessarily performance.
The question is, if a dataset has no events in the time range, do you still
want it to appear in the result? If that's true you need to do an outer join
but move the filters to join condition.
I can hop on a call if nec.
--
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]