Bug #6421
closedXQuery "group by" - result data duplication
0%
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
Updated by Taras Chervinka 7 months ago
- 9.5 - A, C, D, E
- 10.8, 11.5 - A, A, A, A, C, C, C, C, D, D, D, D, E, E, E, E
Updated by Michael Kay 7 months ago
- Subject changed from result data duplication to XQuery "group by" - result data duplication
Thanks for reporting it. Initial inquiries show:
As far as I can see, the problem (that is, the duplicated output) occurs only in EE (which means it is probably an optimization error): and it occurs in releases up to 12.3, but not in 12.4. However, I can't immediately find a known bug that was cleared in 12.4 with similar symptoms. The Git change log also shows no significant changes in the "group by" code.
The -explain output from 12.3 and 12.4 appears identical -- which goes against the theory of an optimization bug.
Updated by Taras Chervinka 7 months ago
Correct, it is EE version, I have tested the same with 11.6 and it behaves the same but I see #6207 fix is committed to 11 branch. Any ETA when it can be released with 11? We have not migrated yet to 12
Updated by Taras Chervinka 7 months ago
Is that possible to release the fix for version 10?
Updated by Michael Kay 7 months ago
Our immediate priority is to get a 12.5 maintenance release out, then turn our attentions to SaxonJS. There may be a final maintenance release on the 11 branch some time, but it's not a priority (each maintenance release typically ties up the whole team for a week, sometimes longer if it's been a long time since the previous one).
Updated by Michael Kay 7 months ago
- Category set to Internals
- Status changed from New to Duplicate
- Assignee set to Michael Kay
- Priority changed from Low to Normal
- Applies to branch 10, 11, 12 added
- Platforms .NET, Java added
Duplicate of #6207
Updated by Michael Kay 7 months ago
- Is duplicate of Bug #6207: Filter expression not working properly added
Please register to edit this issue