If the defendant waives the preliminary examination, the judge shall hold the defendant to answer to the court having jurisdiction of the offense.