Bugs item #1887055, was opened at 2008-02-05 15:52 Message generated for change (Comment added) made by tsheyar You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=482468&aid=1887055&group_id=56967
Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: PF general Group: Pathfinder 0.22 Status: Open Resolution: None Priority: 5 Private: No Submitted By: Maurice van Keulen (mvankeulen) >Assigned to: Maurice van Keulen (mvankeulen) Summary: [PF] for variable contains more than one element Initial Comment: The attached query fails with ERROR = !ERROR: err:FORG0005: function fn:exactly-one expects exactly one value. Lines 104 and 105 is where the error is triggered: for $w5 in $ctx4 let $pw5 := data(exactly-one($w5)/@prob) Note that the argument to exactly-one is $w5 which is bound by the for just above it. So, it should always contain just one element ... but apparently it doesn't. ---------------------------------------------------------------------- >Comment By: Jan Rittinger (tsheyar) Date: 2008-02-07 18:34 Message: Logged In: YES user_id=993208 Originator: NO Here the for loop seems to be missing. It looks like $ctx4 is directly bound to $w5. Again (as in bug report #1886994) the query is too large to say something useful. Please provide a smaller example. ---------------------------------------------------------------------- Comment By: Stefan Manegold (stmane) Date: 2008-02-07 10:17 Message: Logged In: YES user_id=572415 Originator: NO Jan, could you please have a quick look, whether this one rings a bell with you? Feel free to re-/un-assign in case it's not "your business"... Thanks! Stefan ---------------------------------------------------------------------- Comment By: Maurice van Keulen (mvankeulen) Date: 2008-02-07 09:23 Message: Logged In: YES user_id=654674 Originator: YES If $ctx is empth, then the for-loop would have no iterations at all. In a for-loop, the loop variable, in this case $w5, is ALWAYS bound to exactly-one value or element. I think this bug is related to or may even have the same cause as my previous one (1886994). The behaviour I see if I leave out the exactly-one is that $w5 seems to be bound to two elements ... so I'm even more surprised that it works for you with zero-or-one(). ---------------------------------------------------------------------- Comment By: Stefan Manegold (stmane) Date: 2008-02-06 19:29 Message: Logged In: YES user_id=572415 Originator: NO Work for me with zero-or-one()! Is $ctx4 and hence $w5 empty? Or is "just" exactly-one() broken?? ---------------------------------------------------------------------- Comment By: Stefan Manegold (stmane) Date: 2008-02-06 19:21 Message: Logged In: YES user_id=572415 Originator: NO Maurice, did/could you try whether it works with zero-or-one() instead of exactly-one()? Stefan ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=482468&aid=1887055&group_id=56967 ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Monetdb-bugs mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/monetdb-bugs
