Remove unneeded "else null" in conditions (#732)

Minor code cleanup:
SQL already returns NULL in the "WHEN" condition
if it is not matched by any of the cases.

Co-authored-by: Eva Jelinkova <evka.jelinkova@gmail.com>
This commit is contained in:
Yuri Astrakhan
2020-01-22 17:24:28 -05:00
committed by GitHub
parent 3449cecb22
commit c9e7ad90c6
13 changed files with 10 additions and 36 deletions

View File

@@ -27,7 +27,6 @@ BEGIN
SET agg_stop = CASE
WHEN p.subclass IN ('bus_stop', 'bus_station', 'tram_stop', 'subway')
THEN 1
ELSE NULL
END;
UPDATE osm_poi_point p
@@ -36,7 +35,6 @@ BEGIN
WHEN p.subclass IN ('bus_stop', 'bus_station', 'tram_stop', 'subway')
AND r.rk IS NULL OR r.rk = 1
THEN 1
ELSE NULL
END)
FROM osm_poi_stop_rank r
WHERE p.osm_id = r.osm_id