Skip to content
This repository has been archived by the owner on Oct 8, 2020. It is now read-only.

Graph partitioning-based query system doesn't support SPARQL functions which may take N arguments #24

Closed
patrickwestphal opened this issue Oct 27, 2018 · 1 comment
Labels
Milestone

Comments

@patrickwestphal
Copy link
Member

patrickwestphal commented Oct 27, 2018

I tried to run the graph partitioning-based query system as exemplified in the SANSA-Examples repository. The query I tried to execute is

SELECT DISTINCT  ?s
WHERE
  { ?s   <http://www.specialprivacy.eu/langs/splog#logEntryContent>  ?s0 .
    ?s0  <http://www.specialprivacy.eu/langs/usage-policy#hasData>  ?allSuperClassesVar1 ;
         <http://www.specialprivacy.eu/langs/usage-policy#hasPurpose>  <http://www.specialprivacy.eu/vocabs/purposes#Admin> ;
         <http://www.specialprivacy.eu/langs/usage-policy#hasRecipient>  <http://www.specialprivacy.eu/vocabs/recipients#Public> ;
         <http://www.specialprivacy.eu/langs/usage-policy#hasStorage>  <http://www.specialprivacy.eu/vocabs/locations#ThirdParty> .
    ?s   <http://www.specialprivacy.eu/langs/splog#dataSubject>  <http://www.example.com/users/433a4347-e2c7-4e07-a0fd-a054a62ba37f>
    FILTER(?allSuperClassesVar1 NOT IN (<http://www.specialprivacy.eu/vocabs/data#Activity>, <http://www.specialprivacy.eu/langs/usage-policy#AnyData>))
  }

And what I get is this stack trace

Exception in thread "main" java.lang.UnsupportedOperationException: Not support the expression of ExprFunctionN
	at net.sansa_stack.query.spark.graph.jena.ExprParser.visit(ExprParser.scala:72)
	at org.apache.jena.sparql.expr.ExprFunctionN.visit(ExprFunctionN.java:120)
	at org.apache.jena.sparql.algebra.walker.WalkerVisitor.visitExprFunction(WalkerVisitor.java:265)
	at org.apache.jena.sparql.algebra.walker.WalkerVisitor.visit(WalkerVisitor.java:252)
	at org.apache.jena.sparql.expr.ExprFunctionN.visit(ExprFunctionN.java:120)
	at org.apache.jena.sparql.algebra.walker.WalkerVisitor.walk(WalkerVisitor.java:91)
	at org.apache.jena.sparql.algebra.walker.Walker.walk$(Walker.java:104)
[...]

pointing to this match-case expression which explicitly restricts supported filters to Expressions (i.e. basically everything that takes only up to two arguments).

patrickwestphal added a commit to SANSA-Stack/Archived-SANSA-Inference that referenced this issue Oct 27, 2018
This is just an initial version which doesn't work due to certain
restrictions in the SANSA-Query layer
(SANSA-Stack/Archived-SANSA-Query#24).
@JensLehmann JensLehmann added this to the 0.6 milestone Dec 7, 2018
@GezimSejdiu GezimSejdiu modified the milestones: 0.6, 0.7 Jun 13, 2019
@GezimSejdiu
Copy link
Member

Hi @patrickwestphal ,

many thanks for the issue. Unfortunately, graph-based query engine in SANSA doesn't support such SPARQL fragments (IN and NOT IN statements).
We will try to support such a feature when we cover more SPARQL 1.1 functions in the future.

Best regards,

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants