-
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
array_agg and undefined/none values #333
Comments
I just discovered the same issue. It seems like a bug to me? @carsten-jahn Did you find a solution for this? How to reproduce: aq.table({ v: [1, null, 1, 2, 3, 1] })
.rollup({ a: op.array_agg('v') }) // [1, 1, 2, 3, 1] |
Hi @dldx , I looked into this again. I don't have an elegant solution for this in arquero. All I can do is setting the null values to a specific constant before calling I had a look into implementing a custom aggregator function as described in https://uwdata.github.io/arquero/api/extensibility#addAggregateFunction and https://observablehq.com/@uwdata/adding-aggregate-functions-to-arquero , however this doesn't help either, as its |
@carsten-jahn Thanks for replying! I will try to investigate further :) |
Thanks a lot for this great library!
I came across an issue with
array_agg
, I would like to preserve undefined / null values in my dataset and keep them in the aggregated array. However, arquero is skipping the undefined values and the result ofarray_agg
is a shorter array.I tried to implement a custom aggregate function, but the result was the same, i.e. these values seem to be filtered out before the aggregation is invoked.
It would be great if there was a way of just aggregating all values and "non-values" in an array.
The text was updated successfully, but these errors were encountered: