yupeng9 edited a comment on issue #7190: URL: https://github.com/apache/incubator-pinot/issues/7190#issuecomment-885047361
In Pinot, this `ST_Contains` delegates the computation to JTS, [source code](https://github.com/apache/incubator-pinot/blob/f2e3446e75f1ec1d553805d03f6504f05b3e3c0e/pinot-core/src/main/java/org/apache/pinot/core/geospatial/transform/function/StContainsFunction.java#L89). Based on our observations, some geospatial functions can be very expensive to evaluate, for example with complex polygons. So some forms of approximation could greatly improve the query performance, e.g. use `ST_Distance(polygon center, point) < distance`. In addition, geospatial indexing can also significantly improve query performance, and we gave some examples on ST_Distance in this [blog](https://eng.uber.com/orders-near-you/). We have not added the geospatial indexing support on `ST_Contains`, but it's possible to hexagon to approximate the polygon shape and improve the query perf. And this can be one of the future improvements to Pinot. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
