Page MenuHomePhabricator

Parsing +0 in a multi line query
Closed, ResolvedPublic

Description

This query return an error :

SELECT ?item WHERE {
  ?item wdt:P1082 +0.
  ?item wdt:P17 wd:Q142.
}

The error :

Query is malformed: Encountered " <VAR1> "?item "" at line 3, column 3.

The issue is only about the string "+0" in a SPARQL query because an query with "[]" works:

SELECT ?item WHERE {
  ?item wdt:P1082 [].
  ?item wdt:P17 wd:Q142.
}
LIMIT 10

This query don't return Q3593337 as result, but don't return an error.

SELECT ?item ?label ?_image WHERE {
  ?item wdt:P1082 +0; wdt:P17 wd:Q142.
}
LIMIT 100

Maybe this case is an other bug

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Smalyshev claimed this task.
Smalyshev subscribed.

Put a space between 0 and the dot. 0. is parsed as the beginning of a floating point number.