Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is postAggregations type "expression" not supported? #142

Open
FuleChu opened this issue Apr 8, 2020 · 1 comment
Open

Is postAggregations type "expression" not supported? #142

FuleChu opened this issue Apr 8, 2020 · 1 comment
Assignees

Comments

@FuleChu
Copy link

FuleChu commented Apr 8, 2020

Through the 'case when' statement of /console/druid/ page, json is obtained:
{ "queryType": "groupBy", "dataSource": { "type": "table", "name": "dw_action_sec_data_test" }, "intervals": { "type": "intervals", "intervals": [ "-146136543-09-08T08:23:32.096Z/146140482-04-24T15:36:27.903Z" ] }, "virtualColumns": [], "filter": null, "granularity": { "type": "all" }, "dimensions": [ { "type": "default", "dimension": "actionId", "outputName": "d0", "outputType": "LONG" }, { "type": "default", "dimension": "applicationId", "outputName": "d1", "outputType": "LONG" } ], "aggregations": [ { "type": "count", "name": "a0" }, { "type": "longSum", "name": "a1", "fieldName": "reqCount", "expression": null }, { "type": "longSum", "name": "a2", "fieldName": "errorCount", "expression": null } ], "postAggregations": [ { "type": "expression", "name": "p0", "expression": "case_searched(((\"a1\" - \"a2\") > 1),1,11110)", "ordering": null } ], "having": null, "limitSpec": { "type": "default", "columns": [], "limit": 100 }, "context": { "sqlOuterLimit": 100, "sqlQueryId": "d45d2637-1a15-43aa-9e6f-fe86a7b281f7" }, "descending": false }
It is found that the type of postAggregations is' expression ', but no corresponding type has been found in druidry. Is this type not supported?Or did I not find the right class?

@abhi-zapr
Copy link
Contributor

I was trying to find expression type post aggregator in druid documentation, I was not able to find. May be that's why it's not implemented yet in library.

But then I checked druid sources, it's there at org.apache.druid.query.aggregation.post.ExpressionPostAggregator and we can include it. If you are interested you can raise a patch for expression post aggregator.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants