Typically the rest access will be in procedural forms, like "exec REST_WS.WS_VIEW(...)", above you show in view form. Typically one can use relational procedure transformation where the criteria get converted back into procedure parameters at the time of execution.
What happens when you provide multiple IN clause values as shown in the statement without dynamic select expression? Also, try moving the MAKEDEP right after "LEFT OUTER JOIN" in the comment form and see if that makes any difference.
The EXEC part is done in the procedure, the REST_WS.WS_VIEW is defined like this:
CREATE VIEW WS_VIEW AS SELECT * FROM REST_WS.WS_PROCEDURE;
with the procedure defined like this:
CREATE VIRTUAL PROCEDURE WS_PRECEDURE(SEARCH_INPUT varchar) RETURNS (
) AS F,
'/myxml/response/docs' PASSING JSONTOXML('myxml', F.RESULT) COLUMNS
FILE_ID string PATH 'fileid',
FILE_NAME string PATH 'filename'
With two or three values in the IN clause, the results are returned as usual, just like for one.
The position of the MAKEDEP seems to be not possible, since no other option worked for me.
I guess procedure gets called for each SCHEMA_ID. Can you provide query plan for this?