risingwavelabs / risingwave

SQL stream processing, analytics, and management. We decouple storage and compute to offer instant failover, dynamic scaling, speedy bootstrapping, and efficient joins.
https://www.risingwave.com/slack
Apache License 2.0
6.58k stars 537 forks source link

Support Geometry datatypes (Postgis compatability) #16829

Open lukaswelte opened 1 month ago

lukaswelte commented 1 month ago

Is your feature request related to a problem? Please describe.

We work with a lot of spatial data. Being able to do materialized views by e.g. grouping / combining different locations or linestrings is a massive thing for us.

Describe the solution you'd like

Support GEOMETRY types and implement as many functions from Postgis as possible

Describe alternatives you've considered

We can sink data to a Postgres DB and then do the aggregations there, but this denies the purpose of risingwave to a large degree that it could enable to do a incremental materialized view in a convenient/easy form.

Additional context

No response

cdmikechen commented 2 days ago

I think supporting geometry type can be broken down into several steps:

My colleagues contributed a lot of work on geometry support for databend, which is also an extension using rust and based on the geo-rust project. I think there are a lot of places we can refer to databend for implementation. https://github.com/datafuselabs/databend/issues/14543

Geometry type support I think is the most core part, geo function and others we can temporarily use udf to solve.