[FEATURE] Add support for foreign_table_where and substitute marker if any

Change-Id: I33b2327fa85e27001c70fed323e3910f65fdc558
Releases: 0.4.0
Resolves: #58434