Bug #3280
closed
Regression on XQuery streaming
Fix Committed on Branch:
9.8
Fixed in Maintenance Release:
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
- 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()
- 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.
- 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
Also available in: Atom
PDF