Bugs item #2276427, was opened at 2008-11-13 13:48
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=482468&aid=2276427&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: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Hans (hans_0_)
Assigned to: Nobody/Anonymous (nobody)
Summary: CMDmulti_merged_union: operation failed
Initial Comment:
This error was raised with the following xquery:
let $indexdoc := <XIRAF>
<link xid="127403" nid="2070022"><properties/></link>
<link xid="127431" nid="2070238"><properties/></link>
<file xid="146327"
nid="2367886"><properties><name>name1</name></properties></file>
<folder xid="148892"
nid="2408034"><properties><name>name2</name></properties></folder>
</XIRAF>
let $notesdoc := (<root><notes>
<objectnote unixtime="1222247507" user="user1" xid="146327">On 24 Sep 2008
09:11:47 GMT user1 wrote: Interessant </objectnote>
<objectnote unixtime="1216997181" user="user2" xid="148892">On 25 Jul 2008
16:46:21 GMT user2 wrote: folder name sounds suspicious</objectnote>
<objectnote unixtime="1216652532" user="user2" xid="127403">On 21 Jul 2008
17:02:12 GMT user2 wrote: een hyves account.. </objectnote>
<objectnote unixtime="1216652365" user="user2" xid="127431">On 21 Jul 2008
16:59:25 GMT user2 wrote: Datum van zoekopdracht: 3 Jun 2008 16:10:42
GMT</objectnote>
<objectnote unixtime="1216652301" user="user2" xid="127431">On 21 Jul 2008
16:58:21 GMT user2 wrote: hmmm, </objectnote>
</notes></root>)
let $result := (let $input := ($indexdoc//*[properties])
let $notedxids := distinct-values($notesdoc/notes/objectnote/@xid)
let $notedobjectsresult := $input intersect
(for $notedxid in $notedxids
return [EMAIL PROTECTED])
for $raw in $notedobjectsresult
return $raw
)
let $subresult := subsequence($result, 1, 1000)
let $nobj := count($subresult)
let $out := (
for $i in $subresult
let $note := ($notesdoc/notes/[EMAIL PROTECTED]/@xid])[1]
return element { name($i) } {
attribute nid { string(exactly-one(pf:nid(exactly-one($i)))) },
$i/@xid,
$i/properties/(name)
,$note
})
return element result {
element matches { count($result) },
element results { $out }
}
<>
Raises the following error report:
MAPI = [EMAIL PROTECTED]:51240
QUERY = let $indexdoc := <XIRAF>
ERROR = !ERROR: merged_union: tail of first BAT/column of table 3 must be
sorted.
!ERROR: CMDmulti_merged_union: operation failed.
Whereas the following xquery:
let $indexdoc := <XIRAF>
<link xid="127403" nid="2070022"><properties/></link>
<link xid="127431" nid="2070238"><properties/></link>
<file xid="146327"
nid="2367886"><properties><name>name1</name></properties></file>
<folder xid="148892"
nid="2408034"><properties><name>name2</name></properties></folder>
</XIRAF>
let $notesdoc := (<root><notes>
<objectnote unixtime="1222247507" user="user1" xid="146327">On 24 Sep 2008
09:11:47 GMT user1 wrote: Interessant </objectnote>
<objectnote unixtime="1216997181" user="user2" xid="148892">On 25 Jul 2008
16:46:21 GMT user2 wrote: folder name sounds suspicious</objectnote>
<objectnote unixtime="1216652532" user="user2" xid="127403">On 21 Jul 2008
17:02:12 GMT user2 wrote: een hyves account.. </objectnote>
<objectnote unixtime="1216652365" user="user2" xid="127431">On 21 Jul 2008
16:59:25 GMT user2 wrote: Datum van zoekopdracht: 3 Jun 2008 16:10:42
GMT</objectnote>
<objectnote unixtime="1216652301" user="user2" xid="127431">On 21 Jul 2008
16:58:21 GMT user2 wrote: hmmm, </objectnote>
</notes></root>)
let $result := (let $input := ($indexdoc//*[properties])
let $notedxids := distinct-values($notesdoc/notes/objectnote/@xid)
let $notedobjectsresult := $input intersect
(for $notedxid in $notedxids
return [EMAIL PROTECTED])
for $raw in $notedobjectsresult
return $raw
)
let $subresult := subsequence($result, 1, 1000)
let $nobj := count($subresult)
let $out := (
for $i in $subresult
let $note := ($notesdoc/notes/[EMAIL PROTECTED]/@xid])[1]
return element { name($i) } {
attribute nid { string(exactly-one(pf:nid(exactly-one($i)))) },
$i/@xid,
$i/properties/(name)
,element objectnote {$note/@*, $note/*, $note/text()}
})
return element result {
element matches { count($result) },
element results { $out }
}
<>
Returns:
<result><matches>4</matches>
<results>
<link xid="127403" nid="3"><objectnote xid="127403" user="user2"
unixtime="1216652532">On 21 Jul 2008 17:02:12 GMT user2 wrote: een hyves
account.. </objectnote></link>
<link xid="127431" nid="5"><objectnote xid="127431" user="user2"
unixtime="1216652365">On 21 Jul 2008 16:59:25 GMT user2 wrote: Datum van
zoekopdracht: 3 Jun 2008 16:10:42 GMT</objectnote></link>
<file xid="146327" nid="7"><name>name1</name><objectnote xid="146327"
user="user1" unixtime="1222247507">On 24 Sep 2008 09:11:47 GMT user1 wrote:
Interessant </objectnote></file>
<folder xid="148892" nid="11"><name>name2</name><objectnote xid="148892"
user="user2" unixtime="1216997181">On 25 Jul 2008 16:46:21 GMT user2 wrote:
folder name sounds suspicious</objectnote></folder>
</results></result>
The only difference in the xquery is in line 31:
,$note
is replaced by:
,element objectnote {$note/@*, $note/*, $note/text()}
I used a compiled version of the MonetDB-Aug2008-SuperBall.tar.bz2 on an Ubuntu
8.04 Linux system.
Regards,
Hans van Rijswijk
Netherlands Forensic Institute
The Hague, Netherlands.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=482468&aid=2276427&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