| This seems to be a result of aggregating functions, like count, creating "projections" that order by doesn't know about because they are not in the query maps defined in the query engine. It is also explicitly disallowed in PQL, you can use only a group by or a paging operator, but not both. In AST, the order by operator seems to nulify the entire extract statement where the group by is.
$ curl -X POST http://localhost:8080/pdb/query/v4 -H 'Content-Type:application/json' -d '{"query": [ "from", "events", [ "extract", [ ["function", "count"], "status" ], [ "group_by", "status" ] ] ]}' |
[{"status":"success","count":1}]
|
and when you add an order by get an error. |