Project

Profile

Help

Bug #6421

closed

XQuery "group by" - result data duplication

Added by Taras Chervinka 2 months ago. Updated 2 months ago.

Status:
Duplicate
Priority:
Normal
Assignee:
Category:
Internals
Sprint/Milestone:
-
Start date:
2024-05-13
Due date:
% Done:

0%

Estimated time:
Legacy ID:
Applies to branch:
10, 11, 12
Fix Committed on Branch:
Fixed in Maintenance Release:
Platforms:
.NET, Java

Description

let $a := <root>
<user id="1">A</user>
<user id="2">B</user>
<user id="1">C</user>
<user id="1">D</user>
<user id="1">E</user>
</root>

return string-join(
	for $usr in $a/user
    let $id := data($usr/@id)
    where $id = '1'
    group by $id
    return
    	for $u in $a/user
        where $u/@id = $usr/@id
        return $u/text(), ", ")

we got a case from a customer and simplified it. The expression produces different results in 9.5, 10 and 11 9.5 - A, C, D, E 10,11 - A, A, A, A, C, C, C, C, D, D, D, D, E, E, E, E


Related issues

Is duplicate of Saxon - Bug #6207: Filter expression not working properlyResolved2023-09-22

Actions

Please register to edit this issue

Also available in: Atom PDF