whitespace fix
This commit is contained in:
parent
511a15d993
commit
20ec7ef25a
@ -46,14 +46,46 @@ SELECT
|
||||
|
||||
(1 row)
|
||||
|
||||
test_get_obs_column_with_geoid_and_census_1 | test_get_obs_column_with_geoid_and_census_2 | test_get_obs_column_with_geoid_and_census_3
|
||||
---------------------------------------------+---------------------------------------------+---------------------------------------------
|
||||
t | t | t
|
||||
-- future test: give back nulls when geometry doesn't intersect
|
||||
-- SELECT
|
||||
-- cdb_observatory._OBS_GeomTable(
|
||||
-- CDB_LatLng(0,0), -- should give back null since it's in the ocean?
|
||||
-- '"us.census.tiger".census_tract'
|
||||
-- );
|
||||
-- OBS_GetColumnData
|
||||
-- should give back:
|
||||
-- colname | tablename | aggregate
|
||||
-- -----------|-----------------|-----------
|
||||
-- geoid | obs_{hex table} | null
|
||||
-- total_pop | obs_{hex table} | sum
|
||||
WITH result as (
|
||||
SELECT
|
||||
array_agg(a) expected from cdb_observatory._OBS_GetColumnData(
|
||||
'"us.census.tiger".census_tract',
|
||||
Array['"us.census.tiger".census_tract_geoid', '"us.census.acs".B01001001'],
|
||||
'2009 - 2013') a
|
||||
)
|
||||
select (expected)[1]::text = '{"colname":"geoid","tablename":"obs_d34555209878e8c4b37cf0b2b3d072ff129ec470","aggregate":null,"name":"US Census Tract Geoids","type":"Text","description":""}' as test_get_obs_column_with_geoid_and_census_1,
|
||||
(expected)[2]::text = '{"colname":"geoid","tablename":"obs_ab038198aaab3f3cb055758638ee4de28ad70146","aggregate":null,"name":"US Census Tract Geoids","type":"Text","description":""}' as test_get_obs_column_with_geoid_and_census_2
|
||||
from result;
|
||||
test_get_obs_column_with_geoid_and_census_1 | test_get_obs_column_with_geoid_and_census_2
|
||||
---------------------------------------------+---------------------------------------------
|
||||
t | t
|
||||
(1 row)
|
||||
|
||||
obs_getcolumndatajson_missing_measure
|
||||
---------------------------------------
|
||||
t
|
||||
-- should be null-valued
|
||||
WITH result as (
|
||||
SELECT
|
||||
array_agg(a) expected from cdb_observatory._OBS_GetColumnData(
|
||||
'"us.census.tiger".census_tract',
|
||||
Array['"us.census.tiger".baloney'],
|
||||
'2009 - 2013') a
|
||||
)
|
||||
select expected is null as OBS_GetColumnData_missing_measure
|
||||
from result;
|
||||
obs_getcolumndata_missing_measure
|
||||
-----------------------------------
|
||||
t
|
||||
(1 row)
|
||||
|
||||
-- OBS_LookupCensusHuman
|
||||
@ -98,11 +130,17 @@ SELECT
|
||||
SELECT vals[1] As mandarin_orange
|
||||
(1 row)
|
||||
|
||||
-- should give back a normalized name
|
||||
SELECT cdb_observatory._OBS_NormalizeMeasureName('test 343 %% 2 qqq }}{{}}');
|
||||
_obs_normalizemeasurename
|
||||
---------------------------
|
||||
test_343_2_qqq
|
||||
SELECT cdb_observatory._OBS_GetRelatedColumn(
|
||||
Array[
|
||||
'"es.ine".pop_0_4',
|
||||
'"us.census.acs".B01001001',
|
||||
'"us.census.acs".B01001002'
|
||||
],
|
||||
'denominator'
|
||||
);
|
||||
_obs_getrelatedcolumn
|
||||
-------------------------------------------------------------
|
||||
{"\"es.ine\".total_pop",NULL,"\"us.census.acs\".B01001001"}
|
||||
(1 row)
|
||||
|
||||
\i test/sql/drop_fixtures.sql
|
||||
|
Loading…
Reference in New Issue
Block a user