Filter out special float values before categorizing them
This commit is contained in:
parent
668b22628c
commit
3f17c8b15a
@ -60,7 +60,7 @@ var categoriesSummaryCountQueryTpl = dot.template([
|
||||
' SELECT count(1) AS categories_count',
|
||||
' FROM (',
|
||||
' SELECT {{=it._column}} AS category',
|
||||
' FROM ({{=it._query}}) _cdb_categories',
|
||||
' FROM filtered_source',
|
||||
' GROUP BY {{=it._column}}',
|
||||
' ) _cdb_categories_count',
|
||||
')'
|
||||
@ -82,7 +82,7 @@ var rankedAggregationQueryTpl = dot.template([
|
||||
var aggregationQueryTpl = dot.template([
|
||||
'SELECT CAST({{=it._column}} AS text) AS category, {{=it._aggregation}} AS value, false as agg,',
|
||||
' nulls_count, min_val, max_val, count, categories_count, nans_count, infinities_count',
|
||||
'FROM ({{=it._query}}) _cdb_aggregation_all, summary, categories_summary_min_max, categories_summary_count',
|
||||
'FROM filtered_source, summary, categories_summary_min_max, categories_summary_count',
|
||||
'GROUP BY category, nulls_count, min_val, max_val, count, categories_count, nans_count, infinities_count',
|
||||
'ORDER BY value DESC'
|
||||
].join('\n'));
|
||||
|
@ -505,7 +505,7 @@ describe('dataviews using tables with overviews', function() {
|
||||
describe('aggregation special float values', function () {
|
||||
var params = {};
|
||||
|
||||
it("should expose an aggregation dataview", function (done) {
|
||||
it("should expose an aggregation dataview filtering special float values out", function (done) {
|
||||
var testClient = new TestClient(overviewsMapConfig);
|
||||
testClient.getDataview('test_categories_special_values', params, function (err, dataview) {
|
||||
if (err) {
|
||||
@ -519,12 +519,8 @@ describe('dataviews using tables with overviews', function() {
|
||||
infinities: 1,
|
||||
min: 6,
|
||||
max: 6,
|
||||
categoriesCount: 3,
|
||||
categories:[
|
||||
{ category: 'El Rey del Tallarín', value: null, agg: false },
|
||||
{ category: 'El Lacón', value: null, agg: false },
|
||||
{ category: 'Hawai', value: 6, agg: false }
|
||||
],
|
||||
categoriesCount: 1,
|
||||
categories: [ { category: 'Hawai', value: 6, agg: false } ],
|
||||
type: 'aggregation'
|
||||
});
|
||||
testClient.drain(done);
|
||||
|
Loading…
Reference in New Issue
Block a user