Can druid query result be ordered by "timestamp" descending

The result of druid query is ordered by “timestamp” ascending default, How can I set the json query to get result by “timestamp” descending?



This is actually a common request that people ask for and something that Druid cannot currently support, but we hope to support in the near future. If you are interested in potentially implementing this, we can chat about it in the dev forum. It’ll require reversing cursors in Druid.


here is my druid timeseries query

var queryRep = client.timeseries();




// .descending(true)

.aggregation(‘count’, ‘rows’);

If I enabled .descending(true). it will return .descending() is not function.

can you help me to fix the issue.

This is my first time to see druid in js. What library is this?

Maybe try orderBy function if it exists?

Here is the library:

I tried orderBy too. it will only supporting topN, groupBy query. I am using timeseries query.

Let me know if you find any update.