You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jun 13, 2025. It is now read-only.
select test_id, array_length((array_agg(distinct unnested_cwf)), 1) as failed_commits_count from (
173
173
select test_id, commits_where_fail as cwf
174
-
from base_cte rd
174
+
from base_cte
175
175
where array_length(commits_where_fail,1) > 0
176
176
) as foo, unnest(cwf) as unnested_cwf group by test_id
177
177
),
178
-
cte3 as (
179
-
select rd.test_id, last_duration_seconds from base_cte rd
178
+
last_duration_cte as (
179
+
select base_cte.test_id, last_duration_seconds from base_cte
180
180
join (
181
181
select
182
182
test_id,
183
183
max(created_at) as created_at
184
-
from base_cte base
184
+
from base_cte
185
185
group by test_id
186
-
) as foo
187
-
on rd.created_at = foo.created_at
186
+
) as latest_rollups
187
+
on base_cte.created_at = latest_rollups.created_at
188
188
)
189
189
190
190
select * from (
191
191
select
192
192
rt.name,
193
193
rt.computed_name,
194
-
foo.*,
194
+
results.*,
195
195
row({order}) as _cursor
196
196
from
197
197
(
198
-
select cte1.*, coalesce(cte2.failed_commits_count, 0) as commits_where_fail, cte3.last_duration_seconds as last_duration
199
-
from cte1
200
-
full outer join cte2 using (test_id)
201
-
full outer join cte3 using (test_id)
202
-
) as foo join reports_test rt on foo.test_id = rt.id
203
-
) as bar
204
-
{"where bar._cursor > %s"ifafterelse""}
205
-
{"where bar._cursor < %s"ifbeforeelse""}
198
+
select failure_rate_cte.*, coalesce(commits_where_fail_cte.failed_commits_count, 0) as commits_where_fail, last_duration_cte.last_duration_seconds as last_duration
199
+
from failure_rate_cte
200
+
full outer join commits_where_fail_cte using (test_id)
201
+
full outer join last_duration_cte using (test_id)
202
+
) as results join reports_test rt on results.test_id = rt.id
0 commit comments