Tests for the PR #298
This commit is contained in:
parent
cde6d5bfba
commit
24a736c72e
@ -210,6 +210,9 @@ t|t|t
|
|||||||
id|data_polygon_measure_one_null|data_polygon_measure_two_null
|
id|data_polygon_measure_one_null|data_polygon_measure_two_null
|
||||||
t|t|t
|
t|t|t
|
||||||
(1 row)
|
(1 row)
|
||||||
|
id|data_polygon_measure_one_null|data_polygon_measure_two_null
|
||||||
|
t|t|t
|
||||||
|
(1 row)
|
||||||
id|data_polygon_measure_one_predenom|data_polygon_measure_two_predenom
|
id|data_polygon_measure_one_predenom|data_polygon_measure_two_predenom
|
||||||
t|t|t
|
t|t|t
|
||||||
(1 row)
|
(1 row)
|
||||||
|
@ -596,6 +596,18 @@ SELECT id = 1 id,
|
|||||||
abs((data->1->>'value')::Numeric - 0.4902) / 0.4902 < 0.001 data_polygon_measure_two_null
|
abs((data->1->>'value')::Numeric - 0.4902) / 0.4902 < 0.001 data_polygon_measure_two_null
|
||||||
FROM data;
|
FROM data;
|
||||||
|
|
||||||
|
-- OBS_GetData/OBS_GetMeta by geom with two measures and one return null
|
||||||
|
WITH
|
||||||
|
meta AS (SELECT cdb_observatory.OBS_GetMeta(cdb_observatory._TestArea(),
|
||||||
|
'[{"numer_id": "us.census.acs.B19013001_quantile"}, {"numer_id": "us.census.acs.B01001002"}]') meta),
|
||||||
|
data AS (SELECT * FROM cdb_observatory.OBS_GetData(
|
||||||
|
ARRAY[(cdb_observatory._TestArea(), 1)::geomval],
|
||||||
|
(SELECT meta FROM meta)))
|
||||||
|
SELECT id = 1 id,
|
||||||
|
(data->0->>'value') is NULL data_polygon_measure_one_null,
|
||||||
|
abs((data->1->>'value')::Numeric - 0.4902) / 0.4902 < 0.001 data_polygon_measure_two_null
|
||||||
|
FROM data;
|
||||||
|
|
||||||
-- OBS_GetData/OBS_GetMeta by geom with two standard measures predenom normalization
|
-- OBS_GetData/OBS_GetMeta by geom with two standard measures predenom normalization
|
||||||
WITH
|
WITH
|
||||||
meta AS (SELECT cdb_observatory.OBS_GetMeta(cdb_observatory._TestArea(),
|
meta AS (SELECT cdb_observatory.OBS_GetMeta(cdb_observatory._TestArea(),
|
||||||
|
Loading…
Reference in New Issue
Block a user