Commit Graph

578 Commits

Author SHA1 Message Date
John Krauss
104608c6d3 Add point to make sure CA data is present 2016-09-20 16:31:15 +00:00
John Krauss
c67fe12111 return NULL in cases when NULL is passed as input geometry or geometry ID. resolves #178 2016-09-20 16:26:13 +00:00
John Krauss
18cfdc60d0 tmp commit 2016-09-19 16:08:37 +00:00
Carla Iriberri
860290595c Release 1.0.6 2016-09-08 10:37:37 +02:00
Carla
bf4ade2fa0 Merge pull request #186 from CartoDB/measure_release
Use explicit functions for query construction and metadata
2016-09-08 09:58:25 +02:00
Carla
32d37a74b3 Remove cascades and quote conveniently 2016-09-02 12:04:03 +02:00
Carla Iriberri
5eb4ede219 Fix 2016-08-23 17:20:48 +02:00
Carla Iriberri
dd5f560359 Separate functions between files 2016-08-19 16:39:30 +02:00
Carla Iriberri
62c2693553 Avoid function check to dispatch 2016-08-19 13:04:54 +02:00
Carla Iriberri
48d1bfdb13 Remove JSON manipulation to use json functions 2016-08-19 12:45:38 +02:00
Carla Iriberri
30f27e5b58 Check function name and use param names instead of 2016-08-18 15:43:03 +02:00
Carla Iriberri
26b22a9bf4 Use explicit functions for query construction and metadata 2016-08-18 15:36:32 +02:00
Mario de Frutos
4c13434b9a Merge pull request #182 from CartoDB/sql-tests
SQL Integration and Performance Tests
2016-08-18 14:54:53 +02:00
Mario de Frutos
8785639ece Merge pull request #154 from CartoDB/iriberri-patch-1
Use 6432 for connections from server
2016-08-18 11:10:02 +02:00
John Krauss
f991f5a1e6 docs and NEWS for the new tests 2016-08-12 18:56:06 +00:00
John Krauss
e4b4ebf72d Adapted autotest to to work with SQL directly instead of over HTTP SQL API 2016-08-12 18:48:31 +00:00
John Krauss
e9857e89fb release-v-1.0.4 increment and news 2016-07-26 13:08:28 +00:00
John Krauss
af69b44f25 Always default to NULL, fixes #173 2016-07-26 13:05:40 +00:00
John Krauss
1c7c73f948 release candidate 1.0.3 2016-07-25 13:20:09 +00:00
john krauss
360adc47df Merge pull request #170 from CartoDB/handle-bad-geoms
Handle bad geoms
2016-07-25 09:15:09 -04:00
john krauss
571f1f343a Merge pull request #168 from CartoDB/fix-per-sq-m-obs-getmeasure-area
Fix per sq m obs getmeasure area
2016-07-25 09:14:08 -04:00
john krauss
186c57efbd Merge pull request #167 from CartoDB/null-defaults
Null defaults
2016-07-25 09:12:51 -04:00
john krauss
b139a24012 Merge pull request #165 from CartoDB/fix-required-libs
Fix required libs
2016-07-25 09:09:21 -04:00
john krauss
260704327e Merge pull request #164 from CartoDB/hotfix-error-on-exception
in this function, its "measure_id" not "numer_id"
2016-07-25 09:06:26 -04:00
John Krauss
252610673a handle difficult geometries more gracefully. fixes #160 2016-07-25 13:05:36 +00:00
John Krauss
d054f37528 fixes #160: snaptogrid then buffer input polygons 2016-07-22 21:47:06 +00:00
John Krauss
3d58fd284a fix #159
ensure getuscensusmeasure and getpopulation work as expected with NULL passed explicitly as normalization
2016-07-22 19:24:36 +00:00
John Krauss
efcea9be7b Merge branch 'fix-required-libs' into fix-per-sq-m-obs-getmeasure-area 2016-07-22 18:59:42 +00:00
John Krauss
cf242515e3 install postgres_fdw in test setup. fixes #166 2016-07-22 18:59:11 +00:00
John Krauss
4c434f5448 tests doublechecking NULL default handled correctly, and that area normalization for polygon is per square kilometer 2016-07-22 18:56:27 +00:00
John Krauss
59dd09c554 Merge branch 'fix-required-libs' into fix-per-sq-m-obs-getmeasure-area 2016-07-22 18:17:54 +00:00
John Krauss
8187ab4bbe ensure tests run in order. Fixes #162 2016-07-22 17:44:16 +00:00
John Krauss
e54d95fa8f remove unused plpythonu and cartodb dependencies
Fixes #161
2016-07-22 17:43:40 +00:00
John Krauss
d766f08b03 calculate area normalization of a polygon by square kilometer, not square meter. fixes #158 2016-07-22 15:18:43 +00:00
John Krauss
8f345fd508 in this function, its "measure_id" not "numer_id" 2016-07-21 15:35:09 -04:00
Carla
bfa57f4971 Use 6432 for connections from server 2016-07-19 17:54:08 +02:00
Carla
173d7c0aec Add postgres_fdw as a dependency of observatory 2016-07-19 15:56:25 +02:00
Mario de Frutos
876515f9aa Merge pull request #127 from CartoDB/table_level_functions
Add table level functions and mocks
2016-07-15 15:47:02 +02:00
Carla
d93752efa3 move addr_host as a parameter 2016-07-15 11:34:42 +02:00
John Krauss
c09e0b6e83 can eliminate getrelatedcolumn 2016-07-13 18:42:25 -04:00
John Krauss
748428ace1 Merge branch 'release-v-1.0.2' into getmeasure-using-obsmeta 2016-07-13 18:41:04 -04:00
john krauss
10a0dc9b26 Merge pull request #141 from CartoDB/fix-hardcoded-getcategory-geom
Fix hardcoded getcategory geom
2016-07-13 18:39:31 -04:00
john krauss
9245de84b0 Merge pull request #142 from CartoDB/comment-notices
comment out notices
2016-07-13 18:38:59 -04:00
John Krauss
7bb1bbd804 handle predenomination of points properly 2016-07-13 18:37:17 -04:00
John Krauss
1d008ccbe9 should not try to use area normalization for zhvi 2016-07-13 18:33:53 -04:00
John Krauss
f581278b8a default is now NULL 2016-07-13 18:24:45 -04:00
John Krauss
cbf1c5e67d fix default normalizations 2016-07-13 18:16:53 -04:00
John Krauss
adc663b563 default to area normalization for point, no normalization for polygon getmeasures 2016-07-13 18:14:09 -04:00
John Krauss
3a37b98b72 we still needt hese for getdemographicsnapshot 2016-07-13 17:54:19 -04:00
John Krauss
a4a20e9c1d prevent internal join for denominated getmeasure by polygon 2016-07-13 17:41:05 -04:00
John Krauss
f485426085 fix syntax error 2016-07-13 17:38:54 -04:00
John Krauss
75e765f256 explicit type casts for = ANY 2016-07-13 17:38:05 -04:00
John Krauss
b690478aff use IN ANY to avoid joins elsewhere, and filter by nonzero overlap for all getmeasure polygon queries 2016-07-13 17:36:27 -04:00
John Krauss
6fa9d5c96a add missing array_agg 2016-07-13 17:27:03 -04:00
John Krauss
fc6317161f avoid joins 2016-07-13 17:26:01 -04:00
John Krauss
c07d9f6833 add missing params 2016-07-13 17:13:45 -04:00
John Krauss
ff173a0152 filter so theres some overlap 2016-07-13 17:12:16 -04:00
John Krauss
a7de1f2228 intersects, not overlaps 2016-07-13 16:57:27 -04:00
John Krauss
86529ada5a use st_overlaps instead of && 2016-07-13 16:53:50 -04:00
John Krauss
80cdc5e8ca fix predicate 2016-07-13 16:48:06 -04:00
John Krauss
7c8c5cca0a fix params 2016-07-13 16:42:02 -04:00
John Krauss
a946ab9d03 fix params in denominated polygon getmeasure 2016-07-13 16:28:50 -04:00
John Krauss
da127baa3c implementation for polygon/multipolygon weighted getmeasure 2016-07-13 16:24:33 -04:00
John Krauss
e89a88aa83 use subselects as joins are horrifically slow over FDW 2016-07-13 15:59:27 -04:00
John Krauss
af2259bb0a fix wrong number of variables INTO 2016-07-13 13:39:33 -04:00
John Krauss
fb083f4b9e fix typo 2016-07-13 13:30:05 -04:00
John Krauss
976e119abb fix typo 2016-07-13 12:21:53 -04:00
John Krauss
bbc6f9ef36 getmeasure bypassing several older functions, areas not yet implemented 2016-07-13 12:20:01 -04:00
John Krauss
5229279ee9 Merge branch 'comment-notices' into release-v-1.0.2-preview 2016-07-13 11:14:00 -04:00
John Krauss
2107796f07 updates to NEWS.md and observatory.control 2016-07-12 17:49:34 -04:00
John Krauss
6a39bedee7 fix ambiguous colname for categories in points too 2016-07-12 16:10:00 -04:00
John Krauss
81176d1df2 fix possible ambiguity in category colname 2016-07-12 16:06:19 -04:00
John Krauss
4b26eeda65 fix to correct segment for testarea area 2016-07-12 15:33:26 -04:00
John Krauss
4fc02f99e2 choose largest segment in the polygon 2016-07-12 14:37:43 -04:00
John Krauss
5bb4285528 fix typo 2016-07-12 14:16:28 -04:00
John Krauss
1e9c3fb860 fix typo 2016-07-12 14:15:00 -04:00
John Krauss
62a2c259a7 fix typo 2016-07-12 14:13:09 -04:00
John Krauss
61854a070d fix wrong quoting 2016-07-12 14:11:02 -04:00
John Krauss
8654c22c87 handle area categories properly 2016-07-12 14:06:43 -04:00
John Krauss
62c08864af remove bad "target_table" notice 2016-07-12 12:37:30 -04:00
John Krauss
af39a37b43 fix missing comma 2016-07-12 12:34:32 -04:00
John Krauss
26b61a6ddb minor formatting 2016-07-12 12:26:10 -04:00
John Krauss
965fb94704 fix bugs in obs_getcategory implementation 2016-07-12 12:22:06 -04:00
John Krauss
84dec8bdf4 simplify obs_getcategory and use obs_meta 2016-07-12 12:09:42 -04:00
John Krauss
ebc27dbbb7 faster obs_meta generation, use better formatting and handle NULL boundary_id 2016-07-12 11:52:56 -04:00
John Krauss
56fa19118b adjust expectations 2016-07-12 11:25:50 -04:00
John Krauss
4f3baac10a adjust expectations and make sure echo is none 2016-07-12 11:21:42 -04:00
John Krauss
b512985b46 drop/create less, better indexes 2016-07-12 11:15:08 -04:00
John Krauss
329b4dbca3 do not imitate foreign keys 2016-07-12 10:46:53 -04:00
John Krauss
897cf38d42 faster generation of obs-meta via indexes 2016-07-12 10:42:00 -04:00
John Krauss
fe6343c73f should use coaelesce, not nullif 2016-07-12 10:16:19 -04:00
John Krauss
26ee8aedb1 solve null identifier issue 2016-07-12 10:16:13 -04:00
John Krauss
66e2c6be54 create obs_meta out of dump band 2016-07-12 10:16:02 -04:00
John Krauss
6b41994a87 add missing formatstring args 2016-07-12 10:15:53 -04:00
John Krauss
d3d5cbdbbd use obs_meta in obs_getmeasurebyid 2016-07-12 10:15:44 -04:00
John Krauss
4d51ecc12e comment out notices 2016-07-12 10:14:59 -04:00
Rafa de la Torre
926435a908 Update NEWS and control file for v1.0.1 2016-07-01 18:57:21 +02:00
John Krauss
11dbb860ab preemptively set_srid for obs_getavailableboundaries 2016-07-01 18:43:05 +02:00
Carla
9ade6588e2 Add augment functions, add mocks for data retrieval, create own fdw functions to avoid cartodb dependency 2016-07-01 12:31:39 +02:00
John Krauss
17aeb5187b update to NEWS and control file in prep for release 2016-06-27 12:51:39 -04:00
John Krauss
cf7c115a76 Merge branch 'release-v-0.0.6' into fix-geom_geoid_colname 2016-06-27 12:39:09 -04:00
John Krauss
4e8341daab Merge branch 'release-v-0.0.6' into obs-dump-version 2016-06-27 12:37:15 -04:00
John Krauss
ca4327d3cd use data_geoid_colname with data table, reenable area-based measure tests that can catch this bug 2016-06-27 11:55:03 -04:00
John Krauss
bac48d7bea add missing RETURN 2016-06-22 14:35:40 -04:00
John Krauss
91383fe933 correct obs_getdumpversion to obs_dumpversion 2016-06-22 14:33:53 -04:00
John Krauss
446bdec30d obs_dumpversion and associated tests 2016-06-22 14:29:58 -04:00
John Krauss
f362e97f88 remove geometrycollection from obs_table fixture 2016-06-22 14:20:03 -04:00
John Krauss
975137641d fix ambiguous reference o the_geom 2016-06-22 13:38:29 -04:00
John Krauss
9379224629 use intersection against geom instead of && against bounds, update fixtures 2016-06-22 12:20:52 -04:00
Andy Eschbacher
8fbb9ebbcc updating version to 0.0.5 2016-05-26 13:48:37 -04:00
Andy Eschbacher
076e285ed7 adds notes on test calls 2016-05-26 13:37:02 -04:00
Andy Eschbacher
43dc37f62b Merge branch 'develop' into add-getmeasurebyid 2016-05-26 13:31:55 -04:00
Andy Eschbacher
49d584822c adds another test on different types of inputs 2016-05-26 13:28:56 -04:00
Mario de Frutos
faa72b69ed Version 0.0.4 files 2016-05-25 15:45:59 +02:00
John Krauss
de567e4dc7 fix expectations that were borked because of a holey fixture resolved with https://github.com/CartoDB/bigmetadata/issues/38 2016-05-24 15:18:40 -04:00
John Krauss
614bce3051 remove tight binding between metadata and tests for some of the exploration tests 2016-05-24 13:24:37 -04:00
Andy Eschbacher
b5267c14bf removes unneeded todo 2016-05-24 13:15:19 -04:00
Andy Eschbacher
afb548c75d adds tests 2016-05-24 12:02:32 -04:00
Andy Eschbacher
94756a2377 minor formatting changes 2016-05-24 11:27:41 -04:00
Andy Eschbacher
2e312464aa fixes geom_ref in where condition 2016-05-24 11:22:39 -04:00
Andy Eschbacher
3f77a384c7 adds missing comma 2016-05-24 11:06:53 -04:00
Andy Eschbacher
1ba7299fe4 adds obs_getmeasurebyid 2016-05-24 11:02:35 -04:00
John Krauss
45ae255223 update es.ine expectations and tests 2016-05-24 12:51:55 +00:00
John Krauss
dc5e9ba2ad update fixtures and swap us.census.acs.demographics for us.census% fuzzy match for getuscensusmeasure 2016-05-24 12:34:06 +00:00
Mario de Frutos
b848ccc077 Version 0.0.3 release files 2016-05-24 11:45:45 +02:00
Andy Eschbacher
7e431ea223 adding forgotten test expectation 2016-05-21 10:15:01 -04:00
John Krauss
73dfba2d4b Merge remote-tracking branch 'origin/develop' into more-tests-for-boundaries 2016-05-20 18:02:32 -04:00
John Krauss
90aa7c2417 Merge branch 'develop' into remove-geoid-from-obs_getpolygons 2016-05-20 18:00:51 -04:00
john krauss
a1bbd5ace5 Merge pull request #67 from CartoDB/iss66-cast-geom-ids-to-text
cast geom ids to text
2016-05-20 17:59:07 -04:00
Andy Eschbacher
d92f472708 remove verbose version of test 2016-05-19 16:52:31 -04:00
Andy Eschbacher
38226e40b4 merge from develop 2016-05-19 16:48:40 -04:00
Mario de Frutos
00165b17e6 Fixed wrong return for an empty element in _OBS_Get 2016-05-18 09:55:16 +02:00
Andy Eschbacher
a9d357699a Merge branch 'develop' into iss66-cast-geom-ids-to-text 2016-05-17 11:52:48 -04:00
John Krauss
8d17375766 fix extra "u" 2016-05-17 11:39:11 -04:00
John Krauss
ddf9e9f3cc fixes to segment expectation 2016-05-17 11:35:19 -04:00
John Krauss
3983967920 Merge branch 'develop' into get_segment_snapshot_fix 2016-05-17 11:20:32 -04:00
Andy Eschbacher
3f76602028 adding who's on first expectation 2016-05-17 11:13:17 -04:00
Andy Eschbacher
e145d26cbd adding new fixtures with who's on first 2016-05-17 11:12:57 -04:00
Andy Eschbacher
fd483b60f4 Merge branch 'develop' into iss66-cast-geom-ids-to-text 2016-05-17 11:09:10 -04:00
Andy Eschbacher
e4d8422787 update test results 2016-05-17 11:02:59 -04:00
Andy Eschbacher
80d7813845 removes whitespaces 2016-05-17 08:33:43 -04:00
Andy Eschbacher
0d5e45fc98 Merge branch 'develop' into update-total-pop-column-ids 2016-05-17 08:30:02 -04:00
Andy Eschbacher
52f44e995a updating expected outputs for tests 2016-05-17 08:28:45 -04:00
Andy Eschbacher
b73883aa1c updates fixtures 2016-05-17 08:28:23 -04:00
Andy Eschbacher
4f82b9d3f2 update test outputs 2016-05-17 08:27:55 -04:00
Mario de Frutos
f17dc6d8ff Added return statements when missing 2016-05-17 11:06:43 +02:00
Andy Eschbacher
f0baf48e85 update timespan 2016-05-16 17:50:17 -04:00
Andy Eschbacher
1a51c786d3 Merge branch 'develop' into update-total-pop-column-ids 2016-05-16 16:50:15 -04:00
Andy Eschbacher
a3bf071acb adding more recent defaults and return catches for return query 2016-05-16 16:49:48 -04:00
Andy Eschbacher
b5f4a617e8 adding more tests 2016-05-16 14:40:59 -04:00
Andy Eschbacher
57adaf78d6 puts in data_geoid 2016-05-16 14:30:27 -04:00
Andy Eschbacher
60e716878f template geoid 2016-05-16 14:00:04 -04:00
Andy Eschbacher
1e0b0a181c removing geoid from obs_getpolygons 2016-05-16 13:32:55 -04:00
Mario de Frutos
75c8e052a1 Fixed more casts to text 2016-05-16 18:01:53 +02:00
Mario de Frutos
4536de681e Cast aggregate to text 2016-05-16 17:53:58 +02:00
Andy Eschbacher
b074c1194b casting return types to text 2016-05-16 11:50:12 -04:00
Andy Eschbacher
126643b84e casting to text, fixing return catch 2016-05-16 11:15:15 -04:00
Andy Eschbacher
08bbfe190a putting cast in proper place 2016-05-16 10:23:59 -04:00
Andy Eschbacher
73e768d698 cast returned values to text 2016-05-16 10:21:32 -04:00
Stuart Lynn
06204d471e fixing obs_getSegmentSnapshot 2016-05-13 15:40:48 -04:00
Andy Eschbacher
c6213e388c updating fixtures for new metadata defintions 2016-05-13 13:42:34 -04:00
Andy Eschbacher
9ff99cbfbd updating total pop column reference 2016-05-13 11:23:10 -04:00
Andy Eschbacher
7e7f572bf1 Merge branch 'develop' into docs-768-obs-docs-structure 2016-05-13 09:36:46 -04:00
Andy Eschbacher
2c10e75af6 cast return value of obs_getboundaryid to text 2016-05-13 06:51:13 -04:00
Andy Eschbacher
8696037dd6 adding test of who's on first 2016-05-12 22:29:46 -04:00
Andy Eschbacher
4fb79c6bc4 adds missing returns to properly exit function 2016-05-12 21:32:44 -04:00
Andy Eschbacher
18eb4b8e41 casting geom_refs to text 2016-05-12 21:08:58 -04:00
Andy Eschbacher
02a4dbde57 using appropriate operators in format function 2016-05-12 15:13:50 -04:00
John Krauss
aca37666fa Merge remote-tracking branch 'origin/develop' into default-recent-timespan-weighted-geom 2016-05-12 09:51:14 -04:00
John Krauss
8e3c75a94b Merge branch 'develop' into remove-geoid-from-getboundaryid 2016-05-12 09:48:50 -04:00
John Krauss
1152eb542a Merge branch 'iss52-timespan-overuse' into develop 2016-05-12 09:47:47 -04:00
John Krauss
3f1b1cfcb9 update tests to work with latest zillow 2016-05-12 09:39:44 -04:00
Andy Eschbacher
ebb2af249b adding back missing return; 2016-05-12 08:31:20 -04:00
Andy Eschbacher
9a7c0885bf remove words error when it's a notice 2016-05-12 08:08:13 -04:00
Andy Eschbacher
a6c395e3be remove hard-coded geoid from getgeometryid 2016-05-12 08:03:06 -04:00
John Krauss
506f9ead30 first-pass defaults to latest timespan/boundary_id 2016-05-11 18:17:48 -04:00
John Krauss
ccf61c3583 array typing issues 2016-05-11 17:59:58 -04:00
John Krauss
d1c2598167 fix bug with table alias 2016-05-11 17:57:46 -04:00
John Krauss
b2b34bfe05 default to latest if unspecified timespan/boundary id 2016-05-11 17:55:52 -04:00
John Krauss
011baaacd5 Merge branch 'develop' into default-recent-timespan-weighted-geom 2016-05-11 16:58:14 -04:00
John Krauss
ce0601e157 include correct zcta rows 2016-05-11 16:35:40 -04:00
John Krauss
e9f6326f04 add missing tiger.zcta5 2016-05-11 16:25:32 -04:00
John Krauss
7e1fcc2b15 fix broken schema in tests 2016-05-11 16:20:59 -04:00
Andy Eschbacher
b656569d51 remove unused normalize type from error reporting 2016-05-11 16:18:14 -04:00
John Krauss
addaef7d40 zillow expectation 2016-05-11 16:09:52 -04:00
John Krauss
d2233609bc add zillow test, still missing expectation 2016-05-11 16:08:59 -04:00
John Krauss
aab24d00dd use data_geoid_colname for data, geom_geoid_colname for geom 2016-05-11 15:47:29 -04:00
John Krauss
56f4d2f256 fix geoid hardcode 2016-05-11 14:58:19 -04:00
Andy Eschbacher
b21ff8a65e adding errors to docs 2016-05-11 14:50:23 -04:00
Andy Eschbacher
4d60a211de fixes timespan mis-naming issue 2016-05-11 13:38:51 -04:00
Andy Eschbacher
9d3bb40877 scratch work to get _obs_columndata to return better defaults 2016-05-11 11:39:23 -04:00
Andy Eschbacher
ec1c2f8dfb removing hard-coded geoid from _obs_getpoints 2016-05-11 11:25:08 -04:00
Andy Eschbacher
c05d4cb909 Merge pull request #53 from CartoDB/iss51-tests-fixes
update tests to account for json responses with different key orders and
2016-05-11 08:44:44 -04:00
Andy Eschbacher
7c655dcaa6 converting to point geoms 2016-05-10 15:44:58 -04:00
Andy Eschbacher
f9394129d9 add missing schema to function 2016-05-10 15:21:58 -04:00
Andy Eschbacher
dfbdb3c9ad updating geometry types to (geometry/point, 4326) where appropriate 2016-05-10 15:09:07 -04:00
Andy Eschbacher
25b3e5e2ec update tests to account for json responses with different key orders and
numeric precision
2016-05-10 14:24:21 -04:00
Andy Eschbacher
e39b438a0a updating tests after adding new fixtures 2016-05-06 07:47:00 -04:00
Andy Eschbacher
d747d3d3a9 scratch work to figure out test behavior 2016-05-05 17:53:11 -04:00
Andy Eschbacher
a5a011e9db removed unused test 2016-05-05 17:52:41 -04:00