spill query implemented