This message was deleted.
# troubleshooting
s
This message was deleted.
a
the
size
is argument in the function itself. you should refer to the documentation of this function in druid docs.
c
I haven't been able to find the documentation for
ARRAY_AGG
...are they somehow in Javadocs?
h
can you share the query you were trying to run?
g
the relevant part isβ€”
πŸ™Œ 1
c
Thank you!
Copy code
CASE WHEN CAST(ARRAY_QUANTILE(ARRAY_AGG( OURCOLUMN, 500000), 0.10) AS BIGINT) = 'NaN' THEN NULL ELSE ARRAY_QUANTILE(ARRAY_AGG(OURCOLUMN, 500000), 0.10) END ) AS "OURCOLUMN_10_percentile"
This is the query we're trying now, and we're getting 504 (timeout) errors
Regarding the documentation...I feel kinda dumb! I looked into the Array Functions for...an array function...which I thought was where it would go! Thanks for finding the relevant information for me @Gian Merlino and @Hellmar Becker
I think I have found a solution! Since we're calculating what value is for a ranked percentile, the distinct values are what matter--not the frequency of the values. Thus, if I use the
ARRAY_AGG(DISTINCT expr, [size])
then the query returns a value without a 504 timeout. I'll report back with any updates, but for now this seems to be resolved!
g
ah, that's even better! yeah, that'd mean less data for the agg to deal with
βœ… 1
about the docs, yeah, it would make sense for us to link from 'array functions' to the aggregate section too