Fix non-default aggregation columns
The columns for non-default aggregations were the base columns not the resulting aggregated columns In particular this could cause invalid wrapped SQL code to be passed to ST_AsMVT when the Windshaft pg-mvt renderer was used.
This commit is contained in:
parent
fefb0b23af
commit
2132960d7c
@ -173,16 +173,12 @@ module.exports = class AggregationMapConfig extends MapConfig {
|
||||
|
||||
let aggregatedColumns = [];
|
||||
if (columns) {
|
||||
aggregatedColumns = Object.keys(columns)
|
||||
.map(key => columns[key].aggregated_column)
|
||||
.filter(aggregatedColumn => typeof aggregatedColumn === 'string');
|
||||
aggregatedColumns = Object.keys(columns);
|
||||
}
|
||||
|
||||
let dimensionsColumns = [];
|
||||
if (dimensions) {
|
||||
dimensionsColumns = Object.keys(dimensions)
|
||||
.map(key => dimensions[key])
|
||||
.filter(dimension => typeof dimension === 'string');
|
||||
dimensionsColumns = Object.keys(dimensions);
|
||||
}
|
||||
|
||||
return removeDuplicates(aggregatedColumns.concat(dimensionsColumns));
|
||||
|
Loading…
Reference in New Issue
Block a user