[Bug 5183] [FO] Effect of type promotion in fn:distinct-values

http://www.w3.org/Bugs/Public/show_bug.cgi?id=5183





------- Comment #5 from zongaro@ca.ibm.com  2007-10-30 14:47 -------
Michael, in your proposed solution in comment 4, does the implementation of the
function have to choose the partition into groups in the first step in such a
way that it is actually able to select exactly one item from each group in the
second step?  Going back to my initial example,

fn:distinct-values(
     (xs:float('1.0'),
      xs:decimal('1.0000000000100000000001',
      xs:double( '1.00000000001')))

For convenience, I'll refer to the float value as Fl, the decimal value as De
and the double value as Do.  So we have these possible partitions into groups:
1. {Fl}, {De}, {Do}
2. {Fl,De}, {Do}
3. {Fl}, {De, Do}

If the implementation doesn't have to be able to select precisely one item from
each group, it could select (Fl,Do) or (De) in the first case, which means it's
still implementation-dependent whether there is one item or two items in the
result.

Since that doesn't solve the problem, I'll assume you meant that it must be
able to select precisely one item from each group.  In that way, with either
the second or third partition, the number of items in the result will be two.

Received on Tuesday, 30 October 2007 14:49:17 UTC