Use hasOwnProperty method to check if histogram is a time-series
This commit is contained in:
@@ -42,7 +42,7 @@ module.exports = class Histogram {
|
||||
}
|
||||
|
||||
_isDateHistogram (override = {}) {
|
||||
return (this.options.aggregation !== undefined || override.aggregation !== undefined);
|
||||
return (this.options.hasOwnProperty('aggregation') || override.hasOwnProperty('aggregation'));
|
||||
}
|
||||
|
||||
getResult (psql, override, callback) {
|
||||
|
||||
@@ -64,7 +64,7 @@ const binsQueryTpl = ctx => `
|
||||
${ctx._maxBins}
|
||||
)
|
||||
)
|
||||
END AS __cdb_bins_number
|
||||
END AS __cdb_bins_number
|
||||
FROM __cdb_basics, __cdb_iqrange, __cdb_filtered_source
|
||||
LIMIT 1
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user