Bugs item #2853441, was opened at 2009-09-07 11:18
Message generated for change (Comment added) made by vzzzbx
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=482468&aid=2853441&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/compiler
Group: Pathfinder "stable"
Status: Open
Resolution: Fixed
Priority: 5
Private: No
Submitted By: Wouter Alink (vzzzbx)
Assigned to: Nobody/Anonymous (nobody)
Summary: PF: distinct values on two sequences

Initial Comment:
The following query yields duplicates (although I specified to return 
distinct-values):

let $x := ("aap","beer")
let $y := <a><b>beer</b><b>noot</b></a>//b
for $i in distinct-values(($x,$y)) return $i

It returns: 

"beer",
"noot",
"aap",
"beer"

I assume this is a bug.
Note that the following query works fine:

let $x := ("aap","beer")
let $y := ("beer","noot")
for $i in distinct-values(($x,$y)) return $i

It returns:

"aap",
"beer",
"noot"


I used:

$ bin/Mserver --dbinit="module(pathfinder);" --set mapi_port=50333
# MonetDB Server v4.30.1
# based on GDK   v1.30.1
# Copyright (c) 1993-July 2008, CWI. All rights reserved.
# Copyright (c) August 2008-2009, MonetDB B.V.. All rights reserved.
# Compiled for x86_64-unknown-linux-gnu/64bit with 64bit OIDs; dynamically 
linked.
# Visit http://monetdb.cwi.nl/ for further information.
# PF/Tijah module v0.13.0 loaded. http://dbappl.cs.utwente.nl/pftijah
# MonetDB/XQuery module v0.28.3 loaded (default back-end is 'algebra')
# XRPC administrative console at http://127.0.0.1:50334/admin
MonetDB>



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

>Comment By: Wouter Alink (vzzzbx)
Date: 2009-09-08 00:19

Message:
Thanks Jan. I just added a test. I used an older MonetDB version to
generate the output, and corrected it manually. The test might therefore
use a different order for the results which should be approved.

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

Comment By: Jan Rittinger (tsheyar)
Date: 2009-09-07 23:32

Message:
In the first example there is a mix of strings and items of type
untypedAtomics. We did not compare items of different types until now.

The XQuery Specification however says: 'Values of type xs:untypedAtomic
are compared as if they were of type xs:string.' Note: the result is of
type untypedAtomic if the input was untypedAtomic.

I extended the implementation with a special case for a mix of strings and
untypedAtomics which casts items of type untypedAtomic to string before the
duplicate elimination. In comparison to the specification we however loose
the untypedAtomic information during duplicate elimination (even if no
string matches an untypedAtomic).

Wouter can you check whether this fixes your problem.

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

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

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Monetdb-bugs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-bugs

Reply via email to