Bug #5488
Updated by Michael Kay over 2 years ago
The vast majority of the tests for streaming with union, intersect, and except operators provide one streamed and one non-streamed operand. This case isn't very interesting; in particular, with intersect and except the result will always be empty, and the only interest is in whether and when we detect this. The specification, however, describes some much more challenging cases. We should be able to process a union, intersect, or except operator with two consuming operands, for example `//book | //magazine` or `//book[@price gt 10] 10]` intersect subsequence(//book, 1, 10)`. The assumption, explained in a note in the spec, is that the two operands can be evaluated "in parallel" during a single pass of the input, and the results combined on the fly. We make no attempt to implement this, as far as I am aware. Cases involving climbing operands are also interesting: the spec gives the example `parent::A | */ancestor::B`