VladimirAlexiev created this task. VladimirAlexiev added a project: Wikidata-Query-Service. Restricted Application added a subscriber: Aklapper. Restricted Application added a project: Wikidata.
TASK DESCRIPTION https://www.wikidata.org/wiki/Wikidata:SPARQL_query_service/queries/examples/advanced includes 2 queries with invalid datetime literals eg `"2000-00-00T00:00:00Z"^^xsd:dateTime` (mm=dd=00). https://www.wikidata.org/wiki/Wikidata:Request_a_query/Archive/2020/02 includes a query with date literals eg `"2000-00-00"^^xsd:dateTime` that are doubly invalid (mm=dd=00 and missing time part). GraphDB and other repos reject such queries with eg `Query evaluation error: Invalid value 0 for Month field`. WDQS should do the same, to discourage bad practices and for query compatibility with other repos. A few more tests: select * { bind("2000-00-00T00:00:00Z"^^xsd:dateTime as ?x) bind(day("2000-00-00T00:00:00Z"^^xsd:dateTime) as ?x1) # returns 1 ??? bind("20-00-00T00:00:00Z"^^xsd:dateTime as ?y) # accepted, but year must have at least 4 digits bind(year("20-00-00T00:00:00Z"^^xsd:dateTime) as ?y1) # returns 20 bind(?x-?y as ?z) # 723180.0: divided by 365.24 gives 1980 years and a bit bind(datatype(?x-?y) as ?z1) # xsd:double #bind("20-00-00T00:00:00Z"^^xsd:dateTime - "20"^^xsd:gYear as ?t) # fails with Unknown error: 20-00-00T00:00:00Z } TASK DETAIL https://phabricator.wikimedia.org/T253718 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: VladimirAlexiev Cc: Aklapper, VladimirAlexiev, CBogen, darthmon_wmde, Nandana, Namenlos314, Lahi, Gq86, Lucas_Werkmeister_WMDE, GoranSMilovanovic, QZanden, EBjune, merbst, LawExplorer, _jensen, rosalieper, Scott_WUaS, Jonas, Xmlizer, jkroll, Wikidata-bugs, Jdouglas, aude, Tobias1984, Manybubbles, Mbch331
_______________________________________________ Wikidata-bugs mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs
