Slight refactor
This commit is contained in:
parent
418e0e2aa3
commit
ee63b247cd
@ -142,11 +142,18 @@ function _sample(ctx, numRows) {
|
||||
return Promise.resolve();
|
||||
}
|
||||
|
||||
function _columnsMetadataRequired(options) {
|
||||
// We need determine the columns of a query
|
||||
// if either column stats or dimension stats are required,
|
||||
// since we'll ultimately use the same query to fetch both
|
||||
return options.columnStats || options.dimensions;
|
||||
}
|
||||
|
||||
function _columnStats(ctx, columns, dimensions) {
|
||||
if (!columns) {
|
||||
return Promise.resolve();
|
||||
}
|
||||
if (ctx.metaOptions.columnStats || ctx.metaOptions.dimensions) {
|
||||
if (_columnsMetadataRequired(ctx.metaOptions)) {
|
||||
let queries = [];
|
||||
let aggr = [];
|
||||
if (ctx.metaOptions.columnStats) {
|
||||
|
Loading…
Reference in New Issue
Block a user