From 2e26e2e126a9a48b6ce293ebb74dbf86476ec326 Mon Sep 17 00:00:00 2001 From: Raul Ochoa Date: Fri, 13 May 2016 12:57:43 +0200 Subject: [PATCH] Use split strategy for head/tails turbo-carto quantification --- NEWS.md | 3 +++ lib/cartodb/utils/style/postgres-datasource.js | 6 +++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/NEWS.md b/NEWS.md index 0f65992f..fc1e6334 100644 --- a/NEWS.md +++ b/NEWS.md @@ -4,6 +4,9 @@ Released 2016-mm-dd +Enhancements: + - Use split strategy for head/tails turbo-carto quantification + Announcements: - Upgrades turbo-carto to [0.9.0](https://github.com/CartoDB/turbo-carto/releases/tag/0.9.0) diff --git a/lib/cartodb/utils/style/postgres-datasource.js b/lib/cartodb/utils/style/postgres-datasource.js index fd6e02c1..5db35607 100644 --- a/lib/cartodb/utils/style/postgres-datasource.js +++ b/lib/cartodb/utils/style/postgres-datasource.js @@ -23,6 +23,10 @@ var methodTemplates = Object.keys(methods).reduce(function(methodTemplates, meth return methodTemplates; }, {}); +var method2strategy = { + headtails: 'split' +}; + function PostgresDatasource (pgQueryRunner, username, query) { this.pgQueryRunner = pgQueryRunner; this.username = username; @@ -48,7 +52,7 @@ PostgresDatasource.prototype.getRamp = function (column, buckets, method, callba return a - b; }); - return callback(null, ramp); + return callback(null, { ramp: ramp, strategy: method2strategy[methodName] }); }); };