From: <mrp...@us...> - 2011-01-13 20:54:15
|
Revision: 4090 http://bigdata.svn.sourceforge.net/bigdata/?rev=4090&view=rev Author: mrpersonick Date: 2011-01-13 20:54:09 +0000 (Thu, 13 Jan 2011) Log Message: ----------- took out a redundant log statement Modified Paths: -------------- branches/QUADS_QUERY_BRANCH/bigdata-sails/src/java/com/bigdata/rdf/sail/BigdataEvaluationStrategyImpl3.java Modified: branches/QUADS_QUERY_BRANCH/bigdata-sails/src/java/com/bigdata/rdf/sail/BigdataEvaluationStrategyImpl3.java =================================================================== --- branches/QUADS_QUERY_BRANCH/bigdata-sails/src/java/com/bigdata/rdf/sail/BigdataEvaluationStrategyImpl3.java 2011-01-13 20:53:37 UTC (rev 4089) +++ branches/QUADS_QUERY_BRANCH/bigdata-sails/src/java/com/bigdata/rdf/sail/BigdataEvaluationStrategyImpl3.java 2011-01-13 20:54:09 UTC (rev 4090) @@ -699,10 +699,6 @@ try { - if (log.isDebugEnabled()) { - log.debug("running native query: " + BOpUtility.toString(query)); - } - final IRunningQuery runningQuery = queryEngine.eval(query); final IAsynchronousIterator<IBindingSet[]> it1 = This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mrp...@us...> - 2011-01-13 22:13:53
|
Revision: 4095 http://bigdata.svn.sourceforge.net/bigdata/?rev=4095&view=rev Author: mrpersonick Date: 2011-01-13 22:13:47 +0000 (Thu, 13 Jan 2011) Log Message: ----------- added some code that will translate regex to our free text index. currently disabled Modified Paths: -------------- branches/QUADS_QUERY_BRANCH/bigdata-sails/src/java/com/bigdata/rdf/sail/BigdataEvaluationStrategyImpl3.java Modified: branches/QUADS_QUERY_BRANCH/bigdata-sails/src/java/com/bigdata/rdf/sail/BigdataEvaluationStrategyImpl3.java =================================================================== --- branches/QUADS_QUERY_BRANCH/bigdata-sails/src/java/com/bigdata/rdf/sail/BigdataEvaluationStrategyImpl3.java 2011-01-13 22:06:28 UTC (rev 4094) +++ branches/QUADS_QUERY_BRANCH/bigdata-sails/src/java/com/bigdata/rdf/sail/BigdataEvaluationStrategyImpl3.java 2011-01-13 22:13:47 UTC (rev 4095) @@ -40,6 +40,7 @@ import org.openrdf.query.algebra.ProjectionElemList; import org.openrdf.query.algebra.QueryModelNode; import org.openrdf.query.algebra.QueryRoot; +import org.openrdf.query.algebra.Regex; import org.openrdf.query.algebra.SameTerm; import org.openrdf.query.algebra.StatementPattern; import org.openrdf.query.algebra.StatementPattern.Scope; @@ -52,6 +53,7 @@ import org.openrdf.query.algebra.evaluation.impl.EvaluationStrategyImpl; import org.openrdf.query.algebra.evaluation.iterator.FilterIterator; import org.openrdf.query.algebra.helpers.QueryModelVisitorBase; +import org.openrdf.query.parser.serql.AnonymousVarGenerator; import com.bigdata.bop.BOp; import com.bigdata.bop.BOpUtility; @@ -617,15 +619,27 @@ * UnsupportedOperatorException here must just flow through * to Sesame evaluation of the entire query. */ - final ValueExpr ve = (ValueExpr) op; - final IConstraint bop = toConstraint(ve); - sop.setBOp(bop); +// if (op instanceof Regex) { +// final Regex regex = (Regex) op; +// final IPredicate bop = toPredicate(regex); +// sop.setBOp(bop); +// } else { + final ValueExpr ve = (ValueExpr) op; + final IConstraint bop = toConstraint(ve); + sop.setBOp(bop); +// } } else if (op instanceof Filter) { final Filter filter = (Filter) op; final ValueExpr ve = filter.getCondition(); try { - final IConstraint bop = toConstraint(ve); - sop.setBOp(bop); +// if (ve instanceof Regex) { +// final Regex regex = (Regex) ve; +// final IPredicate bop = toPredicate(regex); +// sop.setBOp(bop); +// } else { + final IConstraint bop = toConstraint(ve); + sop.setBOp(bop); +// } } catch (UnsupportedOperatorException ex) { /* * If we encounter a sesame filter (ValueExpr) that we @@ -1439,6 +1453,19 @@ // // } + private IPredicate toPredicate(final Regex regex) + throws QueryEvaluationException { + + final Var s = (Var) regex.getLeftArg(); + final ValueConstant vc = (ValueConstant) regex.getRightArg(); + final Var p = new Var(); + p.setValue(BD.SEARCH); + final Var o = new Var(); + o.setValue(vc.getValue()); + return toPredicate(new StatementPattern(s, p, o)); + + } + /** * Generate a bigdata {@link IPredicate} (tail) for the supplied * StatementPattern. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tho...@us...> - 2011-01-16 22:46:33
|
Revision: 4118 http://bigdata.svn.sourceforge.net/bigdata/?rev=4118&view=rev Author: thompsonbry Date: 2011-01-16 22:46:27 +0000 (Sun, 16 Jan 2011) Log Message: ----------- More work on [1]. [1] https://sourceforge.net/apps/trac/bigdata/ticket/230 Modified Paths: -------------- branches/QUADS_QUERY_BRANCH/bigdata-sails/src/java/com/bigdata/rdf/sail/BigdataEvaluationStrategyImpl3.java Modified: branches/QUADS_QUERY_BRANCH/bigdata-sails/src/java/com/bigdata/rdf/sail/BigdataEvaluationStrategyImpl3.java =================================================================== --- branches/QUADS_QUERY_BRANCH/bigdata-sails/src/java/com/bigdata/rdf/sail/BigdataEvaluationStrategyImpl3.java 2011-01-16 22:45:32 UTC (rev 4117) +++ branches/QUADS_QUERY_BRANCH/bigdata-sails/src/java/com/bigdata/rdf/sail/BigdataEvaluationStrategyImpl3.java 2011-01-16 22:46:27 UTC (rev 4118) @@ -516,11 +516,11 @@ } - private CloseableIteration<BindingSet, QueryEvaluationException> + CloseableIteration<BindingSet, QueryEvaluationException> evaluateNatively(final TupleExpr tupleExpr, final BindingSet bs) throws QueryEvaluationException, UnsupportedOperatorException { try { - return _evaluateNatively(tupleExpr, bs); + return doEvaluateNatively(tupleExpr, bs); } catch (UnrecognizedValueException ex) { if (log.isInfoEnabled()) { log.info("unrecognized value in query: " + ex.getValue()); @@ -538,8 +538,8 @@ } } - private CloseableIteration<BindingSet, QueryEvaluationException> - _evaluateNatively(final TupleExpr root, final BindingSet bs) + CloseableIteration<BindingSet, QueryEvaluationException> + doEvaluateNatively(final TupleExpr root, final BindingSet bs) throws UnsupportedOperatorException, UnrecognizedValueException, QueryEvaluationException { @@ -713,7 +713,7 @@ /* * Begin native bigdata evaluation. */ - CloseableIteration<BindingSet, QueryEvaluationException> result = _evaluateNatively( + CloseableIteration<BindingSet, QueryEvaluationException> result = doEvaluateNatively( query, bs, queryEngine);// , sesameFilters); /* @@ -742,8 +742,8 @@ } - private CloseableIteration<BindingSet, QueryEvaluationException> - _evaluateNatively(final PipelineOp query, final BindingSet bs, + CloseableIteration<BindingSet, QueryEvaluationException> + doEvaluateNatively(final PipelineOp query, final BindingSet bs, final QueryEngine queryEngine // , final Collection<Filter> sesameFilters ) @@ -794,7 +794,7 @@ * * @throws QueryEvaluationException */ - private CloseableIteration<BindingSet, QueryEvaluationException> wrapQuery( + CloseableIteration<BindingSet, QueryEvaluationException> wrapQuery( final IRunningQuery runningQuery ) throws QueryEvaluationException { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tho...@us...> - 2011-03-03 21:45:22
|
Revision: 4271 http://bigdata.svn.sourceforge.net/bigdata/?rev=4271&view=rev Author: thompsonbry Date: 2011-03-03 21:45:15 +0000 (Thu, 03 Mar 2011) Log Message: ----------- Disabling the RangeBOp transform in the committed version. This was accidentally enabled in a previous commit, but the RangeBOp transformation is not yet fully integrated. Modified Paths: -------------- branches/QUADS_QUERY_BRANCH/bigdata-sails/src/java/com/bigdata/rdf/sail/BigdataEvaluationStrategyImpl3.java Modified: branches/QUADS_QUERY_BRANCH/bigdata-sails/src/java/com/bigdata/rdf/sail/BigdataEvaluationStrategyImpl3.java =================================================================== --- branches/QUADS_QUERY_BRANCH/bigdata-sails/src/java/com/bigdata/rdf/sail/BigdataEvaluationStrategyImpl3.java 2011-03-03 21:36:04 UTC (rev 4270) +++ branches/QUADS_QUERY_BRANCH/bigdata-sails/src/java/com/bigdata/rdf/sail/BigdataEvaluationStrategyImpl3.java 2011-03-03 21:45:15 UTC (rev 4271) @@ -814,7 +814,7 @@ */ attachNamedGraphsFilterToSearches(sopTree); - if (true) { + if (false) { /* * Look for numerical filters that can be rotated inside predicates */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mrp...@us...> - 2011-04-01 17:23:18
|
Revision: 4365 http://bigdata.svn.sourceforge.net/bigdata/?rev=4365&view=rev Author: mrpersonick Date: 2011-04-01 17:23:11 +0000 (Fri, 01 Apr 2011) Log Message: ----------- turn off RangeBOp by default Modified Paths: -------------- branches/QUADS_QUERY_BRANCH/bigdata-sails/src/java/com/bigdata/rdf/sail/BigdataEvaluationStrategyImpl3.java Modified: branches/QUADS_QUERY_BRANCH/bigdata-sails/src/java/com/bigdata/rdf/sail/BigdataEvaluationStrategyImpl3.java =================================================================== --- branches/QUADS_QUERY_BRANCH/bigdata-sails/src/java/com/bigdata/rdf/sail/BigdataEvaluationStrategyImpl3.java 2011-04-01 15:59:47 UTC (rev 4364) +++ branches/QUADS_QUERY_BRANCH/bigdata-sails/src/java/com/bigdata/rdf/sail/BigdataEvaluationStrategyImpl3.java 2011-04-01 17:23:11 UTC (rev 4365) @@ -814,7 +814,7 @@ */ attachNamedGraphsFilterToSearches(sopTree); - if (true) { + if (false) { /* * Look for numerical filters that can be rotated inside predicates */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mrp...@us...> - 2011-06-09 20:56:14
|
Revision: 4678 http://bigdata.svn.sourceforge.net/bigdata/?rev=4678&view=rev Author: mrpersonick Date: 2011-06-09 20:56:07 +0000 (Thu, 09 Jun 2011) Log Message: ----------- working through unit test failures Modified Paths: -------------- branches/QUADS_QUERY_BRANCH/bigdata-sails/src/java/com/bigdata/rdf/sail/BigdataEvaluationStrategyImpl3.java Modified: branches/QUADS_QUERY_BRANCH/bigdata-sails/src/java/com/bigdata/rdf/sail/BigdataEvaluationStrategyImpl3.java =================================================================== --- branches/QUADS_QUERY_BRANCH/bigdata-sails/src/java/com/bigdata/rdf/sail/BigdataEvaluationStrategyImpl3.java 2011-06-09 20:25:05 UTC (rev 4677) +++ branches/QUADS_QUERY_BRANCH/bigdata-sails/src/java/com/bigdata/rdf/sail/BigdataEvaluationStrategyImpl3.java 2011-06-09 20:56:07 UTC (rev 4678) @@ -72,8 +72,9 @@ import org.openrdf.query.algebra.ValueConstant; import org.openrdf.query.algebra.ValueExpr; import org.openrdf.query.algebra.Var; +import org.openrdf.query.algebra.evaluation.QueryBindingSet; import org.openrdf.query.algebra.evaluation.impl.EvaluationStrategyImpl; -import org.openrdf.query.algebra.evaluation.iterator.FilterIterator; +import org.openrdf.query.algebra.evaluation.iterator.ProjectionIterator; import org.openrdf.query.algebra.helpers.QueryModelVisitorBase; import com.bigdata.bop.BOp; @@ -114,7 +115,6 @@ import com.bigdata.rdf.internal.constraints.LangBOp; import com.bigdata.rdf.internal.constraints.LangMatchesBOp; import com.bigdata.rdf.internal.constraints.MathBOp; -import com.bigdata.rdf.internal.constraints.TrueBOp; import com.bigdata.rdf.internal.constraints.MathBOp.MathOp; import com.bigdata.rdf.internal.constraints.NotBOp; import com.bigdata.rdf.internal.constraints.OrBOp; @@ -123,6 +123,7 @@ import com.bigdata.rdf.internal.constraints.SPARQLConstraint; import com.bigdata.rdf.internal.constraints.SameTermBOp; import com.bigdata.rdf.internal.constraints.StrBOp; +import com.bigdata.rdf.internal.constraints.TrueBOp; import com.bigdata.rdf.lexicon.LexiconRelation; import com.bigdata.rdf.model.BigdataValue; import com.bigdata.rdf.sail.BigdataSail.Options; @@ -333,6 +334,23 @@ private Properties queryHints; /** + * Override to prune incoming bindings that are not part of the projection + * out of the result set. + */ + public CloseableIteration<BindingSet, QueryEvaluationException> evaluate( + final Projection projection, + final BindingSet bindings) + throws QueryEvaluationException + { + CloseableIteration<BindingSet, QueryEvaluationException> result; + result = this.evaluate(projection.getArg(), bindings); + + QueryBindingSet empty = new QueryBindingSet(); + result = new ProjectionIterator(projection, result, empty); + return result; + } + + /** * This is the top-level method called by the SAIL to evaluate a query. * The TupleExpr parameter here is guaranteed to be the root of the operator * tree for the query. Query hints are parsed by the SAIL from the @@ -887,14 +905,14 @@ * * [1] https://sourceforge.net/apps/trac/bigdata/ticket/230 */ - if (sesameFilters != null) { - for (Filter f : sesameFilters) { - if (log.isDebugEnabled()) { - log.debug("attaching sesame filter: " + f); - } - result = new FilterIterator(f, result, this); - } - } +// if (sesameFilters != null) { +// for (Filter f : sesameFilters) { +// if (log.isDebugEnabled()) { +// log.debug("attaching sesame filter: " + f); +// } +// result = new FilterIterator(f, result, this); +// } +// } // System.err.println("results"); // while (result.hasNext()) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mrp...@us...> - 2011-06-09 21:08:47
|
Revision: 4679 http://bigdata.svn.sourceforge.net/bigdata/?rev=4679&view=rev Author: mrpersonick Date: 2011-06-09 21:08:41 +0000 (Thu, 09 Jun 2011) Log Message: ----------- working through unit test failures Modified Paths: -------------- branches/QUADS_QUERY_BRANCH/bigdata-sails/src/java/com/bigdata/rdf/sail/BigdataEvaluationStrategyImpl3.java Modified: branches/QUADS_QUERY_BRANCH/bigdata-sails/src/java/com/bigdata/rdf/sail/BigdataEvaluationStrategyImpl3.java =================================================================== --- branches/QUADS_QUERY_BRANCH/bigdata-sails/src/java/com/bigdata/rdf/sail/BigdataEvaluationStrategyImpl3.java 2011-06-09 20:56:07 UTC (rev 4678) +++ branches/QUADS_QUERY_BRANCH/bigdata-sails/src/java/com/bigdata/rdf/sail/BigdataEvaluationStrategyImpl3.java 2011-06-09 21:08:41 UTC (rev 4679) @@ -573,15 +573,15 @@ return super.evaluate(filter, bs); } - if (filter.getArg() instanceof StatementPattern) { - // no need to run a query for this, a simple access path scan will do - return super.evaluate(filter, bs); - } - if (log.isInfoEnabled()) { log.info("evaluating top-level Filter operator"); } +// if (filter.getArg() instanceof StatementPattern) { +// // no need to run a query for this, a simple access path scan will do +// return super.evaluate(filter, bs); +// } + try { return evaluateNatively(filter, bs); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mrp...@us...> - 2011-06-10 17:52:45
|
Revision: 4694 http://bigdata.svn.sourceforge.net/bigdata/?rev=4694&view=rev Author: mrpersonick Date: 2011-06-10 17:52:39 +0000 (Fri, 10 Jun 2011) Log Message: ----------- can't use SameTerm when one of the operands is DatatypeBOp Modified Paths: -------------- branches/QUADS_QUERY_BRANCH/bigdata-sails/src/java/com/bigdata/rdf/sail/BigdataEvaluationStrategyImpl3.java Modified: branches/QUADS_QUERY_BRANCH/bigdata-sails/src/java/com/bigdata/rdf/sail/BigdataEvaluationStrategyImpl3.java =================================================================== --- branches/QUADS_QUERY_BRANCH/bigdata-sails/src/java/com/bigdata/rdf/sail/BigdataEvaluationStrategyImpl3.java 2011-06-10 17:29:23 UTC (rev 4693) +++ branches/QUADS_QUERY_BRANCH/bigdata-sails/src/java/com/bigdata/rdf/sail/BigdataEvaluationStrategyImpl3.java 2011-06-10 17:52:39 UTC (rev 4694) @@ -1986,14 +1986,14 @@ final CompareOp op = compare.getOperator(); if (op == CompareOp.EQ || op == CompareOp.NE) { - if (left instanceof Constant) { + if (left instanceof Constant && !(right instanceof DatatypeBOp)) { final IV iv = ((Constant<? extends IV>) left).get(); if (iv.isURI() && iv.getTermId() != TermId.NULL) { return new SameTermBOp(left, right, op); } } - if (right instanceof Constant) { + if (right instanceof Constant && !(left instanceof DatatypeBOp)) { final IV iv = ((Constant<? extends IV>) right).get(); if (iv.isURI() && iv.getTermId() != TermId.NULL) { return new SameTermBOp(left, right, op); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mrp...@us...> - 2011-06-18 04:42:46
|
Revision: 4735 http://bigdata.svn.sourceforge.net/bigdata/?rev=4735&view=rev Author: mrpersonick Date: 2011-06-18 04:42:39 +0000 (Sat, 18 Jun 2011) Log Message: ----------- more optimizations for CompareBOp, SameTermBOp Modified Paths: -------------- branches/QUADS_QUERY_BRANCH/bigdata-sails/src/java/com/bigdata/rdf/sail/BigdataEvaluationStrategyImpl3.java Modified: branches/QUADS_QUERY_BRANCH/bigdata-sails/src/java/com/bigdata/rdf/sail/BigdataEvaluationStrategyImpl3.java =================================================================== --- branches/QUADS_QUERY_BRANCH/bigdata-sails/src/java/com/bigdata/rdf/sail/BigdataEvaluationStrategyImpl3.java 2011-06-17 23:34:35 UTC (rev 4734) +++ branches/QUADS_QUERY_BRANCH/bigdata-sails/src/java/com/bigdata/rdf/sail/BigdataEvaluationStrategyImpl3.java 2011-06-18 04:42:39 UTC (rev 4735) @@ -1974,7 +1974,8 @@ if (iv.isURI() && !(right instanceof DatatypeBOp)) { - return new FalseBOp(new SameTermBOp(left, right)); +// return new FalseBOp(new SameTermBOp(left, right)); + return FalseBOp.INSTANCE; } else { @@ -1994,7 +1995,8 @@ if (iv.isURI() && !(left instanceof DatatypeBOp)) { - return new FalseBOp(new SameTermBOp(left, right)); +// return new FalseBOp(new SameTermBOp(left, right)); + return FalseBOp.INSTANCE; } else { @@ -2050,7 +2052,8 @@ if (!(op == CompareOp.EQ || op == CompareOp.NE)) { - return new SparqlTypeErrorBOp(new CompareBOp(left, right, op)); +// return new SparqlTypeErrorBOp(new CompareBOp(left, right, op)); + return SparqlTypeErrorBOp.INSTANCE; } @@ -2064,11 +2067,13 @@ if (op == CompareOp.EQ) { - return new FalseBOp(new CompareBOp(left, right, op)); +// return new FalseBOp(new CompareBOp(left, right, op)); + return FalseBOp.INSTANCE; } else { - return new TrueBOp(new CompareBOp(left, right, op)); +// return new TrueBOp(new CompareBOp(left, right, op)); + return TrueBOp.INSTANCE; } @@ -2089,7 +2094,8 @@ if (!(op == CompareOp.EQ || op == CompareOp.NE)) { - return new SparqlTypeErrorBOp(new CompareBOp(left, right, op)); +// return new SparqlTypeErrorBOp(new CompareBOp(left, right, op)); + return SparqlTypeErrorBOp.INSTANCE; } @@ -2103,11 +2109,13 @@ if (op == CompareOp.EQ) { - return new FalseBOp(new CompareBOp(left, right, op)); +// return new FalseBOp(new CompareBOp(left, right, op)); + return FalseBOp.INSTANCE; } else { - return new TrueBOp(new CompareBOp(left, right, op)); +// return new TrueBOp(new CompareBOp(left, right, op)); + return TrueBOp.INSTANCE; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mrp...@us...> - 2011-06-23 15:26:02
|
Revision: 4780 http://bigdata.svn.sourceforge.net/bigdata/?rev=4780&view=rev Author: mrpersonick Date: 2011-06-23 15:25:56 +0000 (Thu, 23 Jun 2011) Log Message: ----------- fixed the compare to compareBOp translation, which was broken for datatype operands Modified Paths: -------------- branches/QUADS_QUERY_BRANCH/bigdata-sails/src/java/com/bigdata/rdf/sail/BigdataEvaluationStrategyImpl3.java Modified: branches/QUADS_QUERY_BRANCH/bigdata-sails/src/java/com/bigdata/rdf/sail/BigdataEvaluationStrategyImpl3.java =================================================================== --- branches/QUADS_QUERY_BRANCH/bigdata-sails/src/java/com/bigdata/rdf/sail/BigdataEvaluationStrategyImpl3.java 2011-06-23 15:23:00 UTC (rev 4779) +++ branches/QUADS_QUERY_BRANCH/bigdata-sails/src/java/com/bigdata/rdf/sail/BigdataEvaluationStrategyImpl3.java 2011-06-23 15:25:56 UTC (rev 4780) @@ -2133,30 +2133,38 @@ } - if (iv.getTermId() != TermId.NULL) { + /* + * DatatypeBOp is the only bop that can cast things to a URI, + * and that URI might not be in the database. Thus there are no + * optimizations we can do: we can't check term equality, and + * we can't assume automatic false or true. + */ + if (!(right instanceof DatatypeBOp)) { + + if (iv.getTermId() != TermId.NULL) { - return new SameTermBOp(left, right, op); + // if it's a real term we can use SameTermBOp + return new SameTermBOp(left, right, op); - } else { - - if (!(right instanceof DatatypeBOp)) { - - if (op == CompareOp.EQ) { - + } else { + + // if it's not a real term then we can substitute false + // for EQ and true for NE + if (op == CompareOp.EQ) { + // return new FalseBOp(new CompareBOp(left, right, op)); - return FalseBOp.INSTANCE; - - } else { - + return FalseBOp.INSTANCE; + + } else { + // return new TrueBOp(new CompareBOp(left, right, op)); - return TrueBOp.INSTANCE; - - } + return TrueBOp.INSTANCE; + + } - - } - - } + } + + } } @@ -2175,30 +2183,38 @@ } - if (iv.getTermId() != TermId.NULL) { + /* + * DatatypeBOp is the only bop that can cast things to a URI, + * and that URI might not be in the database. Thus there are no + * optimizations we can do: we can't check term equality, and + * we can't assume automatic false or true. + */ + if (!(left instanceof DatatypeBOp)) { + + if (iv.getTermId() != TermId.NULL) { - return new SameTermBOp(left, right, op); + // if it's a real term we can use SameTermBOp + return new SameTermBOp(left, right, op); - } else { - - if (!(left instanceof DatatypeBOp)) { - - if (op == CompareOp.EQ) { - + } else { + + // if it's not a real term then we can substitute false + // for EQ and true for NE + if (op == CompareOp.EQ) { + // return new FalseBOp(new CompareBOp(left, right, op)); - return FalseBOp.INSTANCE; - - } else { - + return FalseBOp.INSTANCE; + + } else { + // return new TrueBOp(new CompareBOp(left, right, op)); - return TrueBOp.INSTANCE; - - } + return TrueBOp.INSTANCE; + + } - - } - - } + } + + } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |