implydata/plywood

How to define JavaScript post-aggregator with plywood ?

longweiquan opened this issue · 0 comments

Hello Team plywood,

I would like to know how to define JS Post Aggregator with plywood ?

In my use case, I need to apply the formula similar to following one:

$data.filter($type == "A").sum($count) * 1 + $data.filter($type == "B").sum($count) * 2 + $data.filter($type == "C").sum($count) * 3 + ...

Plywood will generate a query with many filter aggregators executed in druid side, which is very slow.

To improve the performance, I can only apply dimension on type and apply post aggregator for the final result. But I can't find the approach to add custom post aggregators with plywood.