Page MenuHomePhabricator

Check distinct values (unique value) constraint on qualifiers and references
Closed, ResolvedPublic

Description

There are currently two properties with “used as qualifier” and “distinct values” constraints (query). We need to support that, but it’s not trivial because the SPARQL query we use gets somewhat more complicated.

Event Timeline

Change 378921 had a related patch set uploaded (by Lucas Werkmeister (WMDE); owner: Lucas Werkmeister (WMDE)):
[mediawiki/extensions/WikibaseQualityConstraints@master] WIP: unique value for qualifiers and references

https://gerrit.wikimedia.org/r/378921

Two semantics questions:

  • Is it a constraint violation if the same value is used in a statement and elsewhere in a qualifier? Or should values only be distinct between all main snaks / all qualifiers / all references? (My current WIP implementation only checks uniqueness within one “kind” of snak – main snak, qualifier, or reference.)
  • Is it a constraint violation if the exact same reference (same hash, same RDF node) is used several times (on the same entity or on different entities) and includes a “distinct values” property?

Alright, that’s what Ic997019ab7 (no longer WIP) implements.

Change 378921 merged by jenkins-bot:
[mediawiki/extensions/WikibaseQualityConstraints@master] Check “unique value” constraint on qualifiers and references

https://gerrit.wikimedia.org/r/378921