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

@@ -21,7 +21,7 @@ RETURNS TABLE(osm_id bigint, geometry geometry, name text, name_en text, name_de
agg_stop,
NULLIF(layer, 0) AS layer,
"level",
CASE WHEN indoor=TRUE THEN 1 ELSE NULL END as indoor,
CASE WHEN indoor=TRUE THEN 1 END as indoor,
row_number() OVER (
PARTITION BY LabelGrid(geometry, 100 * pixel_width)
ORDER BY CASE WHEN name = '' THEN 2000 ELSE poi_class_rank(poi_class(subclass, mapping_key)) END ASC