fix(pipeline): normalize GIAS OfficialSixthForm comparison with lower(trim())
PR Checks / Frontend Typecheck + Tests (pull_request) Successful in 9m37s
PR Checks / Backend Smoke (pull_request) Successful in 6s
PR Checks / Build Backend (no push) (pull_request) Successful in 17s
PR Checks / Build Frontend (no push) (pull_request) Successful in 50s
PR Checks / Build Pipeline (no push) (pull_request) Successful in 48s
PR Checks / AI Code Review (Claude) (pull_request) Successful in 2m19s
PR Checks / Frontend Typecheck + Tests (pull_request) Successful in 9m37s
PR Checks / Backend Smoke (pull_request) Successful in 6s
PR Checks / Build Backend (no push) (pull_request) Successful in 17s
PR Checks / Build Frontend (no push) (pull_request) Successful in 50s
PR Checks / Build Pipeline (no push) (pull_request) Successful in 48s
PR Checks / AI Code Review (Claude) (pull_request) Successful in 2m19s
Matches the phase derivation's guard against casing/whitespace variants in raw GIAS data; an unmatched variant previously fell through silently to the statutory-age fallback. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -55,9 +55,12 @@ select
|
|||||||
-- Authoritative sixth-form flag (spec §3): GIAS OfficialSixthForm.
|
-- Authoritative sixth-form flag (spec §3): GIAS OfficialSixthForm.
|
||||||
-- "Not applicable" (nurseries, primaries, PRUs) => false. Blank GIAS
|
-- "Not applicable" (nurseries, primaries, PRUs) => false. Blank GIAS
|
||||||
-- value (rare, new establishments) falls back to the statutory age range.
|
-- value (rare, new establishments) falls back to the statutory age range.
|
||||||
|
-- lower(trim()) guards against casing/whitespace variants in raw GIAS
|
||||||
|
-- data, same as the phase derivation above — an unmatched variant would
|
||||||
|
-- otherwise silently fall through to the age-range fallback.
|
||||||
case
|
case
|
||||||
when s.official_sixth_form = 'Has a sixth form' then true
|
when lower(trim(s.official_sixth_form)) = 'has a sixth form' then true
|
||||||
when s.official_sixth_form in ('Does not have a sixth form', 'Not applicable') then false
|
when lower(trim(s.official_sixth_form)) in ('does not have a sixth form', 'not applicable') then false
|
||||||
else coalesce(s.statutory_high_age >= 18, false)
|
else coalesce(s.statutory_high_age >= 18, false)
|
||||||
end as has_sixth_form,
|
end as has_sixth_form,
|
||||||
s.capacity,
|
s.capacity,
|
||||||
|
|||||||
Reference in New Issue
Block a user