California Penal Code Section 1332 - Interpretation
In California, section 1332 empowers trial courts to detain a material witness for either party so that the witness's testimony will be available at trial.
We are aware of no court that has held that the invocation of Penal Code section 1332 (or analogous statutes) to ensure a witness's attendance at trial renders the subsequent trial unconstitutional.
Section 1332 contains a number of safeguards designed to protect a witness from unreasonable detention.
A witness is also protected from unreasonable detention under the California Constitution and, if facing detention under section 1332, "should have counsel, either retained or appointed." (In re Francisco M. (2001) 86 Cal.App.4th 1061, 1076.)