Igorkim78 added a comment.
This seems to be optimizers order problem. CompareBOp executes to check if "Ada"@en equals to ?langLabel several times but the ?langLabel is not bound on all occasions: while running **//ASTDeferredIVResolution//** while running **//com.bigdata.rdf.sparql.ast.optimizers.ASTSetValueExpressionsOptimizer//** then while running **//ConditionalRoutingOp for ChunkedRunningQuery//** So, finally, the solution got discarded in com.bigdata.rdf.internal.constraints.SPARQLConstraint.accept(IBindingSet) And LabelService has not got called at all. On the other hand, if langLabel uncommended on the outer projection, LabelService is called and langLabel is already bound while calling SPARQLConstraint.accept. The difference in query execution plans is that on successful one, additional statement is added to LabelService clause: > SERVICE <ConstantNode(TermId(0U)[http://wikiba.se/ontology#label])> { > JoinGroupNode { > StatementPatternNode(ConstantNode(TermId(0U)[http://www.bigdata.com/rdf#serviceParam]), ConstantNode(TermId(0U)[http://wikiba.se/ontology#language]), ConstantNode(TermId(0L)[en])) [scope=DEFAULT_CONTEXTS] > StatementPatternNode(VarNode(lang), ConstantNode(Vocab(74)[http://www.w3.org/2000/01/rdf-schema#label]), VarNode(langLabel)) [scope=DEFAULT_CONTEXTS] # <<< Missing statement pattern > } > } > If it is added manually, the query succedes: > SELECT ?lang #?langLabel > WHERE { > { > SELECT ?lang ?langLabel WHERE { > BIND(wd:Q154755 AS ?lang) > SERVICE wikibase:label { > bd:serviceParam wikibase:language "en" . > ?lang rdfs:label ?langLabel . > } > } > } > FILTER("Ada"@en = ?langLabel) . > } TASK DETAIL https://phabricator.wikimedia.org/T153353 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Igorkim78 Cc: Igorkim78, Aklapper, Smalyshev, hoo, alaa_wmde, ET4Eva, Nandana, Lahi, Gq86, Darkminds3113, Lucas_Werkmeister_WMDE, GoranSMilovanovic, QZanden, EBjune, merbst, LawExplorer, Avner, Gehel, _jensen, rosalieper, Jonas, FloNight, Xmlizer, jkroll, Wikidata-bugs, Jdouglas, aude, Tobias1984, Manybubbles, Mbch331, Krenair
_______________________________________________ Wikidata-bugs mailing list Wikidata-bugs@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs