Open carterhughes opened 1 year ago
Hi! Thanks for the suggestion. There are some remnants of some old implementations of e.g st_union in the code already, but there's two issues why I hesitated to go further with them.
st_union_agg
or st_kmeans_agg
. We could of course add an alias in the future, so this is not really a big problem.DuckDB's aggregate code in general is pretty complicated since we need to be able to aggregate out-of-core, which limits flexibility in implementing new aggregates. But this is something we're aware of and are looking into.
Thanks for the suggestion on ST_Intersection as well. I'll see if I can get some "naive" aggregate implementations in next release.
It would be particularly helpful to implement spatial aggregate functions that are an aggregate variant of duckdb spatial supported geometry construction functions. Here are examples outlined by PostGIS: https://postgis.net/docs/PostGIS_Special_Functions_Index.html#PostGIS_Aggregate_Functions. Also consideration for an aggregate variant of St_Intersection, which is not implemented in PostGIS.