Refactoring to make SimpleLogicalPlanner easier to test