Fix aggregation-query dimension functions regarding to spaces in columns
This commit is contained in:
parent
31263b7b22
commit
e0f49ca8f5
@ -117,17 +117,19 @@ const dimensionNames = (ctx, table) => {
|
|||||||
let dimensions = aggregateDimensions(ctx);
|
let dimensions = aggregateDimensions(ctx);
|
||||||
if (table) {
|
if (table) {
|
||||||
return sep(Object.keys(dimensions).map(
|
return sep(Object.keys(dimensions).map(
|
||||||
dimension_name => `${table}.${dimension_name}`
|
dimension_name => `${table}."${dimension_name}"`
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
return sep(Object.keys(dimensions));
|
return sep(Object.keys(dimensions).map(dimension_name => {
|
||||||
|
return `"${dimension_name}"`;
|
||||||
|
}));
|
||||||
};
|
};
|
||||||
|
|
||||||
const dimensionDefs = ctx => {
|
const dimensionDefs = ctx => {
|
||||||
let dimensions = aggregateDimensions(ctx);
|
let dimensions = aggregateDimensions(ctx);
|
||||||
return sep(Object.keys(dimensions).map(dimension_name => {
|
return sep(Object.keys(dimensions).map(dimension_name => {
|
||||||
const expression = dimensions[dimension_name];
|
const expression = dimensions[dimension_name];
|
||||||
return `${expression} AS ${dimension_name}`;
|
return `"${expression}" AS "${dimension_name}"`;
|
||||||
}));
|
}));
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user