SOLVED: PgArray returning most values, but one `NaN`?
I have a postgres view that is performing a
string_agg.
I've mapped it to drizzle as shown below. When querying it, most of the values are correct, but each array contains one NaN value.
Querying the database directly returns all values correctly.
What is my best strategy to debug this? Logging the query shows nothing unusual.
1 Reply
This has been solved by my teammate—the key was to cast to integer in the postgres view itself:
array_agg(mbr.models_id order by mbr.models_id) :: int[] as model_ids