Bugs item #1751684, was opened at 2007-07-11 09:45
Message generated for change (Settings changed) made by stmane
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=482468&aid=1751684&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: None
>Group: Pathfinder 0.24
>Status: Open
Resolution: Fixed
>Priority: 6
Private: No
Submitted By: thijs (thijswes)
>Assigned to: Jan Rittinger (tsheyar)
Summary: XQ: merged_union error with fn:sum()
Initial Comment:
fn:sum() causes a merged_union error on some data. I could not pinpoint the
exact pre-conditions for this error to occur, but the following simple query
(on the attached small document) fails:
let $res := doc("/....../tmp.xml")
for $f in distinct-values(data($res//@id))
return ($f,fn:sum($res//[EMAIL PROTECTED]/@score))
The same query with a fn:count instead of a fn:sum does not fail and produces
the expected output.
I tried the query on the X.18 release.
My environment:
FC6
gcc 4.1.1,
flex version 2.5.4
bison (GNU Bison) 2.3
autoconf (GNU Autoconf) 2.59
automake (GNU automake) 1.9.6
ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06)
----------------------------------------------------------------------
>Comment By: Stefan Manegold (stmane)
Date: 2008-06-02 00:02
Message:
Logged In: YES
user_id=572415
Originator: NO
Re-opening:
While working fine with the MPS back-end, the tests fails with the ALG
back-end, mainly as fn:sum() seems to calculate different results;
cf.
http://monetdb.cwi.nl/testing/projects/monetdb/Stable/pathfinder/.mTestsG103/GNU.64.64.d-Fedora8/tests_BugTracker/merged-union_error_with_fn-sum.SF-1751684.out.00.html
See also
[ 1636588 ] Predicate selects too few nodes
https://sourceforge.net/tracker/index.php?func=detail&aid=1636588&group_id=56967&atid=482468
----------------------------------------------------------------------
Comment By: Stefan Manegold (stmane)
Date: 2007-07-11 15:18
Message:
Logged In: YES
user_id=572415
Originator: NO
Fixed in CVS (XQuery_0-18 release branch; propagation to development trunk
pending).
Added respective test in
pathfinder/tests/BugTracker/Tests/merged-union_error_with_fn-sum.SF-1751684.*
----------------------------------------------------------------------
Comment By: Jan Rittinger (tsheyar)
Date: 2007-07-11 13:08
Message:
Logged In: YES
user_id=993208
Originator: NO
Stefan,
assigning the bug to you as you (in comparison to me) certainly have a
stable version running :)
Could you please check in the below change.
Thanks,
Jan
----------------------------------------------------------------------
Comment By: thijs (thijswes)
Date: 2007-07-11 11:04
Message:
Logged In: YES
user_id=1305406
Originator: YES
Yes, this fixes the bug. Thanks.
----------------------------------------------------------------------
Comment By: Jan Rittinger (tsheyar)
Date: 2007-07-11 10:37
Message:
Logged In: YES
user_id=993208
Originator: NO
Hi Thijs,
Could you please apply the following diff, recompile, and check if your
query then works?
-- Thanks, Jan
Index: mil/milprint_summer.c
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/mil/milprint_summer.c,v
retrieving revision 1.391
diff -c -r1.391 milprint_summer.c
*** mil/milprint_summer.c 27 Jun 2007 13:46:45 -0000 1.391
--- mil/milprint_summer.c 11 Jul 2007 08:35:55 -0000
***************
*** 4661,4667 ****
"var iter_grp := iter.materialize(ipik);\n"
"iter := iter_grp.tunique();\n"
"var iter_aggr := {%s}(item%s, iter_grp,
iter).tmark([EMAIL PROTECTED]);\n"
! "iter := iter.hmark([EMAIL PROTECTED]);\n"
"ipik := iter;\n"
"pos := [EMAIL PROTECTED];\n"
"kind := %s;\n",
--- 4661,4667 ----
"var iter_grp := iter.materialize(ipik);\n"
"iter := iter_grp.tunique();\n"
"var iter_aggr := {%s}(item%s, iter_grp,
iter).tmark([EMAIL PROTECTED]);\n"
! "iter := iter.hmark([EMAIL PROTECTED]).chk_order();\n"
"ipik := iter;\n"
"pos := [EMAIL PROTECTED];\n"
"kind := %s;\n",
----------------------------------------------------------------------
Comment By: Jan Rittinger (tsheyar)
Date: 2007-07-11 10:19
Message:
Logged In: YES
user_id=993208
Originator: NO
Looks like a chk_order() in mps is missing.
----------------------------------------------------------------------
Comment By: thijs (thijswes)
Date: 2007-07-11 09:59
Message:
Logged In: YES
user_id=1305406
Originator: YES
Sorry, intended to include this, but forgot. The error message is the
following:
MAPI = [EMAIL PROTECTED]:50000
QUERY = let $res := doc("/ufs/thijs/tmp/tmp.xml")
ERROR = !ERROR: merged_union: tail of first BAT must be sorted.
!ERROR: CMDmerged_union: operation failed.
With property checking enabled, the query runs fine and produces the
expected results.
----------------------------------------------------------------------
Comment By: Stefan Manegold (stmane)
Date: 2007-07-11 09:53
Message:
Logged In: YES
user_id=572415
Originator: NO
Thijs,
What is the exact error (-message)?
Could you please try with property checking enabled (`Mserver --debug=10
...`) and report on the results?
Stefan
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=482468&aid=1751684&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