Initial support for relational query flattening