Revision: 4540
http://mxquery.svn.sourceforge.net/mxquery/?rev=4540&view=rev
Author: pm_fischer
Date: 2012-03-12 17:36:28 +0000 (Mon, 12 Mar 2012)
Log Message:
-----------
Forseq: create a window if no underlying iterator provides one
Modified Paths:
--------------
trunk/MXQuery/src/ch/ethz/mxquery/iterators/forseq/ForseqIterator.java
Modified: trunk/MXQuery/src/ch/ethz/mxquery/iterators/forseq/ForseqIterator.java
===================================================================
--- trunk/MXQuery/src/ch/ethz/mxquery/iterators/forseq/ForseqIterator.java 2012-03-12 15:50:03 UTC (rev 4539)
+++ trunk/MXQuery/src/ch/ethz/mxquery/iterators/forseq/ForseqIterator.java 2012-03-12 17:36:28 UTC (rev 4540)
@@ -17,6 +17,7 @@
import java.util.Vector;
+import ch.ethz.mxquery.bindings.WindowFactory;
import ch.ethz.mxquery.contextConfig.Context;
import ch.ethz.mxquery.contextConfig.XQStaticContext;
import ch.ethz.mxquery.datamodel.QName;
@@ -142,8 +143,11 @@
//TODO: Do this stuff in FFLWOR
protected void init() throws MXQueryException {
//seq = WindowFactory.getNewWindow(context, this.subIters[0],parallelAccess);
- if (subIters[0] instanceof VariableIterator)
+ if (subIters[0] instanceof VariableIterator) {
seq = ((VariableIterator)subIters[0]).getUnderlyingIterator();
+ if (seq == null)
+ seq = WindowFactory.getNewWindow(context, this.subIters[0],parallelAccess);
+ }
else
seq = (Window)subIters[0];
if(firstInit){
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|