duckdb / duckdb_spatial

MIT License
489 stars 40 forks source link

Fix skipping of PrimitiveGroups in ST_ReadOSM #375

Closed pilate closed 3 months ago

pilate commented 3 months ago

Currently ST_ReadOSM is only reading the first 'PrimitiveGroup' per 'PrimitiveBlock'.

When the parsing loop seeks to the granularity/offset fields, it advances the block_reader position beyond any unprocessed groups, causing them to be missed.

By making a copy of block_reader, we can grab the granularity/offsets without messing up the real one.

This also makes sure we only have to read the values once per block.

Fixes #349.

Maxxen commented 3 months ago

Hi! Thanks for digging in to this and fixing it, really appreciated! LGTM.

wcedmisten commented 2 months ago

Thanks for the fix! Do you know when this fix would be released? Is there a preview version I can test with?

wcedmisten commented 2 months ago

Never mind! available in the nightly build

https://github.com/duckdb/duckdb_spatial/issues/349#issuecomment-2335011589