Use inline functions to filter desired fields of the row
This commit is contained in:
parent
5fc2b46d56
commit
e3bffcd39d
@ -277,10 +277,7 @@ module.exports = class DateHistogram extends BaseHistogram {
|
||||
}
|
||||
|
||||
_getBuckets (result) {
|
||||
return result.rows.map(row => {
|
||||
const { bin, min, max, avg, freq, timestamp } = row;
|
||||
return { bin, min, max, avg, freq, timestamp };
|
||||
});
|
||||
return result.rows.map(({ bin, min, max, avg, freq, timestamp }) => ({ bin, min, max, avg, freq, timestamp }));
|
||||
}
|
||||
|
||||
_getAggregation (override = {}) {
|
||||
|
@ -224,10 +224,7 @@ module.exports = class NumericHistogram extends BaseHistogram {
|
||||
}
|
||||
|
||||
_getBuckets (result) {
|
||||
return result.rows.map(row => {
|
||||
const { bin, min, max, avg, freq } = row;
|
||||
return { bin, min, max, avg, freq };
|
||||
});
|
||||
return result.rows.map(({ bin, min, max, avg, freq }) => ({ bin, min, max, avg, freq }));
|
||||
}
|
||||
|
||||
_populateBinStart (firstRow, override = {}) {
|
||||
|
Loading…
Reference in New Issue
Block a user