Implemented consistency check method in QueryPlanLearner.