Fix column stats to support spaces in names

This complements changes in #1020
This commit is contained in:
Javier Goizueta 2018-08-21 12:55:30 +02:00
parent 9740b65fe7
commit d338b5ca37

View File

@ -148,7 +148,7 @@ function _columnStats(ctx, columns) {
Object.keys(columns).forEach(name => {
aggr = aggr.concat(
columnAggregations(columns[name])
.map(fn => `${fn}(${name}) AS ${name}_${fn}`)
.map(fn => `${fn}("${name}") AS "${name}_${fn}"`)
);
if (columns[name].type === 'string') {
const topN = ctx.metaOptions.columnStats.topCategories || 1024;