streaming using head and tail

Bug #1194721 reported by Matthias Brantner
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Zorba
Confirmed
Medium
Markos Zaharioudakis

Bug Description

The optimizer should prevent materialization of a sequence if it's only consumed by head and tail as shown in the following example.

let $lines := 1 to 100000
let $header := head($lines)
for $line in tail($lines)
return { $header : $line }

Because head and tail are currently rewritten into subsequence it either requires the optimizer to detect the corresponding subsequence expressions, provide explicit iterator for head and tail, or use the code generation to produce code using subsequence.

Chris Hillery (ceejatec)
Changed in zorba:
milestone: 3.0 → none
assignee: Matthias Brantner (matthias-brantner) → Markos Zaharioudakis (markos-za)
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.