WikidataFacts created this task.
WikidataFacts added projects: Wikidata, Wikidata-Query-Service.
Herald added subscribers: Zppix, Aklapper.
Herald added a project: Discovery.

TASK DESCRIPTION

This query will lead to a NullPointerException most of the time:

SELECT ?person ?age
WHERE
{
  ?person wdt:P31 wd:Q5;
          wdt:P569 ?dateOfBirth;
          wdt:P570 ?dateOfDeath.
  BIND(?dateOfDeath - ?dateOfBirth AS ?age).
}

Link

The bottom of the stack trace is:

Caused by: java.lang.NullPointerException
	at org.wikidata.query.rdf.blazegraph.inline.literal.WikibaseDateExtension.canInvokeMathOp(WikibaseDateExtension.java:133)
	at com.bigdata.rdf.internal.constraints.MathBOp.get(MathBOp.java:167)
	at com.bigdata.rdf.internal.constraints.MathBOp.get(MathBOp.java:56)
	at com.bigdata.rdf.internal.constraints.ConditionalBind.get(ConditionalBind.java:133)
	at com.bigdata.rdf.internal.constraints.ProjectedConstraint.accept(ProjectedConstraint.java:77)
	at com.bigdata.rdf.internal.constraints.TryBeforeMaterializationConstraint.accept(TryBeforeMaterializationConstraint.java:103)
	... 12 more

I suspect this happens whenever one of the variables is *no value* or *unknown value*.

No known workaround.


TASK DETAIL
https://phabricator.wikimedia.org/T140151

EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: WikidataFacts
Cc: Aklapper, Zppix, WikidataFacts, Avner, debt, Gehel, D3r1ck01, Jonas, FloNight, Xmlizer, Izno, jkroll, Smalyshev, Wikidata-bugs, Jdouglas, aude, Deskana, Manybubbles, Mbch331
_______________________________________________
Wikidata-bugs mailing list
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs

Reply via email to