Bugs item #1964365, was opened at 2008-05-15 10:11
Message generated for change (Comment added) made by boncz
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=482468&aid=1964365&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 general
Group: Pathfinder CVS Head
Status: Open
Resolution: Fixed
Priority: 6
Private: No
Submitted By: Lefteris Sidirourgos (lsidir)
Assigned to: Lefteris Sidirourgos (lsidir)
Summary: PF/Alg: insert..into inserts in wrong order

Initial Comment:
Insert .. into, inserts attributes in wrong order.

Also, insert into as first/last/before/after should be tested individually in 
the test web with new tests for both elements and attributes.

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

Comment By: Peter Boncz (boncz)
Date: 2008-12-12 00:16

Message:
Lefteris: is the current output the correct one?

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

Comment By: Stefan Manegold (stmane)
Date: 2008-06-08 16:55

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

Re-opened to remind us that ALG still/again produces different
order/output than MPS with
http://monetdb.cwi.nl/testing/projects/monetdb/Stable/pathfinder/.mTestsG103/GNU.64.64.d-Fedora8/tests_Update/insert_test_order_seq.out.00.html

AFAIK, Lefteris is already aware of this ...


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

Comment By: Lefteris Sidirourgos (lsidir)
Date: 2008-06-04 09:30

Message:
Logged In: YES 
user_id=1856546
Originator: YES

The case of an insert of a sequence of nodes (not a sequence of inserts)
was inserting in wrong order. The bug was fixed and 2 tests were added in
the testweb:  insert_test_order and insert_test_order_seq.

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

Comment By: Lefteris Sidirourgos (lsidir)
Date: 2008-05-17 21:15

Message:
Logged In: YES 
user_id=1856546
Originator: YES

Sorry but I don't understand why we are having this conversation.

I was the one who implemented the update functionality of algebra, I saw
that the test were failing, and given the fact that we are getting to a
release, I wanted to document the fact that more detailed tests are needed
and even try to make it compatible with MPS so the tests would work fine
for both back-ends. I just didn't had time to investigate this further yet,
thats why is still open (after all it is there only 2 days).

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

Comment By: Jens Teubner (teubner)
Date: 2008-05-17 19:59

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

It seems like I have to repeat:

The order in which `insert into ...' instructions are applied to the
store is undefined.

This means that

  let $a := ...
    return (insert <a/> as first into $a,
            insert <b/> as first into $a)

is semantically equivalent to

  let $a := ...
    return (insert <b/> as first into $a,
            insert <a/> as first into $a) .

(It's kind of strange that the Update Facility is defined this way.
Order is pervasive in XQuery, but undefined in the Update Facility.  To
confuse things even more, the Update Facility talks about a ``pending
update list,'' whereas it actually is not a list.  It is unordered.)

(Not sure whether XQuery's order indifference in that respect is the
case why the tests fail.  Earlier versions of MonetDB/XQuery did
preserve the order of update instructions.  Don't know whether it's
still supposed to do that.)


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

Comment By: Lefteris Sidirourgos (lsidir)
Date: 2008-05-17 17:11

Message:
Logged In: YES 
user_id=1856546
Originator: YES

Let me give an example why this is a bug then:)

Test tests/Update/update fails for various reasons. One reason is the
different order of attributes than the approved output, but this is not a
bug indeed. However, for example, the element with text "element content
0020" fails because the approved output ends with 

element content 0020<a/><b/></element>

while the algebra outputs

element content 0020<b/><a/></element>

which is a wrong order in inserting an element. Thats why I said we need
also to add tests that just test the correct order (i.e., update.xq test is
to big to track what goes wrong).

I am currently trying to debug this, and make more tests.

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

Comment By: Sjoerd Mullender (sjoerd)
Date: 2008-05-16 22:58

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

The only time order matters when inserting attributes is when you're
inserting the same attribute with different values multiple times into the
same element.  I don't know what the standard says here, but we would like
the last one to stick (unless the standard prohibits this).

The different order of attributes on output is purely an inconvenience. 
It is no shape or fashion a bug.
(I would like to have an option to have the attributes produces in
alphabetical order so that we can get consistent test results, but it is
not a bug if the order is different.  Not even if each run produces a
different order.)

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

Comment By: Lefteris Sidirourgos (lsidir)
Date: 2008-05-16 16:32

Message:
Logged In: YES 
user_id=1856546
Originator: YES

You are right that this report is too terse to exactly know what my
problem is:) but it serves more as a remainder, since I assigned this to
myself. The problem is that some tests on the testweb are failing because
of different attribute order than the one approved, second that the order
of the insert into in the update spec is defined now
(http://www.w3.org/TR/xquery-update-10/#id-upd-insert-into : The semantics
of upd:insertInto are identical to the semantics of upd:insertBefore) and
finally that there are not enough tests on the testweb to correctly check
if insert before/as first is actually done correctly.

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

Comment By: Jens Teubner (teubner)
Date: 2008-05-16 16:10

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

This report is too terse to exactly know what your problem is.  But
be aware that

 -- There is no order among attributes of the same element node.

 -- The order in which `insert into ...' instructions are applied to
    the store is undefined.


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

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

------------------------------------------------------------------------------
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
The future of the web can't happen without you.  Join us at MIX09 to help
pave the way to the Next Web now. Learn more and register at
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
_______________________________________________
Monetdb-bugs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-bugs

Reply via email to