Project

Profile

Help

Bug #1929

closed

unsorted() optimization is too aggressive

Added by Michael Kay over 10 years ago. Updated over 10 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Internals
Sprint/Milestone:
-
Start date:
2013-11-02
Due date:
% Done:

100%

Estimated time:
Legacy ID:
Applies to branch:
Fix Committed on Branch:
Fixed in Maintenance Release:
Platforms:

Description

In certain circumstances Saxon decides that the results of an expression can be returned in any order: examples are the argument of sum() or count() or unordered(). In this case the relevant expression is optimized to avoid unnecessary sorting. However, the optimisation is too aggressive, because it recurses to subexpressions whose order may be significant. Some paths prevent the UNORDERED optimization filtering down to subexpressions, but many paths fail to do so. For example, a FLWORExpression applies the UNORDERED optimization to each of its clauses, which may be incorrect in the case of a "for" clause with an "at" variable.

Please register to edit this issue

Also available in: Atom PDF