Comment 7 for bug 1058398

Revision history for this message
Matthias Brantner (matthias-brantner) wrote : Re: [Bug 1058398] Re: value-based sequence operations

Correct, but the execution is really slow.
The reason for having them in C++ is purely performance.

Also, general comparison is not available in JSONiq and writing the below
queries is cumbersome.

On Sep 24, 2013, at 9:09 AM, "Paul J. Lucas" <email address hidden> wrote:

> Isn't:
>
> seq:value-intersect( $s1, $s2 )
> seq:value-union( $s1, $s2 )
> seq:value-except( $s1, $s2 )
>
> the same as:
>
> distinct-values( $s1[ . = $s2 ] )
> distinct-values( ($s1, $s2) )
> distinct-values( $s1[ not( . = $s2 ) ] )
>
> ? The latter are already implemented in C++, so why are the value-*
> functions proposed here necessary?
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1058398
>
> Title:
> value-based sequence operations
>
> Status in Zorba - NoSQL Query Processor:
> In Progress
>
> Bug description:
> Implement the following value-based sequence function in a new
> sequence module:
>
> module namespace seq = "http://www.zorba-xquery.com/modules/sequence";
>
> declare function seq:value-intersect($seq1 as xs:anyAtomicType*, $seq2 as xs:anyAtomicType*) as xs:anyAtomicType*
> external;
>
> declare function seq:value-union($seq1 as xs:anyAtomicType*, $seq2 as
> xs:anyAtomicType*) as xs:anyAtomicType* external;
>
> declare function seq:value-except($seq1 as xs:anyAtomicType*, $seq2 as
> xs:anyAtomicType*) as xs:anyAtomicType* external;
>
> - The function should use value comparison but use false instead of an error in case of a type mismatch.
> - JSONiq module
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/zorba/+bug/1058398/+subscriptions