Javier Goizueta
32092d212e
Fix bug
2018-05-21 14:05:27 +02:00
Javier Goizueta
11cdcc65ad
Add safety limit to sample metadata
...
The sampling probability is now being computed using an estimate of the table row count
This could led to too high probabilities (to large samples) if the estimate is not accurate.
To avoid potential problems with large samples we've added a LIMIT to the sampling queries.
2018-05-21 12:45:16 +02:00
Javier Goizueta
391ac51f0f
Implement metadata queries with plain Promises
...
Remove usage of PhasedExecution
This achives better query execution granularity and
removes questionable usage of shared results object.
It introduces a couple of behavior changes:
* estimatedFeatureCount desn't ignore errors now
* sample always uses estimatedFeatureCount,even if the actual count is also computed.
2018-05-18 15:33:07 +02:00
Javier Goizueta
24b1b53ba0
Merge branch 'master' into metadata
2018-05-11 18:58:38 +02:00
Javier Goizueta
3b4668cc19
Fix simple tabley sampling
2018-05-11 14:45:12 +02:00
Javier Goizueta
eea7bed2f3
Slightly more elegant results of queries
2018-05-08 20:41:42 +02:00
Javier Goizueta
741bcd1a80
Metadata fixes
2018-05-08 20:07:20 +02:00
Javier Goizueta
b96be69a5c
Clarify example
2018-05-08 13:08:01 +02:00
Javier Goizueta
636cd8cd50
Fix:phase execution
...
phase (not only its tasks) must be executed after the tasks of previous phases
2018-05-08 12:56:06 +02:00
Javier Goizueta
c647f852d6
Refactor metadata queries execution
...
Also fixed bug where sampling query generation needed results of count queries
2018-05-08 11:09:09 +02:00
Javier Goizueta
ebab879aca
Fix bugs & typos
2018-05-08 11:07:47 +02:00
Javier Goizueta
7561635b24
WIP:add layer metadata
2018-05-07 19:03:19 +02:00
Daniel García Aubert
a21d7db390
Extract json-replacer
2018-04-03 13:21:41 +02:00
Daniel García Aubert
8ce72ea842
Do not pass res.locals
to collaborators
2018-03-22 12:30:51 +01:00
Daniel García Aubert
02f93f3a14
Extract layergroup-metadata class
2018-03-09 12:58:05 +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
0236935212
please jshint
2018-01-11 12:22:51 +01:00
Eneko Lakasta
ae48a01e26
extract setICUEnvVariable() to it's own module
2018-01-11 11:57:11 +01:00
Daniel García Aubert
a987f6ac05
Fix issue when the sql has single quotes defined and the aggregation metadata query was not able to estimate row count
2017-12-14 14:14:55 +01:00
Daniel García Aubert
006dd86614
Merge branch 'master' into mapconfig-aggregation
2017-12-11 17:36:58 +01:00
Daniel García Aubert
dab204ea71
Do not aggregate if rows cout is lower than threshold or the layer's sql has geometries distinct of points
2017-12-11 17:32:06 +01:00
Raul Marin
dfe01c836c
Escape getQueryRowCount with $$
2017-12-11 11:27:13 +01:00
Raul Marin
fcbf5ffcc5
Move sql helper functions to query-utils.js
2017-12-11 11:27:13 +01:00
Mario de Frutos
ed56094be2
PR changes
2017-05-18 11:51:12 +02:00
Raul Ochoa
c539d4fbbd
Change camshaft naming from filters
2016-07-06 21:11:39 +02:00
Raul Ochoa
863128013d
Use psql client instead of pg query runner to use proper params
2016-06-21 12:08:40 +02:00
Raul Ochoa
403dcbebcd
Use an empty array as default value for falsy ramps
...
Fixes #507
2016-06-20 13:27:39 +02:00
Raul Ochoa
01a69ef15c
Merge remote-tracking branch 'origin/master' into mapconfig-reorg
2016-05-23 15:14:25 +02:00
Raul Ochoa
fb045f1836
Merge branch 'master' into turbo-carto-tokens
2016-05-23 15:06:55 +02:00
Raul Ochoa
ee49b8b2a2
Turbo-carto adapter into adapters package
2016-05-23 14:18:58 +02:00
Raul Ochoa
b308259e6f
Merge branch 'master' into turbo-carto-category
...
Conflicts:
lib/cartodb/utils/style/postgres-datasource.js
2016-05-19 16:58:31 +02:00
Raul Ochoa
14a0afc7c0
Merge branch 'master' into turbo-carto-tokens
2016-05-19 16:56:00 +02:00
Raul Ochoa
424cc6d93b
Fail on turbo-carto invalid quantification methods
2016-05-19 15:54:58 +02:00
Raul Ochoa
3bacfecc49
Merge branch 'master' into turbo-carto-category
2016-05-19 13:43:35 +02:00
Raul Ochoa
ee94b8a587
Very raw implementation of SubstitutionTokens based on origin data
2016-05-19 12:13:49 +02:00
Raul Ochoa
ba08745c23
Adds hasTokens method to SubstitutionTokens
2016-05-19 12:10:19 +02:00
Raul Ochoa
573932efba
Simplify condition and use positive naming for parsing cartocss
2016-05-19 11:48:57 +02:00
Javier Goizueta
e98a5aeff0
Small code clean-up
2016-05-18 15:48:30 +02:00
Javier Goizueta
4c375780c7
replace underscore functions by standard (ES5) equivalents
...
Note: _.find(a,...) is not replaced by a.find(...)
because it is not available for all the collections
we need it for.
2016-05-18 15:43:20 +02:00
Javier Goizueta
48415fb1f3
Merge branch 'master' into overviews-widgets-2
2016-05-18 13:58:55 +02:00
Javier Goizueta
cb3706e5cf
Update Query Rewriter comments
2016-05-18 08:04:11 +02:00
Raul Ochoa
a1934c87d5
Adds turbo-carto category quantification with exact strategy
2016-05-17 19:45:37 +02:00
Javier Goizueta
42ef40282b
💄 shorten long lines
2016-05-17 15:46:13 +02:00
Javier Goizueta
7f7204df6c
Add filter stats information to query rewriter data
2016-05-17 15:41:31 +02:00
Raul Ochoa
8fb35571fe
Adds support for mapnik substitution token at turbo-carto level
...
Goes green and fixes #455
2016-05-17 15:00:18 +02:00
Javier Goizueta
df63fbbd04
Refactor filter application into own model
...
This also avoids storing an object in the overviews query rewriter
for the bbox filter (a plain data structure is used instead).
2016-05-17 13:55:00 +02:00
Javier Goizueta
9d82e8c27c
Use bounding box of dataviews to select overviews level
2016-05-13 20:47:36 +02:00
Javier Goizueta
224eb392ba
Add overviews-dependent dataviews behaviour
...
Now QueryRewriter is used in dataview objects they can decide
whether overviews are applicable, have the oportunity to
adapt queries for overviews, etc.
This is done by having overviews-related behaviour in models/dataview/overviews
and falling back to the regular models/dataview.
2016-05-13 18:46:58 +02:00
Raul Ochoa
2e26e2e126
Use split strategy for head/tails turbo-carto quantification
2016-05-13 12:57:43 +02:00
Raul Ochoa
61765d20e1
Fail on turbo-carto specific errors
...
This will try to fallback on postcss errors so it still targets
carto parser in those cases.
Closes #434
2016-05-13 12:10:05 +02:00