From: <tho...@us...> - 2014-01-10 21:48:15
|
Revision: 7762 http://bigdata.svn.sourceforge.net/bigdata/?rev=7762&view=rev Author: thompsonbry Date: 2014-01-10 21:48:09 +0000 (Fri, 10 Jan 2014) Log Message: ----------- Modified the committed code to allow out of order evaluation. This gets BSBM Q5 to pass. The root cause is a conditional routing operation that is not maintaining the ordering. I think that the fix is to do the materialization non-conditionally and NOT attach the FILTER to the JOIN. I have allowed out of order evaluation until I can talk this through with MikeP. See #64 (RTO) Modified Paths: -------------- branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/java/com/bigdata/rdf/sparql/ast/eval/AST2BOpRTO.java branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/rto/TestRTO_BSBM.java Modified: branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/java/com/bigdata/rdf/sparql/ast/eval/AST2BOpRTO.java =================================================================== --- branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/java/com/bigdata/rdf/sparql/ast/eval/AST2BOpRTO.java 2014-01-10 21:10:45 UTC (rev 7761) +++ branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/java/com/bigdata/rdf/sparql/ast/eval/AST2BOpRTO.java 2014-01-10 21:48:09 UTC (rev 7762) @@ -208,6 +208,18 @@ * in BSBM Q1 on the pc100 data set and the BAR query. */ static final boolean runAllJoinsAsComplexJoins = false; + + /** + * When <code>true</code>, out of order evaluation will cause the RTO to + * fail. When <code>false</code>, out of order evaluation is silently + * ignored. + * <p> + * Out of order evaluation makes it impossible to accurately determine the + * estimated cardinality of the join since we can not compute the join hit + * ratio without knowing the #of solutions in required to produce a given + * #of solutions out. + */ + static final private boolean failOutOfOrderEvaluation = false; /** * Inspect the remainder of the join group. If we can isolate a join graph @@ -1083,13 +1095,13 @@ //System.err.println(bset.toString()); final int rowid = ((Integer) bset.get(rtoVar).get()) .intValue(); - if (rowid < lastRowId) { + if (rowid < lastRowId && failOutOfOrderEvaluation) { /* * Out of order evaluation makes it impossible to - * determine the estimated cardinality of the join since - * we can not compute the join hit ratio without knowing - * the #of solutions in required to produce a given #of - * solutions out. + * accurately determine the estimated cardinality of the + * join since we can not compute the join hit ratio + * without knowing the #of solutions in required to + * produce a given #of solutions out. */ throw new OutOfOrderEvaluationException( BOpUtility.toString(query)); Modified: branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/rto/TestRTO_BSBM.java =================================================================== --- branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/rto/TestRTO_BSBM.java 2014-01-10 21:10:45 UTC (rev 7761) +++ branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/rto/TestRTO_BSBM.java 2014-01-10 21:48:09 UTC (rev 7762) @@ -31,6 +31,7 @@ import com.bigdata.rdf.axioms.NoAxioms; import com.bigdata.rdf.sail.BigdataSail; +import com.bigdata.rdf.sparql.ast.eval.OutOfOrderEvaluationException; /** * Data driven test suite for the Runtime Query Optimizer (RTO) using BSBM data @@ -208,6 +209,9 @@ /** * BSBM Q5 on the pc100 data set. + * + * FIXME FAILS if we disallow out of order evaluation when doing cutoff + * joins. */ public void test_BSBM_Q5_pc100() throws Exception { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |