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

Column definitions are incorrectly marked as unique #21

Closed
abucklecslt opened this issue Sep 9, 2016 · 4 comments
Closed

Column definitions are incorrectly marked as unique #21

abucklecslt opened this issue Sep 9, 2016 · 4 comments
Assignees
Labels
Milestone

Comments

@abucklecslt
Copy link

Class TableVerifier method getUniques() needs to consider the unique column when executing the PRAGMA index_list() method. getUniques() method is currently returning both unique and non unique columns. A possible fix is as follows:

//Only consider columns that has a unique flag set to 1.

private static Set<UniqueDefinition> getUniques(){
...
final String indexName = indices.getString("name");
int unique = indices.getInt("unique");

 if(unique > 0){
......
 `names.add(namesSet.getString("name"));`
......
}
...
}

Our geopackage is currently failing test tilesTableDefinitions (See OGC 12-128r12: Requirement 54). Our tiles table contains non-unique indexes, which is causing our gpkg to fail the test.

@moran0013
Copy link
Contributor

do you have a sample geopackage to reproduce the error with?

@abucklecslt
Copy link
Author

Here is a sample geopackage to reproduce the error (See OGC 12-128r12: Requirement 54). I removed some of the tiles to make the file smaller.

Cheers;

ERDC_Whitehorse_GeoPackage.gpkg.zip

@LukeL-dev
Copy link

I've pushed a fix. Please let me know if this resolves the issue for you.

@abucklecslt
Copy link
Author

I just tested your fix with some of our geopackages. The fix works. Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants