-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
OGR SQL: "SELECT DISTINCT hstore_get_value(...)" doesn't work #3671
Comments
The OGR SQL dialect and SQLite dialect do not support exactly same set of SQL functions. For example, all SpatiaLite functions are only avaialble with the SQLite function. This hstore query thing is something special, though. Hstore is something that does not exist in the source data that is in PBF format but the OSM driver creates an virtual attribute that behaves like hstore behaves in PostGIS. It seems to be undocumented that you can use SQL |
So maybe this issue could be addressed by updating the docs. Happy to help with that although I must say I am new to SQL queries in this area. |
hstore_get_value() is documented as available in both OGR and SQLite dialects in https://gdal.org/user/ogr_sql_dialect.html?highlight=hstore_get_value and https://gdal.org/user/sql_sqlite_dialect.html?highlight=hstore_get_value . The issue here is the use of DISTINCT function_name() with the OGR SQL dialect, which I assume isn't supported currently bit due to its many limitations. Only DISTINCT column_name is |
Thanks for the explanation. Not sure if this is actionable. Keen to help out if so and happy to close if not. |
Expected behavior and actual behavior.
Should generate a valid result, like:
Instead it generates an error message:
Steps to reproduce the problem.
See reproducible example above.
Operating system
Ubuntu 20.04
GDAL version and provenance
From ubuntugis-unstable PPA
Background: https://gis.stackexchange.com/questions/393540
The text was updated successfully, but these errors were encountered: