Commit Graph
43 Commits
Author SHA1 Message Date
Daniel García Aubert ca7acb8339 Merge branch 'master' into use-strict 2018-10-25 11:11:30 +02:00
Daniel García Aubert e7e3d612a1 Use strict mode in modules under lib folder (except lib/cartodb/models/resource-locator.js) 2018-10-23 17:45:42 +02:00
Raul Ochoa 26e4a05276 Going green: prevent TypeError for empty tables/results
This is the intial step to fix https://github.com/CartoDB/carto-vl/issues/1049.
2018-10-23 13:50:49 +00:00
Javier Goizueta 73b3402d85 Refactor stats collection 2018-10-09 13:24:08 +02:00
Javier Goizueta ee63b247cd Slight refactor 2018-10-08 19:25:04 +02:00
Javier Goizueta 10baf43ede Fix dimension metadata bug 2018-10-07 00:28:53 +02:00
Javier Goizueta 996d7fc90d Lint fixes 2018-10-06 18:26:43 +02:00
Javier Goizueta f841f65a1e Dimensions metadata 2018-10-04 19:50:14 +02:00
Javier Goizueta d338b5ca37 Fix column stats to support spaces in names
This complements changes in #1020
2018-08-21 12:55:30 +02:00
Javier Goizueta e0cd1aba29 Refactor: move common token substitutions to query-utils 2018-06-18 13:15:45 +02:00
elenatorro 79962a7566 Refactor long line 2018-05-31 19:07:57 +02:00
elenatorro 4213e3163a Move queryPromise function 2018-05-31 18:37:43 +02:00
Javier Goizueta 26da872704 Leave sample exclude_columns for later 2018-05-28 17:37:45 +02:00
Javier Goizueta 4bb8914d9a Add parameters to select metadata sample columns 2018-05-28 16:08:31 +02:00
Javier Goizueta c1feaecbcb Merge branch 'master' into refactor-metadata
# Conflicts:
#	lib/cartodb/backends/layer-stats/mapnik-layer-stats.js
2018-05-23 12:12:36 +02:00
Javier Goizueta 94c34eeb23 Small change to use const 2018-05-23 11:15:20 +02:00
Javier Goizueta 97b4e19777 Add metadata parameter for NULL categories 2018-05-22 13:00:18 +02:00
Javier Goizueta ebc086106f Refactor metadata queryPromise helper
This function to adapt query execution as a Promise was unnecessary complex.
2018-05-21 17:33:03 +02:00
Javier Goizueta 6384f5538c Rename variable for clarity 2018-05-21 17:06:53 +02:00
Javier Goizueta d7a90e6be4 Remove debugging comment 2018-05-21 15:54:52 +02:00
Javier Goizueta b233f18a0f Modernize code copied from SQL API 2018-05-21 15:43:23 +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 fecd63e582 Fix bug 2018-05-21 11:59:49 +02:00
Javier Goizueta 38e55367b1 Revert error behaviour for estimatedFeatureCount
Keep current production behavior of ignoreing errors when computing this stat and returning -1.
This is done as to no introduce any instability in production at the moment.
2018-05-21 11:44:52 +02:00
Javier Goizueta 4e99ff1c39 Fix token substitution for stat queries 2018-05-18 22:25:32 +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 4bc8fb207a Use sql_raw for query without aggregation 2018-05-18 15:29:46 +02:00
Javier Goizueta 012fa91e83 Typo 2018-05-16 14:45:34 +02:00
Javier Goizueta 3af1182206 Rename misleading function argument 2018-05-16 14:45:19 +02:00
Javier Goizueta b906f88a44 Slight refactor 2018-05-11 19:32:03 +02:00
Javier Goizueta 53fae9fbbd Comment 2018-05-11 18:57:14 +02:00
Javier Goizueta 34ad3fcfe8 Add aggregated stat for testing
Also change aggregated stats to not filter a single tile
2018-05-11 14:18:31 +02:00
Javier Goizueta 68b3cb8a34 Fix estimated row count with aggregations
All stats are computed now pre-aggregation
Code to help compute post-aggregation stats remains for testing
2018-05-11 13:44:43 +02:00
Javier Goizueta cae4dd81c9 WIP: fix problems for aggregations & metadata 2018-05-10 19:12:47 +02:00
Javier Goizueta 944ce80c1e Revert debugging change 2018-05-09 11:42:53 +02:00
Javier Goizueta d8ef8cb12f Debug travis test failures 2018-05-09 11:08:02 +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 7d68a2967f Fix: callback expected errors in first argument 2018-05-08 13:08:26 +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 7561635b24 WIP:add layer metadata 2018-05-07 19:03:19 +02:00
Mario de Frutos ed56094be2 PR changes 2017-05-18 11:51:12 +02:00
Daniel García Aubert c65518cf41 Get back layer-stats from windshaft-stats 2017-05-17 20:16:43 +02:00