Use split strategy for head/tails turbo-carto quantification

This commit is contained in:
Raul Ochoa 2016-05-13 12:57:43 +02:00
parent 94639f7e0c
commit 2e26e2e126
2 changed files with 8 additions and 1 deletions

View File

@ -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)

View File

@ -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] });
});
};