From: <tho...@us...> - 2011-01-02 22:49:33
|
Revision: 4046 http://bigdata.svn.sourceforge.net/bigdata/?rev=4046&view=rev Author: thompsonbry Date: 2011-01-02 22:49:27 +0000 (Sun, 02 Jan 2011) Log Message: ----------- Backed out the runtime optimizer query hint since it was not correctly integrated. I've added some more inline comments on how the integration should be developed. Modified Paths: -------------- branches/QUADS_QUERY_BRANCH/bigdata-sails/src/java/com/bigdata/rdf/sail/Rule2BOpUtility.java Modified: branches/QUADS_QUERY_BRANCH/bigdata-sails/src/java/com/bigdata/rdf/sail/Rule2BOpUtility.java =================================================================== --- branches/QUADS_QUERY_BRANCH/bigdata-sails/src/java/com/bigdata/rdf/sail/Rule2BOpUtility.java 2011-01-02 21:40:00 UTC (rev 4045) +++ branches/QUADS_QUERY_BRANCH/bigdata-sails/src/java/com/bigdata/rdf/sail/Rule2BOpUtility.java 2011-01-02 22:49:27 UTC (rev 4046) @@ -66,8 +66,6 @@ import com.bigdata.bop.bset.StartOp; import com.bigdata.bop.controller.Steps; import com.bigdata.bop.controller.Union; -import com.bigdata.bop.controller.JoinGraph.JGraph; -import com.bigdata.bop.controller.JoinGraph.Path; import com.bigdata.bop.cost.ScanCostReport; import com.bigdata.bop.cost.SubqueryCostReport; import com.bigdata.bop.engine.QueryEngine; @@ -443,6 +441,16 @@ * which optimizes the join graph and then evaluates it rather than * explicitly doing the optimization and evaluation steps here. * + * FIXME The runtime query optimizer can not be run against an + * IPredicate[] extracted from the IRule, even for triples, because + * those IPredicates lack some critical annotations, such as the + * bopId, which are only added in the logic below this point. Thus, + * while we can run the static optimizer first, the runtime + * optimizer needs to be run after we convert to bops (or as a bop + * at runtime). [This all runs into trouble because we are creating + * the JOIN operators in the code below rather than inferring the + * correct JOIN annotations based on the IPredicates.] + * * @todo Make sure that a summary of the information collected by * the runtime query optimizer is attached as an annotation to the * query. @@ -450,35 +458,38 @@ * @todo query hints for [limit] and [nedges]. */ - // The initial sampling limit. - final int limit = 100; +// // The initial sampling limit. +// final int limit = 100; +// +// // The #of edges considered for the initial paths. +// final int nedges = 2; +// +// // isolate/extract the join graph. +// final IPredicate[] preds = new IPredicate[rule.getTailCount()]; +// for (int i = 0; i < preds.length; i++) { +// preds[i] = rule.getTail(i); +// } +// +// final JGraph g = new JGraph(preds); +// +// final Path p; +// try { +// p = g.runtimeOptimizer(queryEngine, limit, nedges); +// } catch (Exception e) { +// throw new RuntimeException(e); +// } +// +// // the permutation order. +// order = g.getOrder(p); +// +// keyOrder = null; +// +// cardinality = null; +// +// break; - // The #of edges considered for the initial paths. - final int nedges = 2; + throw new UnsupportedOperationException("Runtime optimizer is not supported yet."); - // isolate/extract the join graph. - final IPredicate[] preds = new IPredicate[rule.getTailCount()]; - for (int i = 0; i < preds.length; i++) { - preds[i] = rule.getTail(i); - } - - final JGraph g = new JGraph(preds); - - final Path p; - try { - p = g.runtimeOptimizer(queryEngine, limit, nedges); - } catch (Exception e) { - throw new RuntimeException(e); - } - - // the permutation order. - order = g.getOrder(p); - - keyOrder = null; - - cardinality = null; - - break; } default: throw new AssertionError("Unknown option: " + optimizer); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |