ibis icon indicating copy to clipboard operation
ibis copied to clipboard

docs(duckdb-geospatial): document adding R-Tree spatial index with raw_sql

Open ncclementi opened this issue 1 year ago • 3 comments

Is your feature request related to a problem?

No

What is the motivation behind your request?

DuckDB added support for spatial indexes in their latest release 1.1.0 which will enable faster spatial joins. See https://duckdb.org/2024/09/09/announcing-duckdb-110.html#r-tree

Describe the solution you'd like

I'd like Ibis to have a way to support the creation of this type of index. I'm not sure if this is possible but I'd like to discuss how we would implement this in the comments of this issue.

What version of ibis are you running?

main

What backend(s) are you using, if any?

DuckDB

Code of Conduct

  • [X] I agree to follow this project's Code of Conduct

ncclementi avatar Sep 11 '24 15:09 ncclementi

As per some internal discussion, we may not want to open up the huge can of worms that represents support for creating indexes, but we should, at the least, document how a user can go about both creating those indexes using raw_sql and also checking whether an existing table HAS an index on it (as a pre-check before doing an otherwise more expensive spatial join)

gforsyth avatar Sep 11 '24 17:09 gforsyth

I'm happy to close this as not planed, unless we want to leave it open for some reason.

ncclementi avatar Sep 12 '24 15:09 ncclementi

I would leave it open for now and close it out with a PR adding a how-to doc on using raw_sql to add the index and how to check that an rtree index has been added.

gforsyth avatar Sep 12 '24 15:09 gforsyth