Closed mick closed 9 months ago
Hi! Great work! If the CI passes im inclined to merge this if it solves your problem! I still plan to look into this deeper but after a quick glance I don't think this actually solves the underlying issue of not being able to chain GDAL's auxiliary virtual filesystems within DuckDBs filesystem plugin, and so Im not sure this will work on e.g. WASM or in combination with DuckDBs httpfs. But as I said if it solves your use-case with local gzipped files that's good enough reason to merge for now anyway.
@Maxxen yeah it does fix my usage, but yeah it not a holistic fix.
As you mentioned, maybe adding the duckdb vsi prefix should happen in a different order. In most cases probably the user supplied VSIs should come before the duckdb vsi prefix. maybe for all them except the network based VSIs?
Fixes https://github.com/duckdb/duckdb_spatial/issues/255
disclaimer: I dont write c++ and dont know much of the internals of either of these projects, so please let me know if there a better / preferred approach.
Added a very basic test for use of VSI. I was gonna include a test writing a file and use that newly written gzipped file, rather than including the one in this PR, but
COPY TO
using/vsigzip/
prefix doesnt work yet:Error: Not implemented Error: GDAL Error (6): Seeking on writable compressed data streams not supported.
Maybe that can be addressed in the future. I assume it more involved change.