Add test case for [OPTIQ-307]
Re-organize planner initialization, to make it easier to use heuristic join order.