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:
@@ -25,15 +25,9 @@ CREATE MATERIALIZED VIEW osm_transportation_name_network AS (
|
||||
end as ref,
|
||||
hl.highway,
|
||||
hl.construction,
|
||||
CASE WHEN highway IN ('footway', 'steps') THEN layer
|
||||
ELSE NULL::int
|
||||
END AS layer,
|
||||
CASE WHEN highway IN ('footway', 'steps') THEN "level"
|
||||
ELSE NULL::int
|
||||
END AS "level",
|
||||
CASE WHEN highway IN ('footway', 'steps') THEN indoor
|
||||
ELSE NULL::boolean
|
||||
END AS indoor,
|
||||
CASE WHEN highway IN ('footway', 'steps') THEN layer END AS layer,
|
||||
CASE WHEN highway IN ('footway', 'steps') THEN "level" END AS "level",
|
||||
CASE WHEN highway IN ('footway', 'steps') THEN indoor END AS indoor,
|
||||
ROW_NUMBER() OVER(PARTITION BY hl.osm_id
|
||||
ORDER BY rm.network_type) AS "rank",
|
||||
hl.z_order
|
||||
|
||||
Reference in New Issue
Block a user