Actions
Bug #1929
closedunsorted() optimization is too aggressive
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
Actions