From: <tho...@us...> - 2013-12-24 00:33:36
|
Revision: 7692 http://bigdata.svn.sourceforge.net/bigdata/?rev=7692&view=rev Author: thompsonbry Date: 2013-12-24 00:33:28 +0000 (Tue, 24 Dec 2013) Log Message: ----------- Linked the parent query and the RTO subquery. Removed the EndOp from the RTO subquery. RTO is running (for simple queries). Modified Paths: -------------- branches/BIGDATA_RELEASE_1_3_0/bigdata/src/java/com/bigdata/bop/joinGraph/PartitionedJoinGroup.java branches/BIGDATA_RELEASE_1_3_0/bigdata/src/java/com/bigdata/bop/joinGraph/rto/JoinGraph.java Modified: branches/BIGDATA_RELEASE_1_3_0/bigdata/src/java/com/bigdata/bop/joinGraph/PartitionedJoinGroup.java =================================================================== --- branches/BIGDATA_RELEASE_1_3_0/bigdata/src/java/com/bigdata/bop/joinGraph/PartitionedJoinGroup.java 2013-12-23 22:45:36 UTC (rev 7691) +++ branches/BIGDATA_RELEASE_1_3_0/bigdata/src/java/com/bigdata/bop/joinGraph/PartitionedJoinGroup.java 2013-12-24 00:33:28 UTC (rev 7692) @@ -1143,14 +1143,14 @@ * * [This should perhaps be moved into the caller.] */ - lastOp = new EndOp(new BOp[] { lastOp }, NV - .asMap(new NV[] { - new NV(JoinGraph.Annotations.BOP_ID, idFactory.nextId()), // - new NV(JoinGraph.Annotations.EVALUATION_CONTEXT, - BOpEvaluationContext.CONTROLLER)// -// new NV(PipelineOp.Annotations.SHARED_STATE,true),// - }) // - ); +// lastOp = new EndOp(new BOp[] { lastOp }, NV +// .asMap(new NV[] { +// new NV(JoinGraph.Annotations.BOP_ID, idFactory.nextId()), // +// new NV(JoinGraph.Annotations.EVALUATION_CONTEXT, +// BOpEvaluationContext.CONTROLLER)// +//// new NV(PipelineOp.Annotations.SHARED_STATE,true),// +// }) // +// ); return lastOp; Modified: branches/BIGDATA_RELEASE_1_3_0/bigdata/src/java/com/bigdata/bop/joinGraph/rto/JoinGraph.java =================================================================== --- branches/BIGDATA_RELEASE_1_3_0/bigdata/src/java/com/bigdata/bop/joinGraph/rto/JoinGraph.java 2013-12-23 22:45:36 UTC (rev 7691) +++ branches/BIGDATA_RELEASE_1_3_0/bigdata/src/java/com/bigdata/bop/joinGraph/rto/JoinGraph.java 2013-12-24 00:33:28 UTC (rev 7692) @@ -44,6 +44,7 @@ import com.bigdata.bop.ap.SampleIndex; import com.bigdata.bop.ap.SampleIndex.SampleType; import com.bigdata.bop.controller.AbstractSubqueryOp; +import com.bigdata.bop.engine.AbstractRunningQuery; import com.bigdata.bop.engine.IRunningQuery; import com.bigdata.bop.engine.QueryEngine; import com.bigdata.bop.joinGraph.PartitionedJoinGroup; @@ -304,6 +305,7 @@ final BOpIdFactory idFactory = new BOpIdFactory(); // Generate the query from the join path. + // FIXME Update this using StaticAnalysis logic. final PipelineOp queryOp = PartitionedJoinGroup.getQuery(idFactory, false/* distinct */, getSelected(), p.getPredicates(), getConstraints()); @@ -361,12 +363,16 @@ ICloseableIterator<IBindingSet[]> subquerySolutionItr = null; - final IRunningQuery runningQuery = queryEngine.eval(queryOp); + final IRunningQuery runningSubquery = queryEngine.eval(queryOp); try { + // Declare the child query to the parent. + ((AbstractRunningQuery) parentContext.getRunningQuery()) + .addChild(runningSubquery); + // Iterator visiting the subquery solutions. - subquerySolutionItr = runningQuery.iterator(); + subquerySolutionItr = runningSubquery.iterator(); // Copy solutions from the subquery to the query. final long nout = BOpUtility.copy(subquerySolutionItr, @@ -377,7 +383,7 @@ // System.out.println("nout=" + nout); // verify no problems. - runningQuery.get(); + runningSubquery.get(); // System.out.println("Future Ok"); @@ -400,7 +406,7 @@ } finally { - runningQuery.cancel(true/* mayInterruptIfRunning */); + runningSubquery.cancel(true/* mayInterruptIfRunning */); if (subquerySolutionItr != null) subquerySolutionItr.close(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |