dstandish commented on code in PR #26942:
URL: https://github.com/apache/airflow/pull/26942#discussion_r990719267
##########
airflow/www/views.py:
##########
@@ -3574,13 +3600,32 @@ 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 uri_pattern:
+ count_query =
count_query.filter(DatasetModel.uri.ilike(f"%{uri_pattern}%"))
+ query =
query.filter(DatasetModel.uri.ilike(f"%{uri_pattern}%"))
+
+ if updated_after:
+ count_query = count_query.outerjoin(
Review Comment:
and... if you don't want that behavior, then you'd want to move the filter
from where clause to join condition
--
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]