Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cardinality estimation, replacement scans, misc fixes and breaking changes to GEOMETRY format. #124

Merged
merged 8 commits into from
Sep 10, 2023

Conversation

Maxxen
Copy link
Member

@Maxxen Maxxen commented Sep 10, 2023

This PR is kind of a mismatch of small tweaks and fixes that have accumulated

  • ST_Read now provides an estimated cardinality if it is cheap to compute for the underlying GDAL driver. This enables the query planners join-ordering optimizations to kick in in queries with multiple joins and could improve performance significantly in certain cases.

  • There is now a couple of "replacement scans" for FlatGeobuf, GPKG and Shapefiles, so you can do

    • SELECT * FROM '.../path/to/some/data.gpkg'
    • SELECT * FROM 'data.fgb'
    • SELECT * FROM '.../also/random.shp'

    without invoking ST_Read explicitly if you don't care about passing any additional open options or parameters.

  • The internal serialized geometry format is shuffled around to make room and future proof it as DuckDB is moving towards stabilizing storage. This means that if you persist GEOMETRY objects in a database table and try to read them again after upgrading to a duckdb version containing this commit you will probably not be able to read them. Hopefully this is the last time we break compatability like this.

  • Closes Broken Output from ST_AsText #118, Multipolygons were not printed properly as WKT.

  • Closes ST_Transform sometimes returns POINT(Infinity Infinity) #119, Adds an additional optional boolean always_xy argument to st_transform to force PROJ to expect and output coordinates in the "conventional" GIS ordering (Longitude, Latitude) regardless of what is defined by the CRS. Falls back to the default behavior if not possible.

@Maxxen Maxxen merged commit a99134f into duckdb:main Sep 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ST_Transform sometimes returns POINT(Infinity Infinity) Broken Output from ST_AsText
1 participant