Public bug reported:

I have the following query:
declare %ann:sequential function guestbook:insert($i)
{
  trace($i, "b");
};

 for $line at $i in (1 to 10)
 let $i := trace($i, "a")
 return guestbook:insert($i);

Which returns:
a [0]: xs:integer(1)
a [0]: xs:integer(2)
a [0]: xs:integer(3)
a [0]: xs:integer(4)
a [0]: xs:integer(5)
a [0]: xs:integer(6)
a [0]: xs:integer(7)
a [0]: xs:integer(8)
a [0]: xs:integer(9)
a [0]: xs:integer(10)
b [0]: xs:integer(1)
b [0]: xs:integer(2)
b [0]: xs:integer(3)
b [0]: xs:integer(4)
b [0]: xs:integer(5)
b [0]: xs:integer(6)
b [0]: xs:integer(7)
b [0]: xs:integer(8)
b [0]: xs:integer(9)
b [0]: xs:integer(10)

I was expecting:
a [0]: xs:integer(1)
b [0]: xs:integer(1)
a [0]: xs:integer(2)
b [0]: xs:integer(2)
a [0]: xs:integer(3)
b [0]: xs:integer(3)
a [0]: xs:integer(4)
b [0]: xs:integer(4)
a [0]: xs:integer(5)
b [0]: xs:integer(5)
a [0]: xs:integer(6)
b [0]: xs:integer(6)
a [0]: xs:integer(7)
b [0]: xs:integer(7)
a [0]: xs:integer(8)
b [0]: xs:integer(8)
a [0]: xs:integer(9)
b [0]: xs:integer(9)
a [0]: xs:integer(10)
b [0]: xs:integer(10)

** Affects: zorba
     Importance: Undecided
     Assignee: Matthias Brantner (matthias-brantner)
         Status: New

** Changed in: zorba
     Assignee: (unassigned) => Matthias Brantner (matthias-brantner)

** Changed in: zorba
    Milestone: None => 2.5

-- 
You received this bug notification because you are a member of Zorba
Coders, which is the registrant for Zorba.
https://bugs.launchpad.net/bugs/962390

Title:
  For Clause materialization

Status in Zorba - The XQuery Processor:
  New

Bug description:
  I have the following query:
  declare %ann:sequential function guestbook:insert($i)
  {
    trace($i, "b");
  };

   for $line at $i in (1 to 10)
   let $i := trace($i, "a")
   return guestbook:insert($i);

  Which returns:
  a [0]: xs:integer(1)
  a [0]: xs:integer(2)
  a [0]: xs:integer(3)
  a [0]: xs:integer(4)
  a [0]: xs:integer(5)
  a [0]: xs:integer(6)
  a [0]: xs:integer(7)
  a [0]: xs:integer(8)
  a [0]: xs:integer(9)
  a [0]: xs:integer(10)
  b [0]: xs:integer(1)
  b [0]: xs:integer(2)
  b [0]: xs:integer(3)
  b [0]: xs:integer(4)
  b [0]: xs:integer(5)
  b [0]: xs:integer(6)
  b [0]: xs:integer(7)
  b [0]: xs:integer(8)
  b [0]: xs:integer(9)
  b [0]: xs:integer(10)

  I was expecting:
  a [0]: xs:integer(1)
  b [0]: xs:integer(1)
  a [0]: xs:integer(2)
  b [0]: xs:integer(2)
  a [0]: xs:integer(3)
  b [0]: xs:integer(3)
  a [0]: xs:integer(4)
  b [0]: xs:integer(4)
  a [0]: xs:integer(5)
  b [0]: xs:integer(5)
  a [0]: xs:integer(6)
  b [0]: xs:integer(6)
  a [0]: xs:integer(7)
  b [0]: xs:integer(7)
  a [0]: xs:integer(8)
  b [0]: xs:integer(8)
  a [0]: xs:integer(9)
  b [0]: xs:integer(9)
  a [0]: xs:integer(10)
  b [0]: xs:integer(10)

To manage notifications about this bug go to:
https://bugs.launchpad.net/zorba/+bug/962390/+subscriptions

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to     : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp

Reply via email to