get physical plan refactor