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 SQL parsing for MVT provider #744

Closed
wants to merge 1 commit into from

Conversation

johngian
Copy link
Contributor

@johngian johngian commented Mar 2, 2021

  • Make ID field optional
  • Fix geometry sniffing for MVT queries
  • Fix handling MVT provider SQL when using (SELECT ...) as alias queries

@ARolek
Copy link
Member

ARolek commented Mar 4, 2021

@johngian it looks like this PR is failing the test suite: https://github.com/go-spatial/tegola/pull/744/checks?check_run_id=2015097575. I can help look into this if that would be helpful.

* Make ID field optional
* Fix geometry sniffing for MVT queries
* Fix handling MVT provider SQL when using (SELECT ...) as alias queries
@coveralls
Copy link

Pull Request Test Coverage Report for Build cbedc67ec-PR-744

  • 35 of 42 (83.33%) changed or added relevant lines in 3 files are covered.
  • 7 unchanged lines in 2 files lost coverage.
  • Overall coverage increased (+0.02%) to 45.673%

Changes Missing Coverage Covered Lines Changed/Added Lines %
provider/postgis/postgis.go 13 16 81.25%
provider/postgis/util.go 16 20 80.0%
Files with Coverage Reduction New Missed Lines %
server/viewer.go 3 61.54%
server/server.go 4 83.33%
Totals Coverage Status
Change from base Build 8e40cafbb: 0.02%
Covered Lines: 5409
Relevant Lines: 11843

💛 - Coveralls

Copy link
Member

@gdey gdey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@@ -16,8 +16,13 @@ import (
"github.com/jackc/pgx/pgtype"
)

// isMVT will return true if the provider is MVT based
func isMVT(providerType string) bool {
return providerType == "mvt_postgis"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minor nit, but since we're using "mvt_postgis" in more than 1 place (register.go and here), we should probably move it to a const.

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.

4 participants