zorba-coders team mailing list archive
-
zorba-coders team
-
Mailing list archive
-
Message #06736
[Merge] lp:~zorba-coders/zorba/markos-scratch into lp:zorba
Markos Zaharioudakis has proposed merging lp:~zorba-coders/zorba/markos-scratch into lp:zorba.
Requested reviews:
Markos Zaharioudakis (markos-za)
For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/99125
fixed windowing bug
--
https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/99125
Your team Zorba Coders is subscribed to branch lp:zorba.
=== modified file 'src/runtime/core/gflwor/window_iterator.cpp'
--- src/runtime/core/gflwor/window_iterator.cpp 2012-01-11 15:56:57 +0000
+++ src/runtime/core/gflwor/window_iterator.cpp 2012-03-23 21:45:25 +0000
@@ -944,10 +944,13 @@
{
if (!theEndClause.theOnlyEnd || lState->theCurWindow->theEndPos != 0)
{
+ if (lState->theCurWindow->theEndPos == 0)
+ lState->theCurWindow->theEndPos = lState->theCurInputPos - 1;
+
bindVariable(aPlanState,
lState->theDomainSeq,
lState->theOpenWindows[0].theStartPos,
- lState->theCurInputPos - 1);
+ lState->theCurWindow->theEndPos);
theStartClause.bindExtern(aPlanState,
lState->theDomainSeq,
@@ -955,7 +958,7 @@
theEndClause.bindExtern(aPlanState,
lState->theDomainSeq,
- lState->theCurInputPos-1);
+ lState->theCurWindow->theEndPos);
lState->theCurWindow = lState->theOpenWindows.erase(lState->theCurWindow);
=== modified file 'test/rbkt/Queries/zorba/windowing/q19.xq'
--- test/rbkt/Queries/zorba/windowing/q19.xq 2012-01-11 15:56:57 +0000
+++ test/rbkt/Queries/zorba/windowing/q19.xq 2012-03-23 21:45:25 +0000
@@ -5,8 +5,8 @@
for sliding window $w in $seq/sequence/*
start previous $wSPrev when $wSPrev[self::OrderRequest]
end next $wENext when $wENext/@orderID eq $wSPrev/@orderID and
- ( $wENext[self::ConfirmationRequest] and $wENext/@status eq "reject")
- or $wENext[self::ShipNotice]
+ ( $wENext[self::ConfirmationRequest] and $wENext/@status eq "reject"
+ or $wENext[self::ShipNotice])
where $wENext[self::ShipNotice]
return
<bundleWith orderId="{$wSPrev/@orderID}">
Follow ups