swap around dimensions (#131945)

Co-authored-by: Stratoula Kalafateli <efstratia.kalafateli@elastic.co>
This commit is contained in:
Joe Reuter 2022-05-11 16:08:40 +02:00 committed by GitHub
parent 640bc62b81
commit ae944f485f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -209,7 +209,14 @@ const generateMosaicVisAst: GenerateExpressionAstFunction = (...rest) => ({
{
type: 'function',
function: 'mosaicVis',
arguments: generateCommonArguments(...rest),
arguments: {
...generateCommonArguments(...rest),
// flip order of bucket dimensions so the rows are fetched before the columns to keep them stable
buckets: rest[2]
.reverse()
.map((o) => o.columnId)
.map(prepareDimension),
},
},
],
});