added initial support for expanding sub-documents in the from clause