This is a bit of an all or nothing change. Just changing one of the following options normally causes problems - either greatly increased code size, or expressions being evaluated out of order.
At the moment the following options will need to be enabled at the same time for it to stand some chances of working:
- ensure that graphs are executed together when they can be
- stop creating temporaries between graphs
- conditional actions need to come out in the graph
workunitTemporaries=false (or something like it)
- ensure global expressions are hoisted in the resourcing code, not earlier - otherwise you hit dependency issues.
autoDeduceGlobal (doesn't yet exist)
- Need to automatically work out which parts of the query need to be executed globally, and ensure they are evaluated there -