Add sql coverage test cases and planner test cases for case when