phase 17: fix text[]/varchar[] type mismatch in coverage-gaps SQL

This commit is contained in:
Celes Renata
2026-04-12 04:15:00 -07:00
parent d16e15c885
commit 4f2f113cda
2 changed files with 6 additions and 6 deletions
+2 -2
View File
@@ -1479,8 +1479,8 @@ async def get_source_coverage_gaps():
LEFT JOIN sources s ON s.company_id = c.id AND s.active = TRUE
WHERE c.active = TRUE
GROUP BY c.id, c.ticker, c.legal_name, c.sector
HAVING NOT ARRAY['market_api', 'news_api', 'filings_api'] <@ ARRAY_AGG(DISTINCT s.source_type) FILTER (WHERE s.active)
OR ARRAY_AGG(DISTINCT s.source_type) FILTER (WHERE s.active) IS NULL
HAVING NOT ARRAY['market_api', 'news_api', 'filings_api']::text[] <@ ARRAY_AGG(DISTINCT s.source_type::text) FILTER (WHERE s.active)
OR ARRAY_AGG(DISTINCT s.source_type::text) FILTER (WHERE s.active) IS NULL
ORDER BY c.ticker""",
)