-
Notifications
You must be signed in to change notification settings - Fork 63
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
unsupported aggregate action while running .collect() #171
Comments
@lastlegion Could you post your query (make it more generic if you need to)? You should be running I may be able to help out more if I understand your exact query. |
I've been trying different variants of the following query:
or
and I get the following error:
I tried replacing |
@lastlegion You're completely correct on this. I also ran into this issue when I tried running it. What you want to do instead is first split by So your first query would turn into var ex4 = ply()
.apply("d", $("dataset")
.filter($("field2").in(0,1))
)
.apply("dd2", $("d")
.split({id: "$field2"})
.collect("$id")
) Perhaps @vogievetsky may be able to shed some light on why Plywood doesn't perform this by default, or if my logic on the reasoning is correct. |
Thanks for your help! Yes I'm able to the desired output by applying |
@lastlegion You're welcome! I'm not actually a member of Imply, so I can't accept any PRs or anything. I do think the documentation is fairly good, but could could definitely be improved. You can try submitting a PR for it in https://github.com/implydata/plywood/blob/master/docs/expressions.md and calling out @vogievetsky (who I believe is the sole owner of this codebase). Would appreciate if you could close this issue as well since it's fixed. |
Yes I agree the documentation is really good! |
Hi I'm not able to run
.collect()
. I get the the following error:unsupported aggregate action
Digging through the source code I found there is no handler for collect. There are corresponding
countToAggregation
,countDistinctToAggregation
etc. but nocollectToAggregation
. Is that the issue?https://github.com/implydata/plywood/blob/master/src/external/utils/druidAggregationBuilder.ts#L190
The text was updated successfully, but these errors were encountered: