From: <tho...@us...> - 2010-09-29 16:03:06
|
Revision: 3679 http://bigdata.svn.sourceforge.net/bigdata/?rev=3679&view=rev Author: thompsonbry Date: 2010-09-29 16:03:00 +0000 (Wed, 29 Sep 2010) Log Message: ----------- Modified to use variable arity Modified Paths: -------------- branches/QUADS_QUERY_BRANCH/bigdata-sails/src/java/com/bigdata/rdf/sail/BigdataEvaluationStrategyImpl.java Modified: branches/QUADS_QUERY_BRANCH/bigdata-sails/src/java/com/bigdata/rdf/sail/BigdataEvaluationStrategyImpl.java =================================================================== --- branches/QUADS_QUERY_BRANCH/bigdata-sails/src/java/com/bigdata/rdf/sail/BigdataEvaluationStrategyImpl.java 2010-09-29 15:48:34 UTC (rev 3678) +++ branches/QUADS_QUERY_BRANCH/bigdata-sails/src/java/com/bigdata/rdf/sail/BigdataEvaluationStrategyImpl.java 2010-09-29 16:03:00 UTC (rev 3679) @@ -1509,7 +1509,18 @@ !tripleSource.includeInferred ? ExplicitSPOFilter.INSTANCE : null; - return new SPOPredicate(new BOp[] { s, p, o, c }, new NV( + // Decide on the correct arity for the predicate. + final BOp[] vars; + if (!database.isQuads() && !database.isStatementIdentifiers()) { + vars = new BOp[] { s, p, o }; + } else if (c == null) { + vars = new BOp[] { s, p, o, com.bigdata.bop.Var.var() }; + } else { + vars = new BOp[] { s, p, o, c }; + } + + return new SPOPredicate(vars, // + new NV( IPredicate.Annotations.RELATION_NAME, new String[] { database .getSPORelation().getNamespace() }),// // @todo move to the join. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |