Smalyshev added a comment.
Another broken one: SELECT ?item ?itemLabel WHERE { { SELECT (MIN(?item) AS ?item) WHERE {?item wdt:P373 "A Topographical and Historical Description of London and Middlesex (1820) by Bayley, Brewer and Nightingale" FILTER NOT EXISTS {?item wdt:P31 wd:Q4167836} } } SERVICE wikibase:label { bd:serviceParam wikibase:language "en" } } `itemLabel` is empty in the new code. Looking at explain, this is rewritten as: WITH { QueryType: SELECT SELECT ( com.bigdata.rdf.sparql.ast.FunctionNode(VarNode(item))[ FunctionNode.scalarVals=null, FunctionNode.functionURI=http://www.w3.org/2006/sparql-functions#min, valueExpr=com.bigdata.bop.rdf.aggregate.MIN(item)] AS VarNode(item) ) JoinGroupNode { StatementPatternNode(VarNode(item), ConstantNode(Vocab(6)[http://www.wikidata.org/prop/direct/P]:XSDUnsignedShort(373)), ConstantNode(TermId(1466429127L)[A Topographical and Historical Description of London and Middlesex (1820) by Bayley, Brewer and Nightingale])) [scope=DEFAULT_CONTEXTS] AST2BOpBase.estimatedCardinality=1 AST2BOpBase.originalIndex=POS QueryType: ASK SELECT VarNode(item) VarNode(-exists-1)[anonymous] JoinGroupNode { StatementPatternNode(VarNode(item), ConstantNode(Vocab(6)[http://www.wikidata.org/prop/direct/P]:XSDUnsignedByte(31)), ConstantNode(Vocab(2)[http://www.wikidata.org/entity/Q]:XSDUnsignedInt(4167836))) [scope=DEFAULT_CONTEXTS] AST2BOpBase.estimatedCardinality=4309882 AST2BOpBase.originalIndex=POS } AST2BOpBase.estimatedCardinality=4309882 @askVar=-exists-1 FILTER( NotExistsNode(VarNode(-exists-1))[ FunctionNode.scalarVals=null, FunctionNode.functionURI=http://www.bigdata.com/sparql-1.1-undefined-functionsnot-exists, graphPattern= JoinGroupNode { StatementPatternNode(VarNode(item), ConstantNode(Vocab(6)[http://www.wikidata.org/prop/direct/P]:XSDUnsignedByte(31)), ConstantNode(Vocab(2)[http://www.wikidata.org/entity/Q]:XSDUnsignedInt(4167836))) [scope=DEFAULT_CONTEXTS] AST2BOpBase.estimatedCardinality=4309882 AST2BOpBase.originalIndex=POS } AST2BOpBase.estimatedCardinality=4309882, valueExpr=com.bigdata.rdf.internal.constraints.NotBOp(com.bigdata.rdf.internal.constraints.EBVBOp(-exists-1))] ) } } AS -subSelect-1 JOIN ON () DEPENDS ON () QueryType: SELECT includeInferred=true timeout=600000 SELECT ( VarNode(item) AS VarNode(item) ) ( VarNode(itemLabel) AS VarNode(itemLabel) ) JoinGroupNode { 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(17380L)[en])) [scope=DEFAULT_CONTEXTS] StatementPatternNode(VarNode(item), ConstantNode(Vocab(74)[http://www.w3.org/2000/01/rdf-schema#label]), VarNode(itemLabel)) [scope=DEFAULT_CONTEXTS] } } INCLUDE -subSelect-1 JOIN ON () } Which is wrong - the service clause should go after the subselect, not before. ` hint:Query hint:optimizer "None".` doesn't change anything - should it? Should we have some way to disable the rewriting behavior in case it fails? TASK DETAIL https://phabricator.wikimedia.org/T175840 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Igorkim78, Smalyshev Cc: Smalyshev, Lucas_Werkmeister_WMDE, Aklapper, darthmon_wmde, ET4Eva, Nandana, Lahi, Gq86, Darkminds3113, GoranSMilovanovic, QZanden, EBjune, merbst, LawExplorer, Avner, Gehel, _jensen, rosalieper, Cirdan, Jonas, FloNight, Xmlizer, jkroll, Wikidata-bugs, Jdouglas, aude, Tobias1984, Manybubbles, Mbch331
_______________________________________________ Wikidata-bugs mailing list Wikidata-bugs@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs