Druid doubleLast and post aggregations

Hi!

I’m trying to make a value like last value / divided by the average value in druid via superset or pyDruid. I’ve aggregation and it works fine:

{“type”: “doubleLast”, “name”: “last_cnt”, “fieldName”: “cnt”}

``

Now I’me trying to make post-aggregation:

{ “type” : “fieldAccess”, “name”: “post_last_cnt”, “fieldName” : “last_cnt” }

And it fails with 500-th. The same for finalizingFieldAccess. In PyDruid I see that fieldAccess returns not a value but a dict with two fields - a date and a value. How to make a post-aggregator like:

{ “type” : “arithmetic”,

“name” : “div”,

“fn” : “/”,

“fields” : [

{ “type” : “fieldAccess”, “name” : “last_cnt”, “fieldName” : “last_cnt” },

{ “type” : “fieldAccess”, “name” : “total_cnt”, “fieldName” : “total_cnt” }

]

}

``