hpcc-systems/HPCC-Platform — pull request #2336 by ghalliday (2012-05-22 13:39:02+00:00)
Title: Use a spill result for a dataset hoisted from a loop

A child query that accesses a dataset that is invarient within the child
query has that dataset executed outside of the child query. However
because the child query only executes on a single node it uses a workunit
result instead of a spill to cope hold the temporary result.

In thor, a loop that isn't in a child query contains global operations.
So any loop invariant datasets that are extracted should still spill to
a disk spill rather than using a workunit result.

A future better fix is probably to always write to graph results for
any values hoisted within graphs (for hthor, roxie and thor). However
that will require work in the engines, so not for 3.8.

Fixes #2081.

Signed-off-by: Gavin Halliday