Actions
Bug #3280
closedRegression on XQuery streaming
Start date:
2017-06-14
Due date:
% Done:
100%
Estimated time:
Legacy ID:
Applies to branch:
9.8
Fix Committed on Branch:
9.8
Fixed in Maintenance Release:
Platforms:
Description
One of my XQuery streaming tests showed a regression with Saxon-EE 9.8.0.1:
for $x in saxon:stream(doc('uriresolver:resolve')/*/*)/*
return $x
The attached TestNG test demonstrates this.
Files
Updated by Michael Kay over 7 years ago
- Status changed from New to In Progress
It seems the simpler formulation
saxon:stream(doc('uri')/*/*)/*
is working, but the equivalent verbose form
for $x in saxon:stream(doc('uri')/*/*)/* return $x
is not. The query compiles into
docOrder((("uri" ! (StreamInstr(., snapshot(child::element()/child::element())))) treat as node())/child::element())
which is not streamable because it contains a sort into document order. By contrast the simpler expression compiles to
(("uri" ! (StreamInstr(., snapshot(child::element()/child::element())))) treat as node())/child::element()
Updated by Michael Kay over 7 years ago
- Category set to Streaming
- Status changed from In Progress to Resolved
- Assignee set to Michael Kay
- Priority changed from Low to Normal
- Fix Committed on Branch 9.8 added
I have solved the problem by persuading DocumentSorter.optimize() to try a little harder to get rid of the sort into document order. Specifically, it recomputes the special properties of the operand expression if necessary to see whether it really does require sorting.
Updated by O'Neil Delpratt over 7 years ago
- Status changed from Resolved to Closed
- % Done changed from 0 to 100
- Fixed in Maintenance Release 9.8.0.2 added
Patch applied in the Saxon 9.8.0.2 maintenance release
Please register to edit this issue
Actions