As it turns out, you also have to specify parameter.setDefaultValue(...).
This leads me to my next question.
If I call the stored procedure using the form "CALL stored_proc()" then the stored procedure gets called with the default value. However, if invoke the stored procedure thusly "SELECT * FROM stored_proc" Teiid complains that "no valid criteria specified for parameter..."
Should both forms work?
As you have seen setting the default value will work, or setting nullable will allow the parameter to use a default value.
Procedure relational selects are mimicing table semantics, not procedure semantics. With SELECT * FROM stored_proc you are logically asking for the entire domain/range of results from the procedure. In general this is not possible to determine. With additional metadata and constrained input value domains we could in theory do the evaluation.
Intermixing the relational and procedural paradigms with default parameters can be confusing. A possible enhancement would be alternative syntax that would make the intent more clear to execute as a procedure, such as SELECT * FROM stored_proc(), SELECT * FROM stored_proc WITH DEFAULTS, etc.