Bugs item #1763575, was opened at 2007-07-30 15:17
Message generated for change (Comment added) made by boncz
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=482468&aid=1763575&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: Pathfinder 0.18
>Status: Pending
>Resolution: Fixed
Priority: 5
Private: No
Submitted By: Wouter Alink (vzzzbx)
>Assigned to: Wouter Alink (vzzzbx)
Summary: XQ: insert attribute gives ERROR in merged_union

Initial Comment:
(using today's nightly stable build)
shredding the attached document with:

pf:add-doc("/tmp/tmpDoc3.xml","test.xml","test.xml",10)

and afterwards issuing the following two queries:

for $i in doc("test.xml")//file return do insert attribute { "nid" } { 
pf:nid($i) } into $i

for $i in doc("test.xml")//*[not(file)] return do insert attribute { "nid" } { 
pf:nid($i) } into $i

returns an error:

MAPI  = [EMAIL PROTECTED]:50182
QUERY = for $i in doc("test.xml")//*[not(file)] return do insert attribute { 
"nid" } { pf:nid($i) } into $i
ERROR = !ERROR: merged_union: tail of first BAT must be sorted.
        !ERROR: CMDmerged_union: operation failed.
        !ERROR: interpret_params: reverse(param 1): evaluation error.
        !ERROR: interpret_params: kdiff(param 1): evaluation error.
        !ERROR: interpret_params: access(param 1): evaluation error.
        !ERROR: interpret_params: insert(param 1): evaluation error.



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

>Comment By: Peter Boncz (boncz)
Date: 2007-08-02 21:19

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

fixed

now the query gives another error stating that a target node exists that
already has a nid attribute.

this is correct, because the second update adds the nid attribute to all
nodes that do ot have a *CHILD* of type file. Examples of such nodes are
all file nodes..

Anyway, I really do appreciate the bug reports. Still a remark. From the
coding patterns these reports express, I deduce some desire to add explicit
'nid' attributes to XML as IDs. I think this is very confusing and should
be forbidden; each note has a native NID; it should not be present
explicitly. I would only use nids as in IDREFs (ie referring to other
nodes).

And of course, you are aware that as of yet, backup/restore in the admin
GUI does not preserve NIDs in updatable documents..

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

Comment By: Sjoerd Mullender (sjoerd)
Date: 2007-08-01 15:30

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

I can easily reproduce this on the current Stable.

The problem occurs in the call to merged_union in get_attr_own().  The
first two input BATs need to be sorted in the tail, but aren't.

The way the code works is that the head columns of the ATTR_OWN_PRIVATE
and ATTR_OWN_SHARED BATs need to be sorted (there is a .hmark([EMAIL 
PROTECTED]) done on
both), but in this case they aren't.

My question to Peter: is it a bug that those tables are not sorted in
their head columns?
If not, can you fix your code in get_attr_own?

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

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

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Monetdb-bugs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-bugs

Reply via email to