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

Fix building of queries requiring SELECT DISTINCT #264

Merged
merged 1 commit into from
Jul 27, 2022

Conversation

clausnagel
Copy link
Member

This PR fixes #262.

In some cases, the query specified for a CityGML export leads to a SELECT statement that chooses the ENVELOPE column from CITYOBJECT and at the same time requires DISTINCT to avoid duplicates. While DISTINCT can be used for the ENVELOPE column under PostgreSQL/PostGIS, this combination leads to an error under Oracle (see #262).

This PR fixes the issue by avoiding DISTINCT in case the ENVELOPE column is selected. Instead, the query is rewritten to use row_number() and ORDER BY to avoid duplicates.

@clausnagel clausnagel requested a review from yaozhihang July 26, 2022 20:46
@clausnagel clausnagel linked an issue Jul 27, 2022 that may be closed by this pull request
@clausnagel clausnagel merged commit be612a8 into release-5.2 Jul 27, 2022
@clausnagel clausnagel deleted the hotfix-select-distinct branch July 27, 2022 08:51
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.

Spatial-filtered Export failed under Oracle
2 participants