Cal. Penal Code § 881
(b) If a witness fails to appear at the preliminary hearing in response to a subpoena, the court may hear evidence, including testimony or an affidavit from the arresting or interviewing officer, and if the court determines on the basis of the evidence that the witness is a material witness, the court shall issue a bench warrant for the arrest of the witness, and upon the appearance of the witness, may commit him or her into custody until the conclusion of the preliminary hearing, or until the defendant enters a plea of nolo contendere, or the witness is otherwise legally discharged.
The court may order the witness to enter into a written undertaking to the effect that he or she will appear and testify at the time and place ordered by the court or that he or she will forfeit an amount that the court deems proper.