Commit Graph
638 Commits
Author SHA1 Message Date
Javier Goizueta 8e8458e557 Merge branch 'master' into metadata 2018-05-18 20:49:26 +02:00
Javier Goizueta 4bc8fb207a Use sql_raw for query without aggregation 2018-05-18 15:29:46 +02:00
Simon Martín 81bace1dca Merge branch 'master' into fix-dataview-typeof 2018-05-17 12:13:11 +02:00
Javier Goizueta 5e09c80b71 Remove comment 2018-05-11 19:57:49 +02:00
Javier Goizueta 24b1b53ba0 Merge branch 'master' into metadata 2018-05-11 18:58:38 +02:00
Javier Goizueta cae4dd81c9 WIP: fix problems for aggregations & metadata 2018-05-10 19:12:47 +02:00
Simon Martín eba68c56ef handling pg_typeof undefined 2018-05-10 18:36:08 +02:00
Daniel García Aubert ac615b4a25 Merge branch 'separate-routers' into improve-folder-structure 2018-04-10 16:15:49 +02:00
Daniel García Aubert 1bbd84b37a Please jshint 2018-04-10 15:56:52 +02:00
Daniel García Aubert d1a4057a8d Rename user limits api by user limits backend 2018-04-10 10:16:07 +02:00
Daniel García Aubert ba36a47228 Rename overviews metadata api by overviews metadata backend 2018-04-09 19:47:43 +02:00
Daniel García Aubert e0d8dc0334 Rename filter stats api by filter stats backend 2018-04-09 18:56:01 +02:00
Simon Martín 233f9698f3 fix affectedtables cache 2018-04-06 12:59:53 +02:00
Javier Goizueta ffa3a96f1a Use unique cartodb_id in aggregated results
See #889
FOr centroid and point-grid the cartodb_id wasn't unique across tiles.
2018-04-05 14:06:27 +00:00
Javier Goizueta 44424583f0 Revert "Use unique cartodb_id in aggregated results"
This reverts commit c1da1a8a16.
This is reverted for moving the change out of PR #913 into its own PR for clarity.
2018-04-05 12:12:58 +02:00
Javier Goizueta e8cd6856b5 Add missing aggregation columns to ST_AsMVT
Aggregation results always should have the cartodb_id and the feature count
2018-04-04 17:18:56 +02:00
Javier Goizueta dc706aeb43 Fix bug with dimension aliases
The point-sample aggregation query failed if dimensions had alias different from the base columns
2018-04-04 16:29:40 +02:00
Javier Goizueta 2132960d7c Fix non-default aggregation columns
The columns for non-default aggregations were the base columns not the resulting aggregated columns
In particular this could cause invalid wrapped SQL code to be passed to ST_AsMVT when the Windshaft pg-mvt renderer was used.
2018-04-04 15:25:08 +02:00
Javier Goizueta fefb0b23af Merge branch 'master' into cartogl 2018-04-04 12:21:43 +02:00
Javier Goizueta c1da1a8a16 Use unique cartodb_id in aggregated results
See #889
FOr centroid and point-grid the cartodb_id wasn't unique across tiles.
2018-04-04 11:05:03 +02:00
Daniel García Aubert 5f906e54e4 Merge branch 'master' into 903-locals-refactor 2018-03-27 15:44:54 +02:00
Daniel García Aubert a107ee67fa Use arrow function 2018-03-27 10:32:22 +02:00
Daniel García Aubert 6b7c2675f1 Use database params module 2018-03-22 19:20:51 +01:00
Daniel García Aubert b40ed13f47 Do not use step to deal with asyn code 2018-03-21 19:08:37 +01:00
Javier Goizueta b9de49d5ab Remove superfluous aggregation filter condition
The default aggregation doesn't admit filters, so this wasn't necessary.
2018-03-21 17:36:26 +01:00
Javier Goizueta 6ada8ba6a2 Implement aggregation filters 2018-03-21 17:01:32 +01:00
Daniel García Aubert a142620b70 Make generic middlewares to calculate surrogate key and cache channel headers:
- In controllers: all reference to map config are now camelized, for instance: mapconfig -> mapConfig or mapconfigProvider -> mapConfigProvider
 - In controllers: all map config providers created in req/res cycle are saved into `res.locals` and `mapConfigProvider` as key.
 - In map-config-providers: all of them implement `.getAffectedTables()`, in order to calculate the tables involved for a given map-config. For that, `pgConnection` and `affectedTablesCache` are injected as constructor argument.
 - Named Map Provider: rename references from `affectedTablesAndLastUpdate` to `affectedTables`.
 - Named Map Provider Cache: In order to create new named map providers, needs affectedTablesCache.
 - Extract locals middlewares (surrogate-key and cache-channel) from controllers and create an unified version of them.
 - Extract last-modified middleware from named maps controller (draft).
2018-03-21 14:11:54 +01:00
Raul Marin 089be35b5d Aggregation count: Do not return null categories 2018-03-08 18:13:20 +01:00
Daniel García Aubert 5c2248d419 Merge branch 'master' into project-auth-api 2018-02-28 14:43:12 +01:00
Rafa de la Torre 251fe96509 Cosmetic fix, as suggested in PR 2018-02-12 19:24:53 +01:00
Eneko Lakasta b0e9df1400 add pgConnection.getDatabaseParams 2018-02-08 12:04:03 +01:00
Eneko Lakasta 6ebf51ce45 let select apikey type in setDBAuth: regular, default, master 2018-02-08 11:29:17 +01:00
Rafa de la Torre 065f56e161 Improve the speed of the aggregation dataview
Improve the performance of the aggregation dataview.

Instead of using a CTE (WITH) for filtered_source, which is only used in
one place to calculate ranks, inject it as a subquery.

This way the planner has a chance to ignore uneeded columns as well as
to parallelize the exectution of the window function (WindowAgg in the
query plan).

That is the part that takes most of the time of the query.

The improvement is about 20-40% in speed on PG10 with 4 cores.
2018-02-07 18:10:13 +01:00
Eneko Lakasta 95538707c9 add parameter asMaster to setDBAuth 2018-02-07 17:14:13 +01:00
Javier Goizueta 2e7784ddf2 Add comment to clafify aggregation resolution limit 2018-02-01 10:26:52 +01:00
Javier Goizueta d88fbbaa87 Use camelCase 2018-01-31 18:55:28 +01:00
Javier Goizueta 7db0744f67 Simplify expression 2018-01-31 17:54:40 +01:00
Javier Goizueta d1fcd797a3 Limit the minimum size of the the aggregation grid
Fixes #860
2018-01-31 17:46:13 +01:00
Javier Goizueta 27b5420358 Merge pull request #856 from CartoDB/841-the_geom_webmercator-type
Check the type of the_geom_webmercator for aggregation
2018-01-29 16:13:19 +01:00
Javier Goizueta 7641542e67 Check the type of the_geom_webmercator for aggregation
Fixes #841
2018-01-29 15:48:35 +01:00
Eneko Lakasta 2bd4c9e814 Merge pull request #851 from CartoDB/1259-category-widget-error-group-by-missing
use original column name in group by instead of alias
2018-01-29 15:38:07 +01:00
Eneko Lakasta 941ebf7d80 Merge branch 'master' into 1259-category-widget-error-group-by-missing 2018-01-29 14:51:59 +01:00
Simon Martín c38bf6ade8 Merge branch 'master' into respect-types-aggreagation 2018-01-29 14:51:20 +01:00
Javier Goizueta f644b3a226 Add cartodb_id to point-grid aggregation
Fixes #846
2018-01-29 12:49:27 +01:00
Simon Martín 8c839e214d changing the value of string 2018-01-26 15:44:21 +01:00
Simon Martín 99421b613c moving 'other' outside of the query allowing queries of different types 2018-01-26 15:24:21 +01:00
Simon Martín bc7a556297 removing category cast to string in aggregation 2018-01-26 12:37:10 +01:00
Eneko Lakasta 220f1d6a73 use original column name in group by instead of alias 2018-01-18 15:27:54 +01:00
Raul Ochoa d5b5ef584d Be explicit about requesting urlTemplate+subdomains format 2018-01-03 23:33:59 +00:00
Raul Ochoa f7f513a61a Add urlTemplate URLs to metadata
This is useful when using client libraries like leaflet.
2018-01-03 20:53:03 +00:00