used sourceRelation instead of table attribute in planner

groupBy isn't nullable