Bugs item #1835745, was opened at 2007-11-21 13:58
Message generated for change (Comment added) made by stmane
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=482468&aid=1835745&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/runtime
Group: (zombie: Pathfinder 0.20)
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Hans (hans_0_)
Assigned to: Nobody/Anonymous (nobody)
Summary: XQ: recursive function call gives wrong result

Initial Comment:
version: Supersource tarball SR3.
Compiled on fedora core 5, 64-bit with 32-bits oid.


The following xquery returns an erroneous result:
The query:

declare function test($nodes as node()*) { 
for $n in $nodes[./self::a] 
let $c := test($n/*) 
where (count($c) > 0) 
order by $n/@name 
return element a { $n/@name, $c } , 
for $n in $nodes[./self::b] return $n 
}; 
test(<x><a name="1"></a><a name="2"><a name="y"><b name="2"/></a></a></x>/*) , 
test(<x><a name="1"><a name="x"/></a><a name="2"><a name="y"><b 
name="2"/></a></a></x>/*) 
<>

Returns:

<a name="2"><a name="y"><b name="2"/></a></a>, 
<a name="1"><a name="y"><b name="2"/></a></a>

Expected result is:

<a name="2"><a name="y"><b name="2"/></a></a>, 
<a name="2"><a name="y"><b name="2"/></a></a>

If the order by clause is omitted, the result is correct, except for the 
ordering.

Regards,
Hans van Rijswijk.


----------------------------------------------------------------------

>Comment By: Stefan Manegold (stmane)
Date: 2008-10-04 10:07

Message:

See also
[ 2140992 ] XQ: "order by" doesn't work in the non-algebra version
https://sourceforge.net/tracker/index.php?func=detail&aid=2140992&group_id=56967&atid=482468


----------------------------------------------------------------------

Comment By: Stefan Manegold (stmane)
Date: 2007-11-27 16:11

Message:
Logged In: YES 
user_id=572415
Originator: NO

Note, though, that the algebra back-end does not support recursive
functions, yet:

http://monetdb.cwi.nl/testing/projects/monetdb/Current/pathfinder_algebra/.mTests103/GNU.64.32.d-Fedora6/tests_BugTracker/recursive_function.SF-1835745.err.00.html

ERROR = !fatal error: Algebra implementation cannot cope with recursive
functions yet.


----------------------------------------------------------------------

Comment By: Peter Boncz (boncz)
Date: 2007-11-27 16:00

Message:
Logged In: YES 
user_id=591107
Originator: NO

nested order by in milprint-summer is buggy (see some W3C tests that have
been failing for a long time). 

this will not be fixed. the algebra backend does not have these problems.

----------------------------------------------------------------------

Comment By: Stefan Manegold (stmane)
Date: 2007-11-21 17:20

Message:
Logged In: YES 
user_id=572415
Originator: NO

Test added in
pathfinder/tests/BugTracker/Tests/recursive_function.SF-1835745.*
(XQuery_0-20 branch).

Confirms that without "order by" the result is as expected, while it is
not with "order by".

Further investigations still need to be performed.

Volunteer(s)?


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=482468&aid=1835745&group_id=56967

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Monetdb-bugs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-bugs

Reply via email to