Bugs item #1751684, was opened at 2007-07-11 09:45
Message generated for change (Comment added) made by tsheyar
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.18
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: thijs (thijswes)
>Assigned to: Stefan Manegold (stmane)
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: 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 DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Monetdb-bugs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-bugs