inspect_join_plan function

check that a join plan is consistent with table descriptions.